WIP: Consul ACLs #117
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
new feature
project
monitoring
project
simulacrum
question
security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
privatevoid.net/depot!117
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "pr-consul-acl"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -31,0 +51,4 @@script = ''while ! test -e /run/locksmith/consul-systemManagementToken; doecho Waiting for System Management Tokensystemctl start locksmith.serviceFind a way to make Locksmith work better while bootstrapping. Polling like this is pretty fucked up. Maybe there should be a proper "Consul is ready without SMT" level and Locksmith and the Chant Listener should be configured to work with that level.
@ -31,0 +55,4 @@sleep 5doneexport CONSUL_HTTP_TOKEN_FILE=/run/locksmith/consul-systemManagementTokenconsul acl set-agent-token default "$(< /run/locksmith/consul-systemManagementToken)" # TODO: don't leak token on cmdlineSetting the default token means it's no longer required to present a token when connecting to this agent. Should probably limit this to automatic actions only (
dns,replicationtoken types?)@ -52,2 +52,4 @@};};systemd.targets.consul-ready = {This entire thing is ugly
@ -12,3 +8,3 @@nodes = [ n for n in machines if n != nowhere ]for machine in nodes:machine.succeed("systemctl start consul-ready.service")machine.succeed("systemctl start consul-ready.target")ugly
@ -46,2 +46,2 @@Requires=consul-ready.serviceAfter=consul-ready.serviceRequires=consul-ready.targetAfter=consul-ready.targetugly
@ -12,6 +12,7 @@ letconsulRegisterScript = pkgs.writeShellScript "consul-register" ''export CONSUL_HTTP_ADDR='${consulHttpAddr}'export CONSUL_HTTP_TOKEN_FILE=/run/locksmith/consul-systemManagementTokenThis should definitely be statically optional, i.e. can disable ACL support in this module.
This should probably be dynamically optional, i.e. check for the existence of the token file first. This could be useful for registering and/or running distributed Consul services before the ACL bootstrap is complete.
@ -84,2 +86,2 @@after = [ "consul-ready.service" ];requires = [ "consul-ready.service" ];after = [ "consul-ready.target" ];requires = [ "consul-ready.target" ];ugly
28169a8bd7toca8d7cbe30View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.