Replies: 5 comments 2 replies
-
You should already be able to link existing policies with the current custom rules label since it's only getting validated as json and then passed directly to the policies in the request. I just tried this and it works fine:
or
Creating re-usable policies for applications would be a bit more involved since you'd have to ensure a policy is created prior to using it and you wouldn't be able to "re-use" it on other endpoints very easily since ordering of labels would be important at that point. |
Beta Was this translation helpful? Give feedback.
-
OK. I will look into that. basically we need a new function to use already existing reusable policys selected with the policy ID. |
Beta Was this translation helpful? Give feedback.
-
I use the
|
Beta Was this translation helpful? Give feedback.
-
#83 (reply in thread) The custom policy rule is very particular about spacing/quoting (and Dockflare stops processing labels if it gets a 400 from the CF API), but you should be able to hook up an existing re-usable policy with the ID services:
whoami:
image: traefik/whoami
container_name: working-sample
labels:
- cloudflare.tunnel.enable=true
- cloudflare.tunnel.hostname=whoami.${DOMAIN}
- cloudflare.tunnel.service=https://whoami.${DOMAIN} # or scheme//host:port if you don't have a proxy in your LAN
- cloudflare.tunnel.access.policy=authenticate
- cloudflare.tunnel.access.custom_rules=[{"id":"b0d71b2b-d023-456a-8066-588269603e8a"}] #83 (comment) The map you've provided does still contain the |
Beta Was this translation helpful? Give feedback.
-
Multiple reusable policies are done like this:
Thank you for this brilliant software :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Created in reference to this issue
When I create access policies with labels in DockFlare, they seem to generate ”legacy” access policies;
As far as I understand, there are reusable ones that are the ”new” ones, but I'm not entirely sure about the implementation of these.
This should be what's required to fetch a reusable policy (to get a hold of its UUID). Or the UUID could just be an input variable for the docker labels.
And this should be the body content added to use one with creating an app with a reusable access policy:
Beta Was this translation helpful? Give feedback.
All reactions