open-consul/lib
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
..
file ACL Token Persistence and Reloading (#5328) 2019-02-27 14:28:31 -05:00
freeport Bumps freeport's block size. 2017-11-29 18:33:14 -08:00
semaphore connect: tame thundering herd of CSRs on CA rotation (#5228) 2019-01-22 17:19:36 +00:00
cluster.go Update cluster.go 2017-10-30 16:51:28 -07:00
cluster_test.go Integer division rounding to zero for rate scaling 2017-10-30 16:46:11 -07:00
eof.go Makes RPC handling more robust when rolling servers. (#3561) 2017-10-10 15:19:50 -07:00
math.go Add lib.AbsInt() helper function 2016-03-30 11:47:37 -07:00
math_test.go Add lib.AbsInt() helper function 2016-03-30 11:47:37 -07:00
path.go Adds basic support for node IDs. 2017-01-17 22:47:59 -08:00
rand.go Use a cryptographically secure seed 2016-05-02 23:52:37 -07:00
rtt.go remove golint warnings 2018-01-28 22:40:13 +04:00
rtt_test.go remove golint warnings 2018-01-28 22:40:13 +04:00
serf.go New ACLs (#4791) 2018-10-19 12:04:07 -04:00
stop_context.go New ACLs (#4791) 2018-10-19 12:04:07 -04:00
string.go Cull unused function and its unit test. 2016-02-01 22:40:19 -08:00
string_test.go Cull unused function and its unit test. 2016-02-01 22:26:57 -08:00
telemetry.go Refactor to use embedded struct. 2018-06-25 12:25:39 -07:00
telemetry_test.go Refactor to use embedded struct. 2018-06-25 12:25:39 -07:00
useragent.go Add a helper for generating Consul's user-agent string 2018-05-25 15:50:18 -04:00
useragent_test.go Add a helper for generating Consul's user-agent string 2018-05-25 15:50:18 -04:00
uuid.go New ACLs (#4791) 2018-10-19 12:04:07 -04:00