consul.api.acl package¶
Submodules¶
- consul.api.acl.auth_method module
- consul.api.acl.binding_rule module
- consul.api.acl.policy module
- consul.api.acl.role module
- consul.api.acl.templated_policy module
- consul.api.acl.token module
Module contents¶
- class consul.api.acl.ACL(agent)[source]¶
Bases:
object- bootstrap(bootstrap_secret=None)[source]¶
Performs a one-time bootstrap of the ACL system, creating the initial management token. Only succeeds once per cluster; fails with ACLPermissionDenied if already bootstrapped. Requires no token. :param bootstrap_secret: Optional pre-generated SecretID for the bootstrap token
(supported on newer Consul versions; omit to let Consul generate one).
- login(auth_method, bearer_token, meta=None)[source]¶
Exchanges an auth method bearer token for a newly-created Consul ACL token. Requires no token; the bearer token itself is validated against auth_method. :param auth_method: The name of the auth method to authenticate against. :param bearer_token: The bearer token to present to the auth method (e.g. a Kubernetes
service account token or a signed JWT).