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

CVE-2020-12797: Legacy ACL Token Permission Enforcement #8047

Conversation

hanshasselberg
Copy link
Member

@hanshasselberg hanshasselberg commented Jun 8, 2020

Summary

Consul doesn't enforce changes to legacy ACL tokens rules due to not being propagated to secondary data centers.

Background

When configured to operate in multiple datacenters, Consul will have one of those datacenters act as the primary, while all the rest act as secondary datacenters. All policies, roles, globally scoped tokens and legacy ACLs (pre–1.4.0) can only be created in the primary datacenter, and then replicated to the secondary datacenters.

When using the legacy APIs to create or update legacy ACLs, an internal conversion process does not compute a necessary field. Due to this, when replicating legacy token updates, changes to a legacy ACL tokens rules will not be propagated to a secondary datacenter.

Remediation

Steps to remediate:

  • Update to Consul v1.7.4 or v1.6.6

Alternatively, potential mitigations include:

  • Disable token replication in secondary DCs. If token replication isn’t enabled all token resolution will be made against the primary DC which will always have the correct information.
  • Delete + Recreate the token instead of updating it in the primary. The first time the token is replicated, it happens correctly.

…h computed

This allows new style token replication to work for legacy tokens as well when they change.
Copy link
Member

@mkeeler mkeeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hanshasselberg hanshasselberg merged commit 98eea08 into hashicorp:master Jun 8, 2020
@hanshasselberg hanshasselberg deleted the bugfix/legacy-token-replication branch June 8, 2020 19:44
hanshasselberg added a commit that referenced this pull request Jun 8, 2020
* Fixes #5606: Tokens converted from legacy ACLs get their Hash computed

This allows new style token replication to work for legacy tokens as well when they change.

* tests: fix timestamp comparison

Co-authored-by: Matt Keeler <mjkeeler7@gmail.com>
hanshasselberg added a commit that referenced this pull request Jun 8, 2020
)

This allows new style token replication to work for legacy tokens as well when they change.
Fixes #5606
@hanshasselberg hanshasselberg changed the title Tokens converted from legacy ACLs get their Hash computed CVE-2020-12797: Legacy ACL Token Permission Enforcement Jun 10, 2020
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.

2 participants