-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 pki/issue_by_cn/<cn>
endpoint
#6706
Comments
It's really strange that there are no restrictions based CN in one pki role. I see that controlling CN through policies, which supports templates, is more suitable than add templates to pki role - #7216 |
Hello, I have this use case too 👍 I was trying :
It seems that templating is not working on fine grained access control... ? |
Templating in policies is only supported in policy paths, at least for now. |
@jefferai what do you think about my suggested solution? Would you be happy to accept a PR to add an endpoint as described? If so I could probably work on it or find someone on my team to work on it. |
Same scenario here. |
I think #8509 might solve the problem? |
Agreed, closing for now. Please reopen if those features do not solve your problem. |
Is your feature request related to a problem? Please describe.
I was disappointed to find that the
pki/issue/<role>
endpoint leaves me with no way to restrict the domain (CN) of the cert to the user's name. The use case is to use vault to issue user certificates and to only allow issuing certificates with the user's name in the CN. I can kinda achieve this by creating 1 role per user programmatically and then creating a policy that only allowspki/issue/{{identity.entity.aliases.<auth_backend>.name}}
. However this is tedious because I must create roles automatically when users are added i.e. sync LDAP or whatever with the roles in Vault.Describe the solution you'd like
How about we add
pki/issue_by_cn/<cn>
which takesrole
in the body. This could then be restricted with a policy likepki/issue_by_cn/{{identity.entity.aliases.<auth_backend>.name}}
and I would only need 1role
for all my users. This would just be an additional endpoint, not suggesting we change the existing ones.Describe alternatives you've considered
Templating the parameters has been considered in #6558 and more generally doesn't seem to be in the plans.
#4157 considers checking token metadata.
Additional context
I think issuing client certs that have a CN matching the username with the PKI backend is an obvious use case and the above issues + https://groups.google.com/forum/#!topic/vault-tool/88CRNUIEG8Y show other people have wanted this.
The text was updated successfully, but these errors were encountered: