Enable ACL's and Generate Token - consul-bootstrap-acl-token

Hi all, probably a silly question but i’ll fire away… i’m learning Consul and spun up a cluster in MiniKube and got everything stable via a helm chart. I’m trying to enable ACL’s as they are disabled in the UI along with tokens, polices, roles and auth (currently showing a 403 error)

I’ve tried to retrieve the bootstrap token that has full permissions but it doesn’t exist.

I’ve enabled the secure config in the values.yaml and upgraded via the Helm chart.

Does anyone know how to generate a token for - consul-bootstrap-acl-token?

Cheers
Garry

kubectl get secrets/consul-bootstrap-acl-token --template={{.data.token}} | base64 -d should fetch the consul-bootstrap-acl-token.

Thanks for the reply.

I tried that, it doesnt exist

Error from server (NotFound): secrets “consul-bootstrap-acl-token” not found

Should the bootstrap token be generated at the install process, i wonder if i’ve missed something.

What does your values.yaml file look like?

Here you go, thanks

global:
  name: consul
  datacenter: dc1
  gossipEncryption:
    secretName: "consul-gossip-encryption-key"
    secretKey: "key"
  tls:
    enabled: true
    enableAutoEncrypt: true
    verify: true
  acls:
    manageSystemACLs: true
  metrics:
    enabled: true
    enableAgentMetrics: true
client:
  enabled: true
  grpc: true
server:
  replicas: 1
ui:
  enabled: true
  service:
    type: 'NodePort'
connectInject:
  enabled: true
  default: true
controller:
  enabled: true
prometheus:
  enabled: true
grafana:
  enabled: true

I’ve managed to generate the secret for consul-bootstrap-acl-token by adding these elements to the values.yaml file

acls:
manageSystemACLs: true
enabled: true
default_policy: “deny”
enable_token_persistence: true

And kubectl get secrets/consul-bootstrap-acl-token --template={{.data.token}} | base64 -d returns the token, happy days.

1 Like