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

Policy for token in consul for fabio #667

Open
tomaprzem opened this issue Jun 21, 2019 · 1 comment
Open

Policy for token in consul for fabio #667

tomaprzem opened this issue Jun 21, 2019 · 1 comment

Comments

@tomaprzem
Copy link

tomaprzem commented Jun 21, 2019

I have implemented Consul 1.5.1 with options: acl_enable = true and default_policy = deny.
I would like to create a policy and token for fabio.
What should the policy configuration look like?
I tested several configurations and always got errors
"[WARN] Error initializing backend. Unexpected response code: 403 (Permission denied)"
I know that master token works correctly.
Fabio version is 1.5.11 in docker.

@scalp42
Copy link

scalp42 commented Jul 5, 2019

@tomaprzem our current policy for an environment called dev-usw2-dev1:

node_prefix {
  "" {
    policy = "read"
  }
}
service {
  fabio {
    policy = "write"
  }
}
service_prefix {
  "" {
    policy = "write"
  }
}
key_prefix {
  "fabio/dev-usw2-dev1" {
    policy = "write"
  }
}
key {
  "fabio/noroute.html" {
    policy = "write"
  }
}
agent {
  "fabio-i-09e2f4e889c35818b" {
    policy = "read"
  }
}

Hopefully it helps.

It can be probably be tweaked as you're allowing Fabio to register any kind of service, might want to restrict per env for example with a service prefix like "dev".

This is not a concern for us but YMMV. Please make sure you understand the policy carefully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants