Advanced Permissions

Learn how to setup more advanced configurations for project access control

Some teams need different levels of access in each environment of a project. For example, a group of developers might need these permissions:

  • Write access to the dev and ci configs.
  • Read-only access to the stg config.
  • The ability to see that the prd config exists, without being able to view its secrets.

To set this up, create a custom project role for each access level. Then assign all three roles to the same group, each scoped to its own environments. For background on how roles are scoped and combined, see Environment-scoped roles.

1. Create custom project roles

Create three custom project roles:

  • Secret Write: The "View Secrets" and "Manage Secrets" permissions.
  • Secret Read-only: The "View Secrets" permission.
  • No Secrets: No permissions.

2. Assign the roles to a group

In this example, the group gets access to a project named example that has dev, ci, stg, and prd environments.

  1. Open the example project and click Members.

  2. In the Add Members area, search for the group, select it, and click Add.

  3. In the dialog that opens, set up the following rows. To add a row, click the + button.

    Project roleEnvironments
    Secret Writedev, ci
    Secret Read-onlystg
    No Secretsprd
  4. Click Save.

If the group is already a project member, click the menu next to it and select Manage. Then add the roles in the drawer.

You can assign the same roles to an individual user in the same way, or manage them from the group's page under Team.

3. Inspect project member access

When you're done, the Member Access table on the project's Members page shows the group with one line per role and the environments each role covers.

In the project's config view, members of the group see every config they were assigned. They have write access to dev and ci and can view secrets in stg. They can see that prd and its branch configs exist, but they can't open them.

Grant access to individual configs

A role can also cover individual configs, instead of or next to whole environments. For example, a contractor might need read-only access to the prd_gcp branch config without access to the rest of prd.

  1. Open the project and click Members.
  2. Click the menu next to the member and select Manage.
  3. In the role's Specific configs list, select prd_gcp under the Production heading.
  4. Click Save.

Config scope works like this:

  • A role on a branch config also reads the values that the branch config inherits from its root config. It doesn't give access to the root config or to the environment's other configs.
  • A role on a root config doesn't give access to the environment's branch configs.
  • A role can cover an environment and one of its configs at the same time. On that config, the member gets the permissions of both.
  • Roles can't cover personal configs. A member whose only access to an environment comes from config grants doesn't get a personal config in that environment.
  • A role that grants access to all environments can't be scoped to configs.
  • Config scope doesn't give access to the environment itself. Members with only config grants can't create configs or change the environment.

In the project's config view, these members see only the configs they were granted, and the environment is marked as partial access.

Combine access from several groups

A user's permissions in an environment combine every role that covers it, including roles from each of their groups. Doppler grants the most permissive result. For example, if one of the user's groups has read-only access to a config and another has write access, the user has write access.

Use this behavior when access is naturally owned by different teams. For example, a QA group might grant Viewer on stg while a team group grants Collaborator on dev. When the access levels belong to the same people, assign several roles to one group instead of creating a group for each access level.


Did this page help you?