busy-nightfall-54147
02/28/2025, 1:46 PMbusy-nightfall-54147
02/28/2025, 1:47 PMauthenticators:
anonymous:
enabled: true
config:
subject: guest
bearer_token:
enabled: true
config:
check_session_url: <http://disabled>
oauth2_introspection:
enabled: true
config:
introspection_url: <http://localhost:4445/admin/oauth2/introspect>
token_from:
header: Authorization
retry:
max_delay: 300ms
give_up_after: 2s
cache:
enabled: true
ttl: 60s
introspection_request_headers:
Authorization: "thisIsEnvironmentSpecific"
---
Rule Template
- id: $ENVIRONMENT
match:
url: "$API_SERVICE_URL/<.*>"
methods:
- GET
- PATCH
- POST
- PUT
- DELETE
authenticators:
- handler: oauth2_introspection
config:
introspection_url: "$HYDRA_ADMIN_URL/admin/oauth2/introspect"
token_from:
header: Authorization
retry:
max_delay: 300ms
give_up_after: 2s
cache:
enabled: true
ttl: 60s
introspection_request_headers:
Authorization: "Bearer $ORY_NETWORK_PROJECT_API_KEY"
authorizer:
handler: allow
mutators:
- handler: noop
errors:
- handler: json
Traefik Middleware Definition:
extraObjects:
- |
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: ory-oathkeeper-forward-auth
spec:
forwardAuth:
address: <http://acme-api-ory-oathkeeper-api>.{{ .Release.Namespace }}:4456/decisions
trustForwardHeader: true
authResponseHeaders:
- Authentication