Skip to content

Commit

Permalink
πŸ§‘β€πŸ’»(keycloak) add siret attribute and mapper to Keycloak
Browse files Browse the repository at this point in the history
We can now find organization data as provided by ProConnect in user_info
  • Loading branch information
Laurent Bossavit authored and Laurent Bossavit committed Dec 23, 2024
1 parent fd2c90f commit c7f23cb
Showing 1 changed file with 58 additions and 2 deletions.
60 changes: 58 additions & 2 deletions docker/auth/realm.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,23 @@
],
"realmRoles": ["user"]
},
{
"username": "marie",
"email": "[email protected]",
"firstName": "Marie",
"lastName": "Devarzy",
"enabled": true,
"attributes": {
"siret": "21580304000017"
},
"credentials": [
{
"type": "password",
"value": "people"
}
],
"realmRoles": ["user"]
},
{
"username": "user-e2e-chromium",
"email": "[email protected]",
Expand Down Expand Up @@ -695,9 +712,17 @@
"webAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister": false,
"webAuthnPolicyPasswordlessAcceptableAaguids": [],
"scopeMappings": [
{
"clientScope": "siret",
"roles": [
"user"
]
},
{
"clientScope": "offline_access",
"roles": ["offline_access"]
"roles": [
"offline_access"
]
}
],
"clientScopeMappings": {
Expand Down Expand Up @@ -947,6 +972,7 @@
"acr",
"roles",
"profile",
"siret",
"email"
],
"optionalClientScopes": [
Expand Down Expand Up @@ -1107,6 +1133,35 @@
}
]
},
{
"id": "eb220fbb-02ac-4105-95a3-727954f6565d",
"name": "siret",
"description": "siret",
"protocol": "openid-connect",
"attributes": {
"include.in.token.scope": "true",
"display.on.consent.screen": "false",
"gui.order": ""
},
"protocolMappers": [
{
"id": "333a4e89-9363-4c36-b56f-79c6b019c6c6",
"name": "siret",
"protocol": "openid-connect",
"protocolMapper": "oidc-usermodel-attribute-mapper",
"consentRequired": false,
"config": {
"aggregate.attrs": "false",
"userinfo.token.claim": "true",
"multivalued": "false",
"user.attribute": "siret",
"id.token.claim": "true",
"access.token.claim": "true",
"claim.name": "siret"
}
}
]
},
{
"id": "af52ccc3-4ecb-49b4-9a67-5d4172f16070",
"name": "role_list",
Expand Down Expand Up @@ -1573,7 +1628,8 @@
"email",
"roles",
"web-origins",
"acr"
"acr",
"siret"
],
"defaultOptionalClientScopes": [
"offline_access",
Expand Down

0 comments on commit c7f23cb

Please sign in to comment.