Skip to main content
In this guide, you’ll enable and configure the Consul ACL system to secure your service mesh. By default, Consul ACLs are disabled. We’ll update the agent configuration on both server nodes, restart the agents, verify cluster membership, and bootstrap the ACL subsystem.
Consul ACLs are disabled out of the box. Enabling them enforces access control for API requests, service registrations, and key/value operations.

Prerequisites

  • Two Consul server nodes:
    • consul-node-a (10.0.101.110)
    • consul-node-b (10.0.101.248)
  • SSH access to each node
  • Consul 1.9+ installed and running without ACLs

1. Update Configuration on consul-node-a

  1. SSH into consul-node-a:
  2. Backup and open the Consul HCL file:
  3. Append or update the following stanzas:
  4. Save and exit (:wq).
  5. Restart the Consul agent:

2. Update Configuration on consul-node-b

Repeat on consul-node-b:
  1. SSH into consul-node-b:
  2. Edit the configuration:
  3. Ensure the file matches this configuration (update bind and advertise addresses):
  4. Save and restart:

3. Verify Cluster Membership

On either server, confirm both nodes are alive:
Expected output:
If a node isn’t listed as alive, check logs with journalctl -u consul and verify network connectivity.

4. Bootstrap the ACL System

Bootstrap the ACL subsystem to generate your initial management token:
Sample output:
  • AccessorID: token identifier
  • SecretID: the token for CLI/API authentication
  • Policies: grants global-management privileges
Because default_policy = "allow", you can still run commands like consul members without specifying -token. If you switch to default_policy = "deny", every request will require a valid token.
Store the SecretID securely. Losing it may lock you out of ACL management. Consider rotating tokens after bootstrapping.

Next Steps

  • Create fine-grained policies to restrict access by service or path.
  • Generate scoped tokens for applications, operators, and CI/CD pipelines.
  • Practice authenticating with ACL tokens:
  • Integrate Consul ACLs with Terraform or Vault for automated policy management.

Watch Video

Practice Lab