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

Extend JWT authenticator per rule config with global config #255

Closed
piotrmsc opened this issue Sep 18, 2019 · 1 comment
Closed

Extend JWT authenticator per rule config with global config #255

piotrmsc opened this issue Sep 18, 2019 · 1 comment
Assignees
Labels
feat New feature or request.
Milestone

Comments

@piotrmsc
Copy link

piotrmsc commented Sep 18, 2019

Is your feature request related to a problem? Please describe.

Allow users to define global config for JWT authenticator on per rule level.
Users have to first setup global config in oathkeeper with JWKS urls and then they can create access rules enabling authentication using provided keys.
Imagine a flow where user would like to have JWT authentication against google and facebook IDP in the same service for 2 different endpoints. It is possible but requires user to interact with global config first, before creating access rules for endpoints.

Describe the solution you'd like

Per rule config will be extended with global config fields with a fallback. If per rule config does not contain ie. jwks_urls, authenticator is looking in global config for those properties.

This way user can dynamically register multiple IDPs on services or paths without interacting with global oathkeeper config.

Describe alternatives you've considered

Additional context

Example rule :


{
  "id": "some-id",
  "upstream": {
    "url": "http://my-backend-service"
  },
  "match": {
    "url": "http://my-app/some-route",
    "methods": [
      "GET"
    ]
  },
  "authenticators": [{
  "handler": "jwt",
  "config": {
    jwks_urls: [
       "https://my-website.com/.well-known/jwks.json"
   ],
   "scope_strategy": "none"
    "required_scope": ["scope-a", "scope-b"],
    "target_audience": [
      "https://my-service.com/api/users",
      "https://my-service.com/api/devices"
    ],
    "trusted_issuers": ["https://my-issuer.com/"],
    "allowed_algorithms": ["RS256", "RS256"]
  }
}
  ],
  "authorizer": { "handler": "allow" },
  "mutator": { "handler": "noop" }
}

Add any other context or screenshots about the feature request here.

/cc @aeneasr

@aeneasr aeneasr self-assigned this Sep 18, 2019
@aeneasr aeneasr added the feat New feature or request. label Sep 18, 2019
@aeneasr aeneasr added this to the v0.19.0 milestone Sep 18, 2019
@aeneasr
Copy link
Member

aeneasr commented Nov 7, 2019

I forgot to close this issue - this has long been resolved.

@aeneasr aeneasr closed this as completed Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request.
Projects
None yet
Development

No branches or pull requests

2 participants