Skip to content

Commit

Permalink
feat: default user profile config
Browse files Browse the repository at this point in the history
  • Loading branch information
NithinKuruba committed Jun 3, 2024
1 parent 4b38a88 commit 0d3d163
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docker/keycloak/Dockerfile-24
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,7 @@ COPY ./configuration/24/keycloak.conf /opt/keycloak/conf

COPY ./configuration/24/quarkus.properties /opt/keycloak/conf

COPY ./configuration/keycloak-default-user-profile.json /tmp

# change these values to point to a running postgres instance
ENTRYPOINT ["/opt/keycloak/bin/kc.sh"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"unmanagedAttributePolicy": "ENABLED",
"attributes": [
{
"name": "username",
"displayName": "${username}",
"permissions": {
"view": ["admin", "user"],
"edit": ["admin", "user"]
},
"validations": {
"length": { "min": 3, "max": 255 },
"username-prohibited-characters": {},
"up-username-not-idn-homograph": {}
}
},
{
"name": "email",
"displayName": "${email}",
"permissions": {
"view": ["admin", "user"],
"edit": ["admin", "user"]
},
"validations": {
"email": {},
"length": { "max": 255 }
}
},
{
"name": "firstName",
"displayName": "${firstName}",
"permissions": {
"view": ["admin", "user"],
"edit": ["admin", "user"]
},
"validations": {
"length": { "max": 255 },
"person-name-prohibited-characters": {}
}
},
{
"name": "lastName",
"displayName": "${lastName}",
"permissions": {
"view": ["admin", "user"],
"edit": ["admin", "user"]
},
"validations": {
"length": { "max": 255 },
"person-name-prohibited-characters": {}
}
}
],
"groups": [
{
"name": "user-metadata",
"displayHeader": "User metadata",
"displayDescription": "Attributes, which refer to user metadata"
}
]
}
1 change: 1 addition & 0 deletions docker/keycloak/configuration/24/keycloak.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ log-file-output=json

# SPIs
spi-login-protocol-openid-connect-legacy-logout-redirect-uri=true
spi-user-profile-declarative-user-profile-config-file=/tmp/keycloak-default-user-profile.json

# cache
cache=ispn
Expand Down

0 comments on commit 0d3d163

Please sign in to comment.