Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is Service Account delegation/impersonation necessary to access the Admin SDK Directory API? #203

Open
rtyley opened this issue Nov 23, 2023 · 0 comments

Comments

@rtyley
Copy link
Member

rtyley commented Nov 23, 2023

The brilliant documentation added in PR #29 back in October 2015 added these really useful lines:

As explained in the Google documentation about Domain-Wide delegation of authority:

Only users with access to the Admin APIs can access the Admin SDK Directory API, therefore your service account needs to impersonate one of those users to access the Admin SDK Directory API.

You can see us doing that with createDelegated() here (delegating to [email protected]):

val credentials = serviceAccountCredentials
.createDelegated(impersonatedUser)
.createScoped(DirectoryScopes.ADMIN_DIRECTORY_GROUP_READONLY)

...but is delegation/impersonation still necessary?

https://github.com/guardian/pan-domain-authentication/blob/0854755c6093f95a731e697b558813b5c51623de/pan-domain-auth-core/src/main/scala/com/gu/pandomainauth/service/Google2FAGroupChecker.scala#L24-L30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant