Implement "accessor" attribute on vault_okta_auth_backend #420
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The okta backend needed a smidge of love. Both ldap and github auth backends implemented the "accessor" attribute, and okta should have one too.
Story:
As a consumer of Vault Identities backends, I like to set aliases on my groups to bind them to groups from an auth provider. These aliases require that you know the
accessor
of an auth mount to properly bind the identity. With the github auth mount, you can simply use the interpolation syntax:${vault_github_auth_backend.mybackend.accessor}
However since okta hasn't exposed this attribute, I've had to use more hacky ways of programmatically fetching the accessor (like reading
sys/mfa/method/okta/myorg.okta.com
and getting themount_accessor
from the returned data).If this gets merged, it can be done just like
github
andldap
and I can reference the accessor directly from the auth mount resource.${vault_okta_auth_backend.myokta.accessor}
Output from unit tests:
Documentation added for new attribute as well.