forked from TykTechnologies/tyk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JWT scope-policy mapping support added (TykTechnologies#1943)
added changes for TykTechnologies#1834 for JWT middle-ware: 1. There is a new field `jwt_scope_to_policy_mapping ` in API definition (payload in endpoint to create API as well) - which is just mapping scope-to-policy_id 2. If this field is present then session key associated with the given JWT will be assigned to several policies using provided mapping 3. base-policy JWT claim logic still works for backward compatibility 4. policies mapped to JWT scope should follow recently implemented rules around `per_api` partitions flag - they shouldn't have the same API id in ACL and might specify limit on API level per API in ACL for open ID middle-ware: 1. the idea is that UI will provide choice to user in dialog where we setup issuer/provider - use old implementation with client_id->policy_id pair Or use mapping scope->policy (but not both) 2. if use mapping scope->policy selected we ask values for two new fields `scope_field_name` and `scope_to_policy_mapping` 3. on tyk side - if `scope_field_name` and `scope_to_policy_mapping` are populated it acts as a trigger to use new logic for scope->policy mapping, if those fields are empty it tries to use old logic with client_id->policy_id pair 4. policies mapped to JWT scope should follow recently implemented rules around `per_api` partitions flag - they shouldn't have the same API id in ACL and might specify limit on API level per API in ACL We should also re-vendor `tyk/apidef` in dashboard (new fields) if we go forward with that approach
- Loading branch information
Showing
7 changed files
with
315 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.