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

Support ACL upsert behavior #909

Merged
merged 3 commits into from
May 6, 2015
Merged

Support ACL upsert behavior #909

merged 3 commits into from
May 6, 2015

Conversation

armon
Copy link
Member

@armon armon commented May 6, 2015

Fixes #777. Previously, there was an ACL create endpoint, which did not permit providing an ID and always randomly generated an ID. There was also an update endpoint, which required an ID and that the ACL must exist.

This meant it was not possible to restore tokens (from backup) since the token ID was always re-generated. It also made it difficult to generate an ID external to Consul, which can be useful for systems like Vault.

This PR changes the behavior to an upsert. If an ID is not provided, a random UUID will be generated. Create and Update do not require the ACL to exist already, allowing for ACL restoration or external generation.

This should not break any existing clients, but enables some new use cases. However, there is basically no difference between create and update, but the endpoints must exist for backwards compatibility reasons.

@ryanbreen
Copy link
Contributor

LGTM! And as someone managing a largish deployment, this is a huge win for DR. It's much easier to reassert a set of ACLs than to update tokens on all clients.

@keithchambers
Copy link

Nice! We struggled with this too.

armon added a commit that referenced this pull request May 6, 2015
Support ACL upsert behavior
@armon armon merged commit f3a8f90 into master May 6, 2015
@armon armon deleted the f-create branch May 6, 2015 18:22
duckhan pushed a commit to duckhan/consul that referenced this pull request Oct 24, 2021
* update changelog for tproxy connect refactor

Co-authored-by: Iryna Shustava <ishustava@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.

Add API endpoint for restoring ACL tokens
3 participants