-
Notifications
You must be signed in to change notification settings - Fork 62
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 functionality to check against a list of claims #50
Conversation
If a list of claims is provided, unmarshal it and then search within that for the bound claim.
@MartinLeedotOrg have you confirmed this is working? I tried to build I tried both:
and:
without any success. 😞 |
Did the first case work before the patch? I haven't tested this with Gitlab's groups - only with Okta and passing arbitrary claims. Are you requesting the groups scope from Gitlab? |
@MartinLeedotOrg Thanks! The JSON parsing is all handled upstream so I've adjusted that bit and added a couple more tests. I just tested this against Gitlab groups and it now appears to work OK. @chrissphinx Maybe give this update a try? |
@kalafut no, unfortunately still not working for me. Perhaps I have built the binary wrong, I suppose we will wait for this to come through on official release to test out then. |
@chrissphinx Can you post your gitlab role config here (w/o sensitive data)? |
Sure it's:
I have also tried it like:
There wouldn't be any weird reason I couldn't just drop the newly built-from-source |
@chrissphinx The plugin hasn't been updated in the Vault repo yet which is why you're not seeing the change. To test it out now you'd need to build the plugin binary and register it with Vault. We'll merge the plugin into the main binary when we approach the next release. No, you should not have to remake the OIDC auth method you've set up. You can always choose to mount another one at separate path if you want to run tests first, however. |
@kalafut yeah so what I did was clone down the main Looking forward to the next release then, thanks for all the hard work! 👍 |
@chrissphinx That process would work if you're not using Go modules, so it depends. If Go modules are used, then then |
If a list of claims is provided, unmarshal it and then search within that for the bound claim.
The intention is to allow me to pass a claim like:
vault_role: ["admin", "superadmin"]
This will allow me to log in as either
admin
orsuperadmin
as I choose.Useful for testing roles that other users have, or to allow people who sit across two teams to perform functions in both without adding additional roles.