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

Enable and Fix keycloak User Registration Config along with defaulting to 'User' group for newly registered users #24765

Merged
merged 3 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"oauth2DevicePollingInterval": 5,
"enabled": true,
"sslRequired": "external",
"registrationAllowed": false,
"registrationAllowed": true,
"registrationEmailAsUsername": false,
"rememberMe": false,
"verifyEmail": false,
Expand Down Expand Up @@ -463,6 +463,9 @@
"requiredCredentials": [
"password"
],
"defaultGroups": [
"/Users"
],
"otpPolicyType": "totp",
"otpPolicyAlgorithm": "HmacSHA1",
"otpPolicyInitialCounter": 0,
Expand Down Expand Up @@ -2373,14 +2376,6 @@
"userSetupAllowed": false,
"autheticatorFlow": false
},
{
"authenticator": "registration-profile-action",
"authenticatorFlow": false,
"requirement": "REQUIRED",
"priority": 40,
"userSetupAllowed": false,
"autheticatorFlow": false
},
{
"authenticator": "registration-password-action",
"authenticatorFlow": false,
Expand All @@ -2396,6 +2391,14 @@
"priority": 60,
"userSetupAllowed": false,
"autheticatorFlow": false
},
{
"authenticator": "registration-terms-and-conditions",
"authenticatorFlow": false,
"requirement": "DISABLED",
"priority": 70,
"autheticatorFlow": false,
"userSetupAllowed": false
}
]
},
Expand Down Expand Up @@ -2487,9 +2490,9 @@
"config": {}
},
{
"alias": "terms_and_conditions",
"alias": "TERMS_AND_CONDITIONS",
"name": "Terms and Conditions",
"providerId": "terms_and_conditions",
"providerId": "TERMS_AND_CONDITIONS",
"enabled": false,
"defaultAction": false,
"priority": 20,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"oauth2DevicePollingInterval": 5,
"enabled": true,
"sslRequired": "external",
"registrationAllowed": false,
"registrationAllowed": true,
"registrationEmailAsUsername": false,
"rememberMe": false,
"verifyEmail": false,
Expand Down Expand Up @@ -463,6 +463,9 @@
"requiredCredentials": [
"password"
],
"defaultGroups": [
"/Users"
],
"otpPolicyType": "totp",
"otpPolicyAlgorithm": "HmacSHA1",
"otpPolicyInitialCounter": 0,
Expand Down Expand Up @@ -2371,14 +2374,6 @@
"userSetupAllowed": false,
"autheticatorFlow": false
},
{
"authenticator": "registration-profile-action",
"authenticatorFlow": false,
"requirement": "REQUIRED",
"priority": 40,
"userSetupAllowed": false,
"autheticatorFlow": false
},
{
"authenticator": "registration-password-action",
"authenticatorFlow": false,
Expand All @@ -2394,6 +2389,14 @@
"priority": 60,
"userSetupAllowed": false,
"autheticatorFlow": false
},
{
"authenticator": "registration-terms-and-conditions",
"authenticatorFlow": false,
"requirement": "DISABLED",
"priority": 70,
"autheticatorFlow": false,
"userSetupAllowed": false
}
]
},
Expand Down Expand Up @@ -2485,9 +2488,9 @@
"config": {}
},
{
"alias": "terms_and_conditions",
"alias": "TERMS_AND_CONDITIONS",
"name": "Terms and Conditions",
"providerId": "terms_and_conditions",
"providerId": "TERMS_AND_CONDITIONS",
"enabled": false,
"defaultAction": false,
"priority": 20,
Expand Down
58 changes: 32 additions & 26 deletions generators/kubernetes/__snapshots__/kubernetes.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2609,7 +2609,7 @@ data:
"oauth2DevicePollingInterval": 5,
"enabled": true,
"sslRequired": "external",
"registrationAllowed": false,
"registrationAllowed": true,
"registrationEmailAsUsername": false,
"rememberMe": false,
"verifyEmail": false,
Expand Down Expand Up @@ -3031,6 +3031,9 @@ data:
"requiredCredentials": [
"password"
],
"defaultGroups": [
"/Users"
],
"otpPolicyType": "totp",
"otpPolicyAlgorithm": "HmacSHA1",
"otpPolicyInitialCounter": 0,
Expand Down Expand Up @@ -3545,7 +3548,7 @@ data:
"redirectUris": [
"http://jhgate.default.example.com/*",
"https://jhgate.default.example.com/*", "http://localhost:8080/*",
"https://localhost:8080/*",
"https://localhost:8080/*",
"http://localhost:8100/*",
"http://127.0.0.1:8761/*",
"http://localhost:9000/*",
Expand All @@ -3554,7 +3557,7 @@ data:
"webOrigins": [
"http://jhgate.default.example.com",
"https://jhgate.default.example.com", "http://localhost:8080",
"https://localhost:8080",
"https://localhost:8080",
"http://localhost:8100",
"http://127.0.0.1:8761",
"http://localhost:9000"
Expand Down Expand Up @@ -4829,14 +4832,6 @@ data:
"userSetupAllowed": false,
"autheticatorFlow": false
},
{
"authenticator": "registration-profile-action",
"authenticatorFlow": false,
"requirement": "REQUIRED",
"priority": 40,
"userSetupAllowed": false,
"autheticatorFlow": false
},
{
"authenticator": "registration-password-action",
"authenticatorFlow": false,
Expand All @@ -4852,6 +4847,14 @@ data:
"priority": 60,
"userSetupAllowed": false,
"autheticatorFlow": false
},
{
"authenticator": "registration-terms-and-conditions",
"authenticatorFlow": false,
"requirement": "DISABLED",
"priority": 70,
"autheticatorFlow": false,
"userSetupAllowed": false
}
]
},
Expand Down Expand Up @@ -4943,9 +4946,9 @@ data:
"config": {}
},
{
"alias": "terms_and_conditions",
"alias": "TERMS_AND_CONDITIONS",
"name": "Terms and Conditions",
"providerId": "terms_and_conditions",
"providerId": "TERMS_AND_CONDITIONS",
"enabled": false,
"defaultAction": false,
"priority": 20,
Expand Down Expand Up @@ -6056,7 +6059,7 @@ data:
"oauth2DevicePollingInterval": 5,
"enabled": true,
"sslRequired": "external",
"registrationAllowed": false,
"registrationAllowed": true,
"registrationEmailAsUsername": false,
"rememberMe": false,
"verifyEmail": false,
Expand Down Expand Up @@ -6478,6 +6481,9 @@ data:
"requiredCredentials": [
"password"
],
"defaultGroups": [
"/Users"
],
"otpPolicyType": "totp",
"otpPolicyAlgorithm": "HmacSHA1",
"otpPolicyInitialCounter": 0,
Expand Down Expand Up @@ -6992,7 +6998,7 @@ data:
"redirectUris": [
"http://jhgate.default.example.com/*",
"https://jhgate.default.example.com/*", "http://localhost:8080/*",
"https://localhost:8080/*",
"https://localhost:8080/*",
"http://localhost:8100/*",
"http://127.0.0.1:8761/*",
"http://localhost:9000/*",
Expand All @@ -7001,7 +7007,7 @@ data:
"webOrigins": [
"http://jhgate.default.example.com",
"https://jhgate.default.example.com", "http://localhost:8080",
"https://localhost:8080",
"https://localhost:8080",
"http://localhost:8100",
"http://127.0.0.1:8761",
"http://localhost:9000"
Expand Down Expand Up @@ -8276,14 +8282,6 @@ data:
"userSetupAllowed": false,
"autheticatorFlow": false
},
{
"authenticator": "registration-profile-action",
"authenticatorFlow": false,
"requirement": "REQUIRED",
"priority": 40,
"userSetupAllowed": false,
"autheticatorFlow": false
},
{
"authenticator": "registration-password-action",
"authenticatorFlow": false,
Expand All @@ -8299,6 +8297,14 @@ data:
"priority": 60,
"userSetupAllowed": false,
"autheticatorFlow": false
},
{
"authenticator": "registration-terms-and-conditions",
"authenticatorFlow": false,
"requirement": "DISABLED",
"priority": 70,
"autheticatorFlow": false,
"userSetupAllowed": false
}
]
},
Expand Down Expand Up @@ -8390,9 +8396,9 @@ data:
"config": {}
},
{
"alias": "terms_and_conditions",
"alias": "TERMS_AND_CONDITIONS",
"name": "Terms and Conditions",
"providerId": "terms_and_conditions",
"providerId": "TERMS_AND_CONDITIONS",
"enabled": false,
"defaultAction": false,
"priority": 20,
Expand Down
2 changes: 1 addition & 1 deletion generators/kubernetes/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export function writeFiles() {
}

this.keycloakRedirectUris += `"http://localhost:${appConfig.composePort}/*",
"https://localhost:${appConfig.composePort}/*", `;
"https://localhost:${appConfig.composePort}/*",`;

if (appConfig.devServerPort !== undefined) {
this.keycloakRedirectUris += `"http://localhost:${appConfig.devServerPort}/*", `;
Expand Down
25 changes: 14 additions & 11 deletions generators/kubernetes/templates/keycloak/keycloak-configmap.yml.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ data:
"oauth2DevicePollingInterval": 5,
"enabled": true,
"sslRequired": "external",
"registrationAllowed": false,
"registrationAllowed": true,
"registrationEmailAsUsername": false,
"rememberMe": false,
"verifyEmail": false,
Expand Down Expand Up @@ -459,6 +459,9 @@ data:
"requiredCredentials": [
"password"
],
"defaultGroups": [
"/Users"
],
"otpPolicyType": "totp",
"otpPolicyAlgorithm": "HmacSHA1",
"otpPolicyInitialCounter": 0,
Expand Down Expand Up @@ -2314,14 +2317,6 @@ data:
"userSetupAllowed": false,
"autheticatorFlow": false
},
{
"authenticator": "registration-profile-action",
"authenticatorFlow": false,
"requirement": "REQUIRED",
"priority": 40,
"userSetupAllowed": false,
"autheticatorFlow": false
},
{
"authenticator": "registration-password-action",
"authenticatorFlow": false,
Expand All @@ -2337,6 +2332,14 @@ data:
"priority": 60,
"userSetupAllowed": false,
"autheticatorFlow": false
},
{
"authenticator": "registration-terms-and-conditions",
"authenticatorFlow": false,
"requirement": "DISABLED",
"priority": 70,
"autheticatorFlow": false,
"userSetupAllowed": false
}
]
},
Expand Down Expand Up @@ -2428,9 +2431,9 @@ data:
"config": {}
},
{
"alias": "terms_and_conditions",
"alias": "TERMS_AND_CONDITIONS",
"name": "Terms and Conditions",
"providerId": "terms_and_conditions",
"providerId": "TERMS_AND_CONDITIONS",
"enabled": false,
"defaultAction": false,
"priority": 20,
Expand Down