-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add new azure flag to obtain groups from the oidc ticket #2531
base: master
Are you sure you want to change the base?
Conversation
c4c13ff
to
ce52091
Compare
It is possible in azure to configure an optional claim such as groups. In this case there is no need to make a request to Microsoft Graph api to obtain groups. Instead azure will send the configured groups as a part of oidc ticket directly. This is usefull when it is not possible to obtain GroupMember.Read.All permissions for the applictaion. Here we provide a new flag `azure-groups-in-ticket`, which does exactly this. When the flag is set the request to the Graph api is not done and instead the groups are taken from the session directly.
ce52091
to
5eddf25
Compare
Hello, any comment here? |
1 similar comment
Hello, any comment here? |
This pull request has been inactive for 60 days. If the pull request is still relevant please comment to re-activate the pull request. If no action is taken within 7 days, the pull request will be marked closed. |
This pull request has been inactive for 60 days. If the pull request is still relevant please comment to re-activate the pull request. If no action is taken within 7 days, the pull request will be marked closed. |
Hello, are there any news here? |
Description
It is possible in azure to configure an optional claim such as groups. In this case there is no need to make a request to Microsoft Graph api to obtain groups. Instead azure will send the configured groups as a part of oidc ticket directly. This is usefull when it is not possible to obtain GroupMember.Read.All permissions for the application, for example
for a large org where additional permissions are not desirable.
Here we provide a new flag
--azure-groups-in-ticket
, which does exactly this. When the flag is set the request to the Graph api is not done and instead the groups are taken from the session directly.Motivation and Context
In the large org it is not always possible to obtain admin consent for GroupMember.Read.All entra id api permission.
However, there is already a possibility to get groups in the azure oidc ticket without any additional api permissions.
How Has This Been Tested?
It is tested locally with a test entra tenant. Unit tests are provided.
In addition, in the current master the test TestAzureProviderEnrichSession is broken,
as the branch, which tests that the groups are fetched from the graph api is never executed.
(This can be easily verified by inserting panic into testAzureBackendWithError into the
first if branch)
This is also fixed in this PR. Now the test also correctly tests fetch from the graph api.
To run the test just execute
go test -v -run TestAzureProviderEnrichSession
All the test suite in the
providers
package run without failures.Checklist: