open-consul/command
Matt Keeler 99e0a124cb
New ACLs (#4791)
This PR is almost a complete rewrite of the ACL system within Consul. It brings the features more in line with other HashiCorp products. Obviously there is quite a bit left to do here but most of it is related docs, testing and finishing the last few commands in the CLI. I will update the PR description and check off the todos as I finish them over the next few days/week.
Description

At a high level this PR is mainly to split ACL tokens from Policies and to split the concepts of Authorization from Identities. A lot of this PR is mostly just to support CRUD operations on ACLTokens and ACLPolicies. These in and of themselves are not particularly interesting. The bigger conceptual changes are in how tokens get resolved, how backwards compatibility is handled and the separation of policy from identity which could lead the way to allowing for alternative identity providers.

On the surface and with a new cluster the ACL system will look very similar to that of Nomads. Both have tokens and policies. Both have local tokens. The ACL management APIs for both are very similar. I even ripped off Nomad's ACL bootstrap resetting procedure. There are a few key differences though.

    Nomad requires token and policy replication where Consul only requires policy replication with token replication being opt-in. In Consul local tokens only work with token replication being enabled though.
    All policies in Nomad are globally applicable. In Consul all policies are stored and replicated globally but can be scoped to a subset of the datacenters. This allows for more granular access management.
    Unlike Nomad, Consul has legacy baggage in the form of the original ACL system. The ramifications of this are:
        A server running the new system must still support other clients using the legacy system.
        A client running the new system must be able to use the legacy RPCs when the servers in its datacenter are running the legacy system.
        The primary ACL DC's servers running in legacy mode needs to be a gate that keeps everything else in the entire multi-DC cluster running in legacy mode.

So not only does this PR implement the new ACL system but has a legacy mode built in for when the cluster isn't ready for new ACLs. Also detecting that new ACLs can be used is automatic and requires no configuration on the part of administrators. This process is detailed more in the "Transitioning from Legacy to New ACL Mode" section below.
2018-10-19 12:04:07 -04:00
..
acl New ACLs (#4791) 2018-10-19 12:04:07 -04:00
agent Connect Envoy Command (#4735) 2018-10-10 16:55:34 +01:00
catalog Exit with error code 1 when failing to list DCs (#4583) 2018-09-12 09:55:02 -07:00
connect merge feedback: fix typos; actually use deliverLatest added previously but not plumbed in 2018-10-10 16:55:34 +01:00
debug New command: consul debug (#4754) 2018-10-19 08:41:03 -07:00
event commands: get HTTP API flags for usage automatically 2017-10-18 00:08:45 +02:00
exec Address flakiness in command/exec tests (#4517) 2018-08-10 15:04:07 -04:00
flags replace old fork of text package (#4501) 2018-08-14 12:23:18 -07:00
forceleave commands: get HTTP API flags for usage automatically 2017-10-18 00:08:45 +02:00
helpers Move data source loading into a command helpers function 2018-05-24 10:34:08 -04:00
info commands: get HTTP API flags for usage automatically 2017-10-18 00:08:45 +02:00
intention Fix unreachable code warning from go vet 2018-06-25 12:24:15 -07:00
join commands: get HTTP API flags for usage automatically 2017-10-18 00:08:45 +02:00
keygen commands: get HTTP API flags for usage automatically 2017-10-18 00:08:45 +02:00
keyring commands: get HTTP API flags for usage automatically 2017-10-18 00:08:45 +02:00
kv Merge pull request #4194 from hashicorp/fix-kv-del-validation 2018-06-05 16:58:14 +01:00
leave commands: get HTTP API flags for usage automatically 2017-10-18 00:08:45 +02:00
lock Improve reliability of tests with TestAgent (#4525) 2018-08-14 12:08:33 -04:00
maint [Security] Add finer control over script checks (#4715) 2018-10-11 13:22:11 +01:00
members commands: cleanup init 2017-10-18 02:39:10 +02:00
monitor Spelling (#3958) 2018-03-19 16:56:00 +00:00
operator Fixed flaky tests (#4626) 2018-09-04 12:31:51 +01:00
reload commands: get HTTP API flags for usage automatically 2017-10-18 00:08:45 +02:00
rtt Fixed unstable test TestRTTCommand_LAN in command/rtt (#4585) 2018-08-27 11:37:13 -04:00
services Fix up tests broken by master merge; add proxy tests to services command (and fix it!); actually run the proxycfg.Manager 2018-10-10 16:55:34 +01:00
snapshot Spelling (#3958) 2018-03-19 16:56:00 +00:00
validate Update make static-assets goal and run format 2018-04-13 09:57:25 -07:00
version commands: run all tests in parallel (again) 2017-10-18 00:08:45 +02:00
watch Add -sidecar-for and new /agent/service/:service_id endpoint (#4691) 2018-10-10 16:55:34 +01:00
commands_oss.go New ACLs (#4791) 2018-10-19 12:04:07 -04:00
registry.go Abandon daemonize for simpler solution (preserving history): 2018-06-25 12:24:10 -07:00