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

Add a CREDENTIAL_KEY_FORMAT_REGEX setting #103

Open
mohsen1 opened this issue Dec 28, 2016 · 6 comments
Open

Add a CREDENTIAL_KEY_FORMAT_REGEX setting #103

mohsen1 opened this issue Dec 28, 2016 · 6 comments

Comments

@mohsen1
Copy link

mohsen1 commented Dec 28, 2016

Keys like "my key" should not be allowed

@ryan-lane
Copy link
Contributor

Hm. Yeah. I actually didn't think they were allowed. Thanks for the bug report!

@doy
Copy link

doy commented Dec 29, 2016

Hmmm. Is there a reason for this? I find it very hard to be able to organize credentials without some kind of structure (especially when keys have to be globally unique, and we have several hundred of them scattered across dozens of individual credentials), and so I've been using slashes to provide some level of organization. I understand that it makes it impossible to use key names as env vars, but that's not really necessary for the core functionality. Can this at least be made an option? (I was actually getting ready to submit a related feature request about disabling the existing behavior of lowercasing all credential pair keys, because there are some situations where case sensitivity for keys would be useful for me.)

@ryan-lane
Copy link
Contributor

The reason is mostly to ensure keys can be used as environment variables, but you're right in that it limits other use-cases. Let's add some config options for this. A regex for allowed chars would be good, with the default regex being set for valid environment variables. If we expose the regex to the angular interface we can also disable the code that forces chars to lowercase, since it'll show a warning dialog for invalid chars.

doy-stripe added a commit to stripe-archive/confidant that referenced this issue Dec 29, 2016
temporary until a real solution for
lyft#103 lands, since i don't have
time to write a full implementation at the moment
@ryan-lane ryan-lane changed the title Do not allow spaces and other special characters for keys Add a CREDENTIAL_KEY_FORMAT_REGEX setting Jan 13, 2017
@ryan-lane
Copy link
Contributor

By adding a CREDENTIAL_KEY_FORMAT_REGEX setting, we can restrict the key format based on a regex, where the default would be the current format. To have no enforcement, the regex could be '/.*/'.

doy-stripe added a commit to stripe-archive/confidant that referenced this issue Aug 17, 2017
temporary until a real solution for
lyft#103 lands, since i don't have
time to write a full implementation at the moment
@jrosco
Copy link

jrosco commented Dec 5, 2017

Hi, Will this be implemented anytime soon? I would find this useful also.

@ryan-lane
Copy link
Contributor

We don't have this planned for the next quarter, but this is up for grabs if you'd like to take it. I might get some spare time in the next quarter to do this as unplanned work otherwise.

hans-stripe pushed a commit to stripe-archive/confidant that referenced this issue Feb 22, 2019
temporary until a real solution for
lyft#103 lands, since i don't have
time to write a full implementation at the moment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants