Skip to content

Add a helper function for safely grabbing a keyEntry by version#10080

Merged
sgmiller merged 7 commits into
masterfrom
safe-keyentry-fetch
Oct 7, 2020
Merged

Add a helper function for safely grabbing a keyEntry by version#10080
sgmiller merged 7 commits into
masterfrom
safe-keyentry-fetch

Conversation

@sgmiller
Copy link
Copy Markdown
Collaborator

@sgmiller sgmiller commented Oct 2, 2020

No description provided.

@sgmiller sgmiller requested a review from briankassouf October 2, 2020 16:59
Comment thread sdk/helper/keysutil/policy.go Outdated
if !ok {
return nil, errutil.UserError{Err: "no such key version"}
}
return &keyEntry, nil
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we go back to returning by value here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

There was some reason it didn't work, but I'll take another look.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Nm, works just fine. Changed.

@sgmiller sgmiller merged commit 6a41edb into master Oct 7, 2020
@sgmiller sgmiller deleted the safe-keyentry-fetch branch October 7, 2020 13:21
tsaarni pushed a commit to Nordix/vault that referenced this pull request Oct 23, 2025
…ashicorp#9944) (hashicorp#10073) (hashicorp#10080)

* normalize token type for ns_token auth mounts

* add changelog

* also check type is supported in route and add test coverage

* Apply suggestion from @hellobontempo

* update test coverage to expect array

* update tests

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
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