Skip to content

Commit

Permalink
Update some guides
Browse files Browse the repository at this point in the history
  • Loading branch information
1st1 committed Feb 14, 2025
1 parent 98be319 commit 8e14100
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 65 deletions.
4 changes: 2 additions & 2 deletions docs/cloud/web.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ allows you to monitor your instance, navigate to the management page for its
branches, and create secret keys.

You'll also see instructions in the bottom-right for linking your |Gel| CLI to
your Gel Cloud account. You do this by running the CLI command ``edgedb
cloud login``. This will make all of your Gel Cloud instances accessible via
your Gel Cloud account. You do this by running the CLI command
:gelcmd:`cloud login`. This will make all of your Gel Cloud instances accessible via
the CLI. You can manage them just as you would other remote Gel instances.

If you want to manage a branch of your database, click through on the
Expand Down
17 changes: 9 additions & 8 deletions docs/guides/auth/built_in_ui.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ base64url encode the resulting string. This new string is called the
import crypto from "node:crypto";
/**
* You can get this value by running `edgedb instance credentials`.
* You can get this value by running `gel instance credentials`.
* Value should be:
* `${protocol}://${host}:${port}/branch/${branch}/ext/auth/
*/
Expand Down Expand Up @@ -187,7 +187,7 @@ to the built-in UI with the ``challenge`` in the search parameters.
redirectUrl.searchParams.set("challenge", challenge);
res.writeHead(301, {
"Set-Cookie": `edgedb-pkce-verifier=${verifier}; HttpOnly; Path=/; Secure; SameSite=Strict`,
"Set-Cookie": `gel-pkce-verifier=${verifier}; HttpOnly; Path=/; Secure; SameSite=Strict`,
Location: redirectUrl.href,
});
res.end();
Expand All @@ -207,7 +207,7 @@ to the built-in UI with the ``challenge`` in the search parameters.
redirectUrl.searchParams.set("challenge", challenge);
res.writeHead(301, {
"Set-Cookie": `edgedb-pkce-verifier=${verifier}; HttpOnly; Path=/; Secure; SameSite=Strict`,
"Set-Cookie": `gel-pkce-verifier=${verifier}; HttpOnly; Path=/; Secure; SameSite=Strict`,
Location: redirectUrl.href,
});
res.end();
Expand All @@ -227,9 +227,10 @@ Retrieve ``auth_token``
At the very end of the flow, the Gel server will redirect the user's browser
to the ``redirect_to`` address with a single query parameter: ``code``. This
route should be a server route that has access to the ``verifier``. You then
take that ``code`` and look up the ``verifier`` in the ``edgedb-pkce-verifier``
cookie, and make a request to the Gel Auth extension to exchange these two
pieces of data for an ``auth_token``.
take that ``code`` and look up the ``verifier`` in the ``gel-pkce-verifier``
cookie (``edgedb-pkce-verifier`` with |EdgeDB| <= 5), and make a request
to the Gel Auth extension to exchange these two pieces of data for an
``auth_token``.

.. lint-off
Expand Down Expand Up @@ -258,7 +259,7 @@ pieces of data for an ``auth_token``.
const cookies = req.headers.cookie?.split("; ");
const verifier = cookies
?.find((cookie) => cookie.startsWith("edgedb-pkce-verifier="))
?.find((cookie) => cookie.startsWith("gel-pkce-verifier="))
?.split("=")[1];
if (!verifier) {
res.status = 400;
Expand All @@ -285,7 +286,7 @@ pieces of data for an ``auth_token``.
const { auth_token } = await codeExchangeResponse.json();
res.writeHead(204, {
"Set-Cookie": `edgedb-auth-token=${auth_token}; HttpOnly; Path=/; Secure; SameSite=Strict`,
"Set-Cookie": `gel-auth-token=${auth_token}; HttpOnly; Path=/; Secure; SameSite=Strict`,
});
res.end();
};
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/auth/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Extension configuration
=======================

The best and easiest way to configure the extension for your database is
to use the built-in UI. To access it, run ``edgedb ui``. If you have the
to use the built-in UI. To access it, run :gelcmd:`ui`. If you have the
extension enabled in your schema as shown above and have migrated that
schema change, you will see the "Auth Admin" icon in the left-hand toolbar.

Expand Down
19 changes: 10 additions & 9 deletions docs/guides/auth/oauth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ base64url encode the resulting string. This new string is called the
import crypto from "node:crypto";
/**
* You can get this value by running `edgedb instance credentials`.
* You can get this value by running `gel instance credentials`.
* Value should be:
* `${protocol}://${host}:${port}/branch/${branch}/ext/auth/
*/
Expand Down Expand Up @@ -185,7 +185,7 @@ the end user's browser to the Identity Provider with the proper setup.
);
res.writeHead(302, {
"Set-Cookie": `edgedb-pkce-verifier=${pkce.verifier}; HttpOnly; Path=/; Secure; SameSite=Strict`,
"Set-Cookie": `gel-pkce-verifier=${pkce.verifier}; HttpOnly; Path=/; Secure; SameSite=Strict`,
Location: redirectUrl.href,
});
res.end();
Expand All @@ -200,9 +200,10 @@ Retrieve ``auth_token``
At the very end of the flow, the Gel server will redirect the user's browser
to the ``redirect_to`` address with a single query parameter: ``code``. This
route should be a server route that has access to the ``verifier``. You then
take that ``code`` and look up the ``verifier`` in the ``edgedb-pkce-verifier``
cookie, and make a request to the Gel Auth extension to exchange these two
pieces of data for an ``auth_token``.
take that ``code`` and look up the ``verifier`` in the ``gel-pkce-verifier``
cookie (``edgedb-pkce-verifier`` with |EdgeDB| <= 5), and make a request to
the Gel Auth extension to exchange these two pieces of data for an
``auth_token``.

.. lint-off
Expand Down Expand Up @@ -230,7 +231,7 @@ pieces of data for an ``auth_token``.
const cookies = req.headers.cookie?.split("; ");
const verifier = cookies
?.find((cookie) => cookie.startsWith("edgedb-pkce-verifier="))
?.find((cookie) => cookie.startsWith("gel-pkce-verifier="))
?.split("=")[1];
if (!verifier) {
res.status = 400;
Expand All @@ -256,7 +257,7 @@ pieces of data for an ``auth_token``.
const { auth_token } = await codeExchangeResponse.json();
res.writeHead(204, {
"Set-Cookie": `edgedb-auth-token=${auth_token}; HttpOnly; Path=/; Secure; SameSite=Strict`,
"Set-Cookie": `gel-auth-token=${auth_token}; HttpOnly; Path=/; Secure; SameSite=Strict`,
});
res.end();
};
Expand Down Expand Up @@ -313,7 +314,7 @@ Identity which sets a search parameter on the URL to ``isSignUp=true``:
+ }
+
res.writeHead(204, {
"Set-Cookie": `edgedb-auth-token=${auth_token}; HttpOnly; Path=/; Secure; SameSite=Strict`,
"Set-Cookie": `gel-auth-token=${auth_token}; HttpOnly; Path=/; Secure; SameSite=Strict`,
});
Expand Down Expand Up @@ -414,7 +415,7 @@ it:
}
res.writeHead(204, {
"Set-Cookie": `edgedb-auth-token=${auth_token}; HttpOnly; Path=/; Secure; SameSite=Strict`,
"Set-Cookie": `gel-auth-token=${auth_token}; HttpOnly; Path=/; Secure; SameSite=Strict`,
});
:ref:`Back to the Gel Auth guide <ref_guide_auth>`
37 changes: 18 additions & 19 deletions docs/guides/deployment/aws_aurora_ecs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ Click `here <cf-deploy_>`_ to start the deployment process using CloudFormation
portal and follow the prompts. You'll be prompted to provide a value for the
following parameters:

- ``DockerImage``: defaults to the latest version (``edgedb/edgedb``), or you
- ``DockerImage``: defaults to the latest version (``geldata/gel``), or you
can specify a particular tag from the ones published to `Docker Hub
<https://hub.docker.com/r/edgedb/edgedb/tags>`_.
<https://hub.docker.com/r/geldata/gel/tags>`_.
- ``InstanceName``: ⚠️ Due to limitations with AWS, this must be 22 characters
or less!
- ``SuperUserPassword``: this will be used as the password for the new Gel
Expand All @@ -61,21 +61,21 @@ has been assigned to your Gel instance:

.. code-block:: bash
$ edgedb --dsn edgedb://edgedb:<password>@<hostname> --tls-security insecure
$ gel --dsn gel://admin:<password>@<hostname> --tls-security insecure
Gel x.x
Type \help for help, \quit to quit.
edgedb>
gel>
.. lint-on
It's often convenient to create an alias for the remote instance using
``edgedb instance link``.
:gelcmd:`instance link`.

.. code-block:: bash
$ edgedb instance link \
$ gel instance link \
--trust-tls-cert \
--dsn edgedb://edgedb:<password>@<hostname>
--dsn gel://admin:<password>@<hostname>
my_aws_instance
This aliases the remote instance to ``my_aws_instance`` (this name can be
Expand All @@ -84,23 +84,23 @@ against this instance, as with local instances.

.. note::

The command groups ``edgedb instance`` and ``edgedb project`` are not
The command groups :gelcmd:`instance` and :gelcmd:`project` are not
intended to manage production instances.

.. code-block:: bash
$ edgedb -I my_aws_instance
$ gel -I my_aws_instance
Gel x.x
Type \help for help, \quit to quit.
edgedb>
gel>
To make changes to your Gel deployment like upgrading the Gel version or
enabling the UI you can follow the CloudFormation
`Updating a stack <stack-update_>`_ instructions. Search for
``ContainerDefinitions`` in the template and you will find where Gel's
:ref:`environment variables <ref_guides_deployment_docker_customization>` are
defined. To upgrade the Gel version specify a
`docker image tag <docker-tags_>`_ with the image name ``edgedb/edgedb`` in the
`docker image tag <docker-tags_>`_ with the image name ``geldata/gel`` in the
second step of the update workflow.

CloudFormation CLI
Expand Down Expand Up @@ -130,7 +130,7 @@ your terminal:
.. _stack-update:
https://docs.aws.amazon.com
/AWSCloudFormation/latest/UserGuide/cfn-whatis-howdoesitwork.html
.. _docker-tags: https://hub.docker.com/r/edgedb/edgedb/tags
.. _docker-tags: https://hub.docker.com/r/geldata/gel/tags


Manual Install with CLI
Expand Down Expand Up @@ -745,7 +745,7 @@ container in it.
}" \
)"
$ LOG_GROUP_NAME="/ecs/edgedb/$NAME"
$ LOG_GROUP_NAME="/ecs/gel/$NAME"
$ aws logs create-log-group \
--region $REGION \
Expand Down Expand Up @@ -780,9 +780,9 @@ container in it.
--container-definitions \
"[{ \
\"name\": \"$NAME\", \
\"image\": \"edgedb/edgedb\", \
\"image\": \"geldata/gel\", \
\"portMappings\": [{\"containerPort\": 5656}], \
\"command\": [\"edgedb-server\"], \
\"command\": [\"gel-server\"], \
\"environment\": [{ \
\"name\": \"EDGEDB_SERVER_GENERATE_SELF_SIGNED_CERT\", \
\"value\": \"1\" \
Expand Down Expand Up @@ -832,12 +832,11 @@ container in it.
Create a local link to the new Gel instance
-------------------------------------------

Create an local alias to the remote Gel instance with ``edgedb instance
link``:
Create an local alias to the remote Gel instance with :gelcmd:`instance link`:

.. code-block:: bash
$ printf $PASSWORD | edgedb instance link \
$ printf $PASSWORD | gel instance link \
--password-from-stdin \
--trust-tls-cert \
--non-interactive \
Expand All @@ -853,7 +852,7 @@ link``:
.. note::

The command groups ``edgedb instance`` and ``edgedb project`` are not
The command groups :gelcmd:`instance` and :gelcmd:`project` are not
intended to manage production instances.

You can now open a REPL to this instance
Expand Down
Loading

0 comments on commit 8e14100

Please sign in to comment.