-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat(seeding): add userProfile and localizationTexts to seeding #1154
Conversation
a0b42a1
to
5c4366b
Compare
Hi @Phil91 format check failed |
5c4366b
to
340c50d
Compare
340c50d
to
b87d1a1
Compare
src/keycloak/Keycloak.Library/Models/Users/UserProfileConfig.cs
Dismissed
Show dismissed
Hide dismissed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the CX-Central realm for the import of the user profile related values and that works now 👍
But I also tested if the import of the realms in sharedidp still works with this change and I'm getting the following error in the seeding job:
{"Timestamp":"2024-11-18T11:59:38.8573917+00:00","Level":"Fatal","MessageTemplate":"Unhandled exception","RenderedMessage":"Unhandled exception","Exception":"Org.Eclipse.TractusX.Portal.Backend.Keycloak.ErrorHandling.KeycloakNoSuccessException: Bad Request: http://sharedidp-keycloak/auth/realms/master/protocol/openid-connect/token\n ---> Flurl.Http.FlurlHttpException: Call failed with status code 400 (Bad Request): POST http://sharedidp-keycloak:80/auth/realms/master/protocol/openid-connect/token\n at Flurl.Http.FlurlClient.SendAsync(IFlurlRequest request, HttpCompletionOption completionOption, CancellationToken cancellationToken)\n --- End of inner exception stack trace ---\n at Org.Eclipse.TractusX.Portal.Backend.Keycloak.ErrorHandling.FlurlErrorHandler.<>c__DisplayClass0_0.<ConfigureErrorHandler>b__1(FlurlCall call) in /src/keycloak/Keycloak.ErrorHandling/FlurlErrorHandler.cs:line 58\n at Flurl.Http.FlurlEventHandler.FromAsyncAction.HandleAsync(FlurlEventType eventType, FlurlCall call)\n at Flurl.Http.FlurlClient.RaiseEventAsync(FlurlEventType eventType, FlurlCall call)\n at Flurl.Http.FlurlClient.HandleExceptionAsync(FlurlCall call, Exception ex, CancellationToken token)\n at Flurl.Http.FlurlClient.SendAsync(IFlurlRequest request, HttpCompletionOption completionOption, CancellationToken cancellationToken)\n at Flurl.Http.FlurlClient.SendAsync(IFlurlRequest request, HttpCompletionOption completionOption, CancellationToken cancellationToken)\n at Flurl.Http.ResponseExtensions.ReceiveJson[T](Task
1 response)\n at Org.Eclipse.TractusX.Portal.Backend.Keycloak.Library.Common.Extensions.FlurlRequestExtensions.GetAccessTokenAsync(String url, String realm, String userName, String password, Boolean useAuthTrail, CancellationToken cancellationToken) in /src/keycloak/Keycloak.Library/Common/Extensions/FlurlRequestExtensions.cs:line 37\n at Org.Eclipse.TractusX.Portal.Backend.Keycloak.Library.Common.Extensions.FlurlRequestExtensions.WithAuthenticationAsync(IFlurlRequest request, Func2 getTokenAsync, String url, String realm, String userName, String password, String clientSecret, String clientId, Boolean useAuthTrail, CancellationToken cancellationToken) in /src/keycloak/Keycloak.Library/Common/Extensions/FlurlRequestExtensions.cs:line 84\n at Org.Eclipse.TractusX.Portal.Backend.Keycloak.Library.KeycloakClient.DeleteComponentAsync(String realm, String componentId, CancellationToken cancellationToken) in /src/keycloak/Keycloak.Library/Components/KeycloakClient.cs:line 69\n at Org.Eclipse.TractusX.Portal.Backend.Keycloak.Seeding.BusinessLogic.ComponentsUpdater.DeleteComponents(KeycloakClient keycloak, String realm, IEnumerable
1 components, IEnumerable1 updateComponents, CancellationToken cancellationToken) in /src/keycloak/Keycloak.Seeding/BusinessLogic/ComponentsUpdater.cs:line 81\n at Org.Eclipse.TractusX.Portal.Backend.Keycloak.Seeding.BusinessLogic.ComponentsUpdater.UpdateComponents(String keycloakInstanceName, CancellationToken cancellationToken) in /src/keycloak/Keycloak.Seeding/BusinessLogic/ComponentsUpdater.cs:line 45\n at Org.Eclipse.TractusX.Portal.Backend.Keycloak.Seeding.BusinessLogic.KeycloakSeeder.Seed(CancellationToken cancellationToken) in /src/keycloak/Keycloak.Seeding/BusinessLogic/KeecloakSeeder.cs:line 49\n at Program.<Main>$(String[] args) in /src/keycloak/Keycloak.Seeding/Program.cs:line 86"}
src/keycloak/Keycloak.Seeding/BusinessLogic/LocalizationsUpdater.cs
Outdated
Show resolved
Hide resolved
src/keycloak/Keycloak.Seeding/BusinessLogic/UserProfileUpdater.cs
Outdated
Show resolved
Hide resolved
b87d1a1
to
851f336
Compare
Refs: #1150
could you please recheck, I've adjusted the logic |
Quality Gate passedIssues Measures |
src/keycloak/Keycloak.Seeding/BusinessLogic/SeedDataHandler.cs
Dismissed
Show dismissed
Hide dismissed
successfully retested 👍 |
as that's the default in master realms, discovered as part of eclipse-tractusx/portal-backend#1154
* fix: enable user profiles in cx-central realm to address user attributes change coming keycloak v24 #226 * fix(master sharedidp): update realm to not require user profiles as that's the default in master realms, discovered as part of eclipse-tractusx/portal-backend#1154 * fix(svc): add technical_roles_management role to client scope #227 * fix(svc): add create_ssi_notifications role to sa-cl24-01 from Cl2-CX-Portal client #229 * fix(docs): add store_didDocument from technical user accounts
Description
add userProfile and localizationTexts to keycloak seeding
Why
To enable the seeding of userProfiles and localization Texts
Issue
Refs: #1150
Checklist