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

OIDC: Setting value token_policy does not set policy in token #69

Closed
jan-schumacher opened this issue Aug 16, 2019 · 5 comments
Closed

Comments

@jan-schumacher
Copy link

Actual behaviour: vault write auth/oidc/role/dev bound_audiences="supersecret" allowed_redirect_uris="http://localhost:8250/oidc/callback" user_claim="sub" token_policies="provisioneer" ttl="24h" sets token_policies [provisioneer] in role but not policies which leads to missing token_policies in the granted token.

But executing vault write auth/oidc/role/dev bound_audiences="supersecret" allowed_redirect_uris="http://localhost:8250/oidc/callback" user_claim="sub" policies="provisioneer" ttl="24h" sets both policies and token_policies to provisioneer.

Expected behaviour:
At login with oidc the value token_policies is taken into account.

@kalafut
Copy link
Contributor

kalafut commented Aug 16, 2019

This is another effect of the previous issue. There were a set of new token_ fields added recently that didn't make it into the OIDC path. The fix in #67 will handle this case too.

@zx8
Copy link

zx8 commented Aug 22, 2019

@kalafut Mind taking a look at hashicorp/terraform-provider-vault#502 and advising as to whether that issue is related to this in any way?

@kalafut
Copy link
Contributor

kalafut commented Aug 22, 2019

@zx8 I'll be taking a look at that issue and have skimmed it briefly. It may be related in that a whole bunch of backends were changed for the token fields update so there may be a bug in Vault or the TF provider. But there isn't really much shared code between the auth backends, and this OIDC/token bug was very much localized to the JWT backend.

@lawliet89
Copy link

@kalafut I did a test and it seems like there might be a bug with Vault itself.

@kalafut
Copy link
Contributor

kalafut commented Aug 23, 2019

@lawliet89 Thanks for the repro.

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

4 participants