Set up the access control tutorials

The code in this cookbook uses an example CoffeeStore database.

If you haven’t already done so, set up the access control cookbook environment by creating a database and an admin key.

Create a CoffeeStore database

  1. Sign up for a free account at https://dashboard.fauna.com/register and log in to your account.

    The username and password you use when you create a Fauna account is the organizational account. This account has the admin role on every database in your Fauna space. Protect the organizational account password as you would any root-level password.

  2. On the Dashboard Home page, click Create Database to create a database.

  3. Name your database CoffeeStore and choose a Region Group. You can leave all other settings at their default values.

  4. Click Create.

    On successful creation the CoffeeStore database is displayed in the database list.

Create an admin key

  1. Click the CoffeeStore database in the left-side navigation menu.

  2. Click the Keys tab.

  3. Click Create Key.

    Select a Role of admin.

  4. Enter coffee-admin for the Key Name.

  5. Click Save.

  6. Copy the Secret Key.

    Database creation time is the only time the secret is displayed. If the secret is discarded or lost, it can’t be recovered so make sure to copy and save the secret to a password manager or other safe location.

Now, you have a key that can access and query Fauna Shell. A query made with this key has admin privileges on all the CoffeeStore database resources.

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!