Skip to main content
Version: 0.12

Grant and check access

Grant a role to a person, team or service account on one resource, then check what they can reach. Access control explains how grants inherit and add up.

Before you start​

  • You hold iam.admin or catalog.accessAdmin on the resource or a wider scope.
  • The member exists: a person who has signed in, a team or a service account.

Grant a role​

Grant the role on the resource the member should reach, or across the whole catalog:

  1. Open the resource's access panel: the Access tab on an asset or data product, Manage access on a glossary term, or Settings → Catalog-wide access for the whole catalog.
  2. Select Grant access.
  3. Choose the member and the Role. Only roles that take effect on this resource are listed.
  4. Optional: set Access ends and a Reason for access that's only needed for a while.
  5. Select Grant access.

Granting the Trust & Safety team dataProduct.viewer on Buyer 360 for 30 days:

The Grant access drawer on the Buyer 360 data product, with the Trust & Safety team, the dataProduct.viewer role, access ending in 30 days and a reason filled inThe Grant access drawer on the Buyer 360 data product, with the Trust & Safety team, the dataProduct.viewer role, access ending in 30 days and a reason filled in

Secret stores and queryable pipelines have the same panel on their own pages.

Set the base role​

The base role is what everyone gets before you grant them anything. It starts as user, which reads the whole catalog. If the catalog holds something not everyone should read, lower it. Do it early, because a new base role only applies to people who haven't signed in yet.

  1. Give new people no access by default

    Open Settings → Authentication and, under New user defaults, set Role assigned on first sign-in to catalog.none:

    New user defaults in Settings, Authentication, with Role assigned on first sign-in set to catalog.noneNew user defaults in Settings, Authentication, with Role assigned on first sign-in set to catalog.none
  2. Remove the grant to everyone

    Open Settings → Catalog-wide access, open the menu on the Everyone signed in row and select Revoke access:

    Catalog-wide grants in Settings, listing Everyone signed in and three service accounts with their rolesCatalog-wide grants in Settings, listing Everyone signed in and three service accounts with their roles
  3. Narrow existing members

    Under Settings → Members, change anyone who holds user to a narrower role.

  4. Grant teams what they need

    Grant each team a role on the data products or assets it works with.

Check who has access​

One resource​

Open the resource's Access tab, select Check access and choose a member. Marmot says whether they can see the resource and which grants give them access:

Check access on the Buyer 360 data product, answering yes for Priya Shah and listing the grants that give her accessCheck access on the Buyer 360 data product, answering yes for Priya Shah and listing the grants that give her access

One member​

Check everything that reaches a member before you hand out a credential. Effective access is on each service account's and team's page in Settings, on a person under Settings → Members and under Explain access in Settings → Catalog-wide access:

Effective access on a service account, listing the roles it holds across the catalog and the permissions each one carriesEffective access on a service account, listing the roles it holds across the catalog and the permissions each one carries

Script an access review​

The API is the only way to script this. Checking another member needs iam:view across the whole catalog:

export MARMOT_HOST=https://<instance>.marmotdata.cloud

curl -s -H "Authorization: Bearer $MARMOT_API_KEY" \
"$MARMOT_HOST/api/v1/iam/effective-access?member=serviceAccount:$SA_ID"

curl -s -X POST -H "Authorization: Bearer $MARMOT_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"permissions":["dataProduct:view"],"member":"user:'"$USER_ID"'"}' \
"$MARMOT_HOST/api/v1/iam/dataProduct/$PRODUCT_ID/test-permissions"

test-permissions returns the permissions from your list that the member holds. Leave out member to test yourself.

Troubleshooting​

What you seeWhat to do
Check access says access comes "through a grant to everyone signed in"The base role is too wide. Set the base role.
The role you want isn't in the Role listIt only takes effect catalog-wide. Grant it under Settings → Catalog-wide access.
"Testing another member's access requires iam:view"Ask for iam.viewer across the whole catalog.
"Someone else changed this policy while you were editing. Reloaded; try again."Make the grant again on the reloaded policy.

Next steps​