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

/auth/approle/role/:role_name input and output formats inconsistent #3147

Closed
CVTJNII opened this issue Aug 11, 2017 · 2 comments
Closed

/auth/approle/role/:role_name input and output formats inconsistent #3147

CVTJNII opened this issue Aug 11, 2017 · 2 comments

Comments

@CVTJNII
Copy link

CVTJNII commented Aug 11, 2017

Good day:

Currently the input and output formatting of the /auth/approle/role/:role_name endpoint is inconsistent. When creating an approle at /auth/approle/role/:role_name the policies are a comma separated list, of the form 'policy1,policy2'. However, when reading from the endpoint policies are returned as a JSON array, in the form ["policy1", "policy2"]. This is troublesome as configuration tooling needs to handle the different formatting when comparing desired state to state in Vault to know if changes are required.

Please modify the /auth/approle/role/:role_name endpoint to use the same input and output formats. Thanks.

@CVTJNII
Copy link
Author

CVTJNII commented Aug 11, 2017

I had originally requested this as a API v2 improvement in #3146 as I'm not sure how to do this in a backwards compatible manner. A format flag perhaps?

@jefferai
Copy link
Member

It's actually supportable now, the field just has to have its type modified to enable it. (TypeString->TypeCommaStringSlice on line 116 of path_role.go).

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

2 participants