Can routes be restricted to specific consumers ? #12783
Unanswered
shubhshah01
asked this question in
Help
Replies: 1 comment
-
Hi @shubhshah01. Treat the _format_version: "3.0"
services:
- name: example-service
url: http://httpbin.org
routes:
- name: example-route
paths:
- "/foo"
plugins:
- name: jwt
- name: acl
config:
allow:
- "consumer-allowed-group"
consumers:
- username: consumer-1
jwt_secrets:
- key: "consumer-1-key"
algorithm: "HS256"
secret: "consumer-1-secret"
- username: consumer-2
jwt_secrets:
- key: "consumer-2-key"
algorithm: "HS256"
secret: "consumer-2-secret"
- username: consumer-3
jwt_secrets:
- key: "consumer-3-key"
algorithm: "HS256"
secret: "consumer-3-secret"
acls:
- group: "consumer-allowed-group" This example would authenticate all your 3 users, but only allow access to the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently for JWT plugin i can't specify the consumer ID it gives schema violation error.
I have say 3 consumers each with one jwt credentials configured (all 3 JWT credentials are different).
I want a route to be accessible only by 1 of the 3 consumers. When i add JWT plugin to the route, it allows all 3 consumers to access the route.
Say i generated a JWT token for each of the 3 consumers, now the above route is accessible using all 3 tokens. Whereas i need it to be restricted to specific consumers.
Beta Was this translation helpful? Give feedback.
All reactions