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

Implement "accessor" attribute on vault_okta_auth_backend #420

Conversation

jtcressy
Copy link
Contributor

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 the mount_accessor from the returned data).

If this gets merged, it can be done just like github and ldap and I can reference the accessor directly from the auth mount resource. ${vault_okta_auth_backend.myokta.accessor}

Output from unit tests:

=== RUN   TestOktaAuthBackendGroup
--- PASS: TestOktaAuthBackendGroup (0.16s)
=== RUN   TestOktaAuthBackend
--- PASS: TestOktaAuthBackend (0.18s)
=== RUN   TestOktaAuthBackendUser
--- PASS: TestOktaAuthBackendUser (0.14s)
PASS
ok  	github.com/terraform-providers/terraform-provider-vault/vault	9.954s

Documentation added for new attribute as well.

@ghost ghost added the size/XS label May 17, 2019
@ghost ghost added the documentation label May 17, 2019
@jtcressy
Copy link
Contributor Author

Question I have for everyone:
Should I also implement the tune parameter? I should probably just bring this inline with the github and ldap auth methods but I didn't want to blow out scope too much.

Copy link
Contributor

@tyrannosaurus-becks tyrannosaurus-becks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @jtcressy !

@tyrannosaurus-becks tyrannosaurus-becks merged commit b017c4f into hashicorp:master Jun 3, 2019
@jtcressy jtcressy deleted the add_accessor_attributes_auth_mounts branch July 25, 2019 17:42
dandandy pushed a commit to dandandy/terraform-provider-vault that referenced this pull request Jun 17, 2021
…s_auth_mounts

Implement "accessor" attribute on vault_okta_auth_backend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants