-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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
Auth: Support google OIDC and group fetching #70140
Conversation
…/openid-configuration #69520 Signed-off-by: junya koyama <arukiidou@yahoo.co.jp>
add legacy API distinction use google auth oidc connectors add group fetching support and tests
5772b9e
to
918ecce
Compare
|
||
groups := []string{} | ||
|
||
url := fmt.Sprintf("%s?query=member_key_id=='%s'", googleIAMGroupsEndpoint, userData.Email) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because Email has been provided by Google I don't believe it could be manipulated to inject unexpected characters in the url
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM from a security point of view
docs/sources/setup-grafana/configure-security/configure-authentication/google/index.md
Outdated
Show resolved
Hide resolved
docs/sources/setup-grafana/configure-security/configure-authentication/google/index.md
Outdated
Show resolved
Hide resolved
docs/sources/setup-grafana/configure-security/configure-authentication/google/index.md
Outdated
Show resolved
Hide resolved
|
||
2. Add the `https://www.googleapis.com/auth/cloud-identity.groups.readonly` scope to your Grafana `[auth.google]` configuration: | ||
|
||
Example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent
```ini | ||
[auth.google] | ||
# .. | ||
scopes = openid email profile https://www.googleapis.com/auth/cloud-identity.groups.readonly | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent so that this content is nested under the step.
docs/sources/setup-grafana/configure-security/configure-authentication/google/index.md
Outdated
Show resolved
Hide resolved
docs/sources/setup-grafana/configure-security/configure-authentication/google/index.md
Outdated
Show resolved
Hide resolved
docs/sources/setup-grafana/configure-security/configure-authentication/google/index.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few suggestions. Thank you for the contribution!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good, but I've left some comments for edge cases that might need to be covered.
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com> Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
|
||
### Configure team sync for Google OAuth | ||
|
||
> Available in Grafana v10.1.0 and later versions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we version our docs, we don't need to add this kind of note. You can remove it.
Make sure you add this to the v10.1 what's new document!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Jguer , I checked with the team because you made a good point that I hadn't considered. Our guidance is to keep these kinds of notes in, and when they get stale (for example, 9.5 docs refer to 7.x), remove them as we come across them.
|
||
### Configure team sync for Google OAuth | ||
|
||
> Available in Grafana v10.1.0 and later versions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> Available in Grafana v10.1.0 and later versions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One additional suggestion and approved. Thank you for the contribution!
* Auth: Update Google OAuth default configuration based on /.well-known/openid-configuration #69520 Signed-off-by: junya koyama <arukiidou@yahoo.co.jp> * add id_token parsing add legacy API distinction use google auth oidc connectors add group fetching support and tests * Apply suggestions from code review Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com> Co-authored-by: Ieva <ieva.vasiljeva@grafana.com> * implement review feedback * indent docs --------- Signed-off-by: junya koyama <arukiidou@yahoo.co.jp> Co-authored-by: junya koyama <arukiidou@yahoo.co.jp> Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com> Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* Auth: Update Google OAuth default configuration based on /.well-known/openid-configuration #69520 Signed-off-by: junya koyama <arukiidou@yahoo.co.jp> * add id_token parsing add legacy API distinction use google auth oidc connectors add group fetching support and tests * Apply suggestions from code review Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com> Co-authored-by: Ieva <ieva.vasiljeva@grafana.com> * implement review feedback * indent docs --------- Signed-off-by: junya koyama <arukiidou@yahoo.co.jp> Co-authored-by: junya koyama <arukiidou@yahoo.co.jp> Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com> Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
What is this feature?
auth.google
Closes #69520
Closes #69521
Implements #70081
Special notes for your reviewer:
Please check that: