Can I please see a practivcal example for ClaimAssertion? #116
-
I looked at the examples here: https://traefik-oidc-auth.sevensolutions.cc/docs/getting-started/middleware-configuration#claim-assertion but those are all about books and colours. I need a practical example how I would filter in a middleware config to only allow say a user in a specific group to pass. I tried this, but it does not seem to work:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @ovizii Btw: Which provider are you using? Edit: Oh sorry your config is wrong: Authorization:
AssertClaims:
- name: "groups"
allOf: ["admins"] |
Beta Was this translation helpful? Give feedback.
Hi @ovizii
your config looks ok but it requires your token to contain a claim called "groups". If you enable debug logging in the middleware you should see the available claims in the console.
Btw: Which provider are you using?
Depending on your provider, you may need to map this information into your token first.
Edit: Oh sorry your config is wrong: