puppetlabs / vault-plugin-secrets-oauthapp

OAuth 2.0 secrets plugin for HashiCorp Vault supporting a variety of grant types
Apache License 2.0
94 stars 10 forks source link

Expand characters allowed for creds path #13

Closed DrDaveD closed 3 years ago

DrDaveD commented 4 years ago

GenericNameWithAtRegex only allows 3 extra characters beyond alphanumeric: comma, period, and @. That was very limiting for me because I needed to make up the path from two different pieces, one of which could contain all those characters, and I needed a way to delimit between the two pieces. This PR extends the allowed characters to include additional ones that I could think of which were not special to either shells (when not at the beginning of a word) or urls. I am planning to use colon as the delimiter but while I was at it I thought I might as well include others. Also for completeness I began the regex with '^'.

DrDaveD commented 4 years ago

I found that my first attempt was done very incorrectly, as shown by the failure of go test. I changed it to take a different approach, still using the standard framework pattern but extending it by replacing the '@' with the additional characters to support. I also removed the '^' from the pattern in case there was something else I didn't understand, making it the minimal change.

DrDaveD commented 4 years ago

@impl Could you please take a look at my pull requests?

ahpook commented 4 years ago

@DrDaveD sorry for the slow response - we'll get these reviewed this week! Thanks for the PRs!! 👍

DrDaveD commented 3 years ago

I force-pushed an update with just one commit, in order to put the commit message in ESlint format.