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

Backport of VAULT-5094: Deal with identity_policies Set to nil in Secret Data Field into release/1.13.x #20682

Conversation

hc-github-team-secure-vault-core
Copy link
Collaborator

Backport

This PR is auto-generated from #20636 to be assessed for backporting due to the inclusion of the label backport/1.13.x.

The below text is copied from the body of the original PR.


When the vault login command is executed and a valid token that has associated Identity Policies in Namespaces other than the current namespace, an error is reported. This is due to the fact that the Vault CLI could not process the response from the Vault server for the Token Lookup request. Specifically, the identity_policies key in the response is set to nil. The Vault CLI code uses code (that has been fixed in this PR) that expects that either the identity_policies key to be absent in the response or present and set to either a string slice or a slice of values that can be casted to the string type.

This minor fix allows that code to deal with the identity_policies key being set to nil in the same manner as if it was absent.


Overview of commits

@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/marcboudreau/VAULT-5094/fix-error-when-identity-policies-are-nil/smoothly-enjoyed-feline branch from 5e0cc29 to f705088 Compare May 19, 2023 14:43
@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/marcboudreau/VAULT-5094/fix-error-when-identity-policies-are-nil/smoothly-enjoyed-feline branch from cee42c9 to f39e47c Compare May 19, 2023 14:43
@marcboudreau marcboudreau merged commit 191712e into release/1.13.x May 19, 2023
@marcboudreau marcboudreau deleted the backport/marcboudreau/VAULT-5094/fix-error-when-identity-policies-are-nil/smoothly-enjoyed-feline branch May 19, 2023 19:31
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

Successfully merging this pull request may close these issues.

2 participants