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 client flag to allow commas in scope lists? #172

Open
jjg-123 opened this issue Mar 7, 2024 · 1 comment
Open

Add client flag to allow commas in scope lists? #172

jjg-123 opened this issue Mar 7, 2024 · 1 comment

Comments

@jjg-123
Copy link
Contributor

jjg-123 commented Mar 7, 2024

This keeps happening, that a client sends us a wrong list of scopes. The spec states that scopes are blank delimited and that commas may be embedded, so a scope would get turned into

"X,A Y Z" --> ["X,A", "Y", "Z"] // in JSON

is three scopes. A not uncommon error from clients is to use some utility on lists that turns it into a comma-delimited string. So they intend to send "X Y Z" but instead send

"X,Y,Z" --> ["X,Y,Z"]

resulting in a single, large scope that cannot be asserted. We fulfill our contract and assert nothing, then they eventually (and possibly much later) get downstream errors that they do not understand.

Therefore, I propose a flag for the client configuration that rejects lists of scopes that contain commas unless the flag is set true. That is to say, we still process as per spec, but if a scope contains a comma, that raises an error.

@jjg-123 jjg-123 changed the title Add client flag to allow commas in scope lists Add client flag to allow commas in scope lists? Mar 7, 2024
@jjg-123
Copy link
Contributor Author

jjg-123 commented Jun 12, 2024

One additional point here is that vault accepts requests from users for scopes and then processes them. This some times means that we get auto generated scopes like

", foo,bar,baz"
which include the double quotes and commas!!

Therefore, I think that we should probably add this flag for clients

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

No branches or pull requests

1 participant