This page describes how to grant repository-level roles to users, groups, and
service accounts in the Secure Source Manager web interface.

For information on which roles to grant for a certain use-case, see
[Repository role management](https://docs.cloud.google.com/secure-source-manager/docs/access-control.md.txt#repository_role_management).

## Required roles


To get the permissions that
you need to grant users repository-level roles,

ask your administrator to grant you the
following IAM roles:

- [Secure Source Manager Instance Accessor](https://docs.cloud.google.com/iam/docs/roles-permissions/securesourcemanager.md.txt#securesourcemanager.instanceAccessor) (`roles/securesourcemanager.instanceAccessor`) on the Secure Source Manager instance
- [Secure Source Manager Repo Admin](https://docs.cloud.google.com/iam/docs/roles-permissions/securesourcemanager.md.txt#securesourcemanager.repoAdmin) (`roles/securesourcemanager.repoAdmin`) on the repository


For more information about granting roles, see [Manage access to projects, folders, and organizations](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access.md.txt).


You might also be able to get
the required permissions through [custom
roles](https://docs.cloud.google.com/iam/docs/creating-custom-roles) or other [predefined
roles](https://docs.cloud.google.com/iam/docs/roles-overview#predefined).

For information on granting Secure Source Manager roles,
see [Access control with IAM](https://docs.cloud.google.com/secure-source-manager/docs/access-control.md.txt) and
[Grant users instance access](https://docs.cloud.google.com/secure-source-manager/docs/grant-users-instance-access.md.txt).

## Grant users repository-level roles

Users, groups, and service accounts must be granted the Instance Accessor role
(`roles/securesourcemanager.instanceAccessor`) or Instance Repository Creator
role (`roles.securesourcemanager.instanceRepositoryCreator`) before they can be
granted repository roles. For information on granting instance roles, see
[Grant or revoke instance access](https://docs.cloud.google.com/secure-source-manager/docs/grant-users-instance-access.md.txt).

If you're authenticating to Secure Source Manager using a third-party
identity provider and Workforce Identity Federation, then principals must be added
to your workforce identity pool, and granted at least the Instance Accessor role
(`roles/securesourcemanager.instanceAccessor`). For information about managing
workforce identity pools, see
[Manage workforce identity pools and providers](https://docs.cloud.google.com/iam/docs/manage-workforce-identity-pools-providers.md.txt).

You can use the Secure Source Manager API or the Secure Source Manager web interface to grant
users, groups, and service accounts repository-level roles. For more
information, see
[Access control with IAM](https://docs.cloud.google.com/secure-source-manager/docs/access-control.md.txt).

To grant users or service accounts repository-level roles using the web
interface:

1. To access the Secure Source Manager instance through its web interface, copy the following URL
   into your browser address bar.


       INSTANCE_ID-PROJECT_NUMBER.LOCATION.sourcemanager.dev

   <br />


   Replace the following:


   - <var translate="no">INSTANCE_ID</var> with the instance name.
   - <var translate="no">PROJECT_NUMBER</var> with the instance's Google Cloud project number. For information on identifying projects, see [Identifying projects](https://docs.cloud.google.com/resource-manager/docs/creating-managing-projects.md.txt#identifying_projects).
   - <var translate="no">LOCATION</var> with the instance's region.

   <br />

2. From the **My repositories** page, Select your repository.
3. Click the **Permissions** tab.
4. In the **People and permissions** section, click **Add users**.
5. In the **Add principal** field, enter the email of the user or service account you want to grant the role to.
6. In the **Assign a role** menu, select the role to assign.
7. Click **Save**.

To add additional roles click the
edit **Edit** icon and add the
roles using the **Assign a role** menu.

## What's next

- [Use Git source code management](https://docs.cloud.google.com/secure-source-manager/docs/use-git.md.txt) with Secure Source Manager.
- Learn more about [access control with IAM](https://docs.cloud.google.com/secure-source-manager/docs/access-control.md.txt).
- [Grant and revoke IAM roles](https://docs.cloud.google.com/secure-source-manager/docs/update-iam-policy).