...
Code Block | ||
---|---|---|
| ||
- authority-name: GrantedAuthorityNameToBeAssigned claim-value-condition: claims: token_claim_name_one,token_claim_name_two values: expected_value_one,expected_value_two |
Which can be translated to:
If token claims contains any of the next keys:
token_claim_name_one
ORtoken_claim_name_two
, and the value equals any ofexpected_value_one
ORexpected_value_two
then request will get theGrantedAuthorityNameToBeAssigned
as Granted Authority.
Sample configurations:
Code Block | ||
---|---|---|
| ||
oauth2: resource-server: authorization: rule-based-authorities: - authority-name: modelopEngineOnlyModelManage claim-value-condition: claims: user_id,client_id values: model-manage - authority-name: modelopEngineOnlyModelManageAndMlc claim-value-condition: claims: user_id,client_id values: model-manage,mlc-service - authority-name: modelop-monitor claim-value-condition: claims: user_id,client_id values: model-manage,mlc-service |
...