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

[WIP] New ACLs #4791

Merged
merged 85 commits into from
Oct 19, 2018
Merged
Changes from 1 commit
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
da69a11
Update docs to include multiple tag support (#4797)
Oct 19, 2018
92183c9
New ACL System
mkeeler Sep 28, 2018
f40b475
Implement legacy flag in HTTP response and add CreateTime to tokens
mkeeler Oct 1, 2018
794acd4
Fix a segfault in ACLTokenRead
mkeeler Oct 1, 2018
c426178
Allow missing accessor id and secret id for token updates
mkeeler Oct 1, 2018
1332f72
Implement acl version advertisement via serf tags
mkeeler Oct 2, 2018
daf9d61
Minor change to get rid of name conflict.
mkeeler Oct 2, 2018
f59054a
Refactor of the serf tag helpers
mkeeler Oct 2, 2018
27875e0
Get rid legacy state store functions
mkeeler Oct 2, 2018
51a7dd6
Initial Token Auto-Upgrade
mkeeler Oct 4, 2018
fc18af0
Dont attempt to use a nil SerfWAN on the server
mkeeler Oct 4, 2018
fef484f
Implement legacy token upgrade
mkeeler Oct 4, 2018
b266efc
Update memdb vendoring
mkeeler Oct 8, 2018
c0a1cd6
Updates to the HTTP APIs
mkeeler Oct 8, 2018
f61d574
Remove unused import
mkeeler Oct 8, 2018
27503a9
acl list endpoints never return nil
mkeeler Oct 8, 2018
074bc69
Fixup the token clone endpoint and a few other internal changes
mkeeler Oct 9, 2018
ab97009
Initial acl replication
mkeeler Oct 10, 2018
9a5f764
Make sure to only list global tokens for replication
mkeeler Oct 10, 2018
18da312
A couple build system fixes
mkeeler Oct 10, 2018
d9fc6a1
Policy replication working
mkeeler Oct 11, 2018
fccc1ea
Replication Working!
mkeeler Oct 12, 2018
60590d8
ACL CLI
mkeeler Oct 12, 2018
fe6bca6
ACL Token CLI implementation.
mkeeler Oct 13, 2018
03583cd
Update 1.3 code for new ACLs
mkeeler Oct 15, 2018
612dc6c
Update some missing CLI help descriptions.
mkeeler Oct 15, 2018
816eb84
New StopChannelContext that implements the context.Context interface
mkeeler Oct 15, 2018
88c7e63
Addressed most of the TODOS and a few misc. issues
mkeeler Oct 15, 2018
a38eef1
fnv -> blake2b for hashing
mkeeler Oct 15, 2018
2228fb7
Default ACLDatacenter to the primary Datacenter.
mkeeler Oct 16, 2018
8f53e9b
Add some more acl Authorizer tests
mkeeler Oct 16, 2018
8b937e8
Finish up ACL unit tests
mkeeler Oct 16, 2018
36e2f3b
Fix primary datacenter config builder
mkeeler Oct 16, 2018
e6324ff
PR fixes
mkeeler Oct 16, 2018
49d2ec9
Use config struct when creating an ACLResolver
mkeeler Oct 16, 2018
149cf99
comment about rate.Limit semantics
mkeeler Oct 16, 2018
8a647d4
finish comment
mkeeler Oct 16, 2018
9662497
Use a Context instead of creating stopCh ourself for ACL replication/…
mkeeler Oct 16, 2018
983dd52
Add some comments about the bootstrap override
mkeeler Oct 16, 2018
3e10a74
Add some comments and change some var names about async token/policy …
mkeeler Oct 16, 2018
ee6e158
Add some more general comments about the bootstrap reset
mkeeler Oct 16, 2018
38beffa
More async resolve comments
mkeeler Oct 16, 2018
bd8a319
Remove the rateLimit const as it is now in the agent config.
mkeeler Oct 16, 2018
9538ce4
Change acl.token_replication to acl.enable_token_replication
mkeeler Oct 16, 2018
dcd7b37
Fixing tests and bugs
mkeeler Oct 16, 2018
a5e7c97
Fix a few issues
mkeeler Oct 16, 2018
502d5f6
Fixup the TestACL_Bootstrap test
mkeeler Oct 16, 2018
2218499
Rewrite agent/acl_test.go
mkeeler Oct 16, 2018
178effc
Implement tests for the Policy CRUD endpoints
mkeeler Oct 17, 2018
284d478
Finish up the ACL HTTP testing
mkeeler Oct 17, 2018
42d879a
Get rid of a couple todos and move some test code.
mkeeler Oct 17, 2018
e2f7441
Implement ACLToken struct tests.
mkeeler Oct 17, 2018
0b3d374
Get rid of ACLToken.IsSame and ACLPolicy.IsSame
mkeeler Oct 17, 2018
d04ad34
Finish up the ACLPolicy struct testing.
mkeeler Oct 17, 2018
595334d
Start Implementing the acl cache tests.
mkeeler Oct 17, 2018
02646e4
Don’t assume global mgmt policy for unupgraded management tokens
mkeeler Oct 17, 2018
2748fd2
Fix a bunch of consul pkg tests
mkeeler Oct 17, 2018
5275a4a
Fix the bootstrap test
mkeeler Oct 17, 2018
23a87b5
Fix usage of the ACL Down Policy
mkeeler Oct 17, 2018
e16a5f5
Get TestACLReplication working
mkeeler Oct 17, 2018
ca540ab
Fix a few more tests.
mkeeler Oct 17, 2018
1d93a8b
Return acl.ErrNotFound if policy/token isn’t in local store but would…
mkeeler Oct 18, 2018
1cf16c4
Fix some bootstrap tests
mkeeler Oct 18, 2018
6cc447a
Get rid of double acl init
mkeeler Oct 18, 2018
5ca52a8
Make sure to init the map
mkeeler Oct 18, 2018
5edb06a
ACLResolver tests
mkeeler Oct 18, 2018
0e77b9f
Implement ACLResolver legacy tests
mkeeler Oct 18, 2018
3ce2ab1
Update some more struct tests
mkeeler Oct 18, 2018
78817d9
Fix global-management policy
mkeeler Oct 18, 2018
089db9a
ACL V2 CRUD RPC testing (#4815)
pearkes Oct 18, 2018
d8aa31b
Request policy ids
mkeeler Oct 18, 2018
8faf670
Legacy FSM tests working
mkeeler Oct 18, 2018
2ab1b7d
Implement snapshot save/restore tests
mkeeler Oct 18, 2018
f4bf435
Handle deleting a non-existant token.
mkeeler Oct 18, 2018
8bf2b1f
Fix bootstrapping
mkeeler Oct 18, 2018
b05ea71
ACL V2 RPC additional RPC tests (#4816)
pearkes Oct 18, 2018
3501651
Add a few easy acl replication tests
mkeeler Oct 18, 2018
577abdc
Change how we determine the ACL DC and if ACLs are enabled.
mkeeler Oct 19, 2018
c1cc982
[WIP] ACL V2 CLI Tests (#4817)
pearkes Oct 19, 2018
65ec4ed
Fix json + mapstructure decoding issue.
mkeeler Oct 19, 2018
9a1c335
Add state store snapshot/restore tests for tokens and policies
mkeeler Oct 19, 2018
f5742f9
Update lots of tests
mkeeler Oct 19, 2018
b54033e
Prevent legacy endpoints from blowing away some new token data.
mkeeler Oct 19, 2018
95bdb8a
API test fixup
mkeeler Oct 19, 2018
755005d
Fix the last few existing unit tests.
mkeeler Oct 19, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Refactor of the serf tag helpers
  • Loading branch information
mkeeler committed Oct 19, 2018
commit f59054a763f2b9e18f5bf5094ce733d3ab42578c
12 changes: 9 additions & 3 deletions lib/serf.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,17 @@ func SerfDefaultConfig() *serf.Config {
return base
}

func UpdateSerfTag(serf *serf.Serf, tag, value string) {
func GetSerfTags(serf *serf.Serf) map[string]string {
tags := make(map[string]string)
for k, v := range serf.LocalMember().Tags {
tags[k] = v
for tag, value := range serf.LocalMember().Tags {
tags[tag] = value
}

return tags
}

func UpdateSerfTag(serf *serf.Serf, tag, value string) {
tags := GetSerfTags(serf)
tags[tag] = value

serf.SetTags(tags)
Expand Down