open-consul/agent/consul
Matt Keeler 0c76a4389f
ACL Token Persistence and Reloading (#5328)
This PR adds two features which will be useful for operators when ACLs are in use.

1. Tokens set in configuration files are now reloadable.
2. If `acl.enable_token_persistence` is set to `true` in the configuration, tokens set via the `v1/agent/token` endpoint are now persisted to disk and loaded when the agent starts (or during configuration reload)

Note that token persistence is opt-in so our users who do not want tokens on the local disk will see no change.

Some other secondary changes:

* Refactored a bunch of places where the replication token is retrieved from the token store. This token isn't just for replicating ACLs and now it is named accordingly.
* Allowed better paths in the `v1/agent/token/` API. Instead of paths like: `v1/agent/token/acl_replication_token` the path can now be just `v1/agent/token/replication`. The old paths remain to be valid. 
* Added a couple new API functions to set tokens via the new paths. Deprecated the old ones and pointed to the new names. The names are also generally better and don't imply that what you are setting is for ACLs but rather are setting ACL tokens. There is a minor semantic difference there especially for the replication token as again, its no longer used only for ACL token/policy replication. The new functions will detect 404s and fallback to using the older token paths when talking to pre-1.4.3 agents.
* Docs updated to reflect the API additions and to show using the new endpoints.
* Updated the ACL CLI set-agent-tokens command to use the non-deprecated APIs.
2019-02-27 14:28:31 -05:00
..
autopilot
fsm Store leaf cert indexes in raft and use for the ModifyIndex on the returned certs (#5211) 2019-01-11 16:04:57 -05:00
prepared_query
state correct some typos 2019-02-13 13:02:12 -06:00
acl.go Merge pull request #4869 from hashicorp/txn-checks 2019-01-22 11:16:09 -08:00
acl_client.go
acl_endpoint.go clarify the ACL.PolicyDelete endpoint (#5337) 2019-02-13 09:16:30 -06:00
acl_endpoint_legacy.go
acl_endpoint_test.go ACL Token Persistence and Reloading (#5328) 2019-02-27 14:28:31 -05:00
acl_replication.go ACL Token Persistence and Reloading (#5328) 2019-02-27 14:28:31 -05:00
acl_replication_legacy.go ACL Token Persistence and Reloading (#5328) 2019-02-27 14:28:31 -05:00
acl_replication_legacy_test.go ACL Token Persistence and Reloading (#5328) 2019-02-27 14:28:31 -05:00
acl_replication_test.go ACL Token Persistence and Reloading (#5328) 2019-02-27 14:28:31 -05:00
acl_server.go ACL Token Persistence and Reloading (#5328) 2019-02-27 14:28:31 -05:00
acl_test.go ACL Token Persistence and Reloading (#5328) 2019-02-27 14:28:31 -05:00
autopilot.go
autopilot_oss.go
autopilot_test.go
catalog_endpoint.go Merge pull request #4869 from hashicorp/txn-checks 2019-01-22 11:16:09 -08:00
catalog_endpoint_test.go Avoid to have infinite recursion in DNS lookups when resolving CNAMEs (#4918) 2019-01-07 16:53:54 -05:00
client.go Centralise tls configuration part 1 (#5366) 2019-02-26 16:52:07 +01:00
client_serf.go
client_test.go
config.go ACL Token Persistence and Reloading (#5328) 2019-02-27 14:28:31 -05:00
connect_ca_endpoint.go connect: tame thundering herd of CSRs on CA rotation (#5228) 2019-01-22 17:19:36 +00:00
connect_ca_endpoint_test.go connect: tame thundering herd of CSRs on CA rotation (#5228) 2019-01-22 17:19:36 +00:00
consul_ca_delegate.go
coordinate_endpoint.go
coordinate_endpoint_test.go
enterprise_client_oss.go
enterprise_server_oss.go oss: add the enterprise server stub for intention replication check 2019-01-18 17:32:10 -08:00
filter.go
filter_test.go
flood.go
health_endpoint.go
health_endpoint_test.go
helper_test.go acl: Prevent tokens from deleting themselves (#5210) 2019-01-10 09:22:51 -05:00
intention_endpoint.go connect: Forward intention RPCs if this isn't the primary 2019-01-22 11:29:21 -08:00
intention_endpoint_test.go
internal_endpoint.go
internal_endpoint_test.go
issue_test.go
kvs_endpoint.go
kvs_endpoint_test.go
leader.go ACL Token Persistence and Reloading (#5328) 2019-02-27 14:28:31 -05:00
leader_oss.go
leader_test.go Avoid to have infinite recursion in DNS lookups when resolving CNAMEs (#4918) 2019-01-07 16:53:54 -05:00
merge.go
merge_test.go
operator_autopilot_endpoint.go
operator_autopilot_endpoint_test.go
operator_endpoint.go
operator_raft_endpoint.go
operator_raft_endpoint_test.go
prepared_query_endpoint.go Improve Connect with Prepared Queries (#5291) 2019-02-04 09:36:51 -05:00
prepared_query_endpoint_test.go Improve Connect with Prepared Queries (#5291) 2019-02-04 09:36:51 -05:00
raft_rpc.go
rpc.go
rpc_test.go
rtt.go
rtt_test.go
segment_oss.go
serf_test.go
server.go Centralise tls configuration part 1 (#5366) 2019-02-26 16:52:07 +01:00
server_lookup.go
server_lookup_test.go
server_oss.go connect: tame thundering herd of CSRs on CA rotation (#5228) 2019-01-22 17:19:36 +00:00
server_serf.go
server_test.go Centralise tls configuration part 1 (#5366) 2019-02-26 16:52:07 +01:00
session_endpoint.go
session_endpoint_test.go
session_timers.go
session_timers_test.go
session_ttl.go
session_ttl_test.go
snapshot_endpoint.go
snapshot_endpoint_test.go
stats_fetcher.go
stats_fetcher_test.go
status_endpoint.go
status_endpoint_test.go
txn_endpoint.go
txn_endpoint_test.go
util.go
util_test.go