-
Notifications
You must be signed in to change notification settings - Fork 21
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(keycloak): add seeding data to configuration #910
Conversation
8691d65
to
36e5cab
Compare
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
@ntruchsess could you check the quality gate ? |
150ea76
to
d3e3dfc
Compare
done. After rebase solving the conflicts sonar did pick up the findings that were already fixed a while ago. |
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.
Beside of the package version adjustment the pr looks good from my side (without testing the seeding itself)
update framework version
d3e3dfc
to
093d197
Compare
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.
Hi @ntruchsess I just test again and I'm encountering an unhandled expection:
System.NullReferenceException: Object reference not set to an instance of an object.
as discussed, configuration needs to be adjusted like so:
|
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.
During testing, I noticed an unhandled exception with status code 500 (Internal Server Error) during the deletion of assigned default client scopes:
"Exception":"Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.ServiceException: Internal Server Error: http://sharedidp-keycloak/auth/admin/realms/master/clients/34e015a5-b944-46d8-a9f3-4bc8e856a727/default-client-scopes/ff556da8-6b2b-4fe3-97cf-4a9c93ffc3c1\n ---> Flurl.Http.FlurlHttpException: Call failed with status code 500 (Internal Server Error): DELETE http://sharedidp-keycloak/auth/admin/realms/master/clients/34e015a5-b944-46d8-a9f3-4bc8e856a727/default-client-scopes/ff556da8-6b2b-4fe3-97cf-4a9c93ffc3c1\n
Scenario:
- master-realm is created and to default clients
admin-cli
,account
andsecurity-admin-console
the default client scopeacr
is assigned - seeding job uses a json file for the master realm where the default client scope
acr
is not assigned to default clientsadmin-cli
,account
andsecurity-admin-console
- seeding job runs into the exception above BUT only after successfully removing the assignments of the default client scope
acr
from default clientsadmin-cli
,account
andsecurity-admin-console
Why is this exception thrown if the deletion is successful?
Co-authored-by: Evelyn Gurschler <evelyn.gurschler@bmw.de>
Quality Gate failedFailed conditions |
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 created #1039 to follow up on #910 (review)
Description
This new PR is opened as the original PR #800 was closed due to retirement of catenax-ng org.
The keycloak-seeder has been changed to (optionaly) read multiple json-files per realm and seeding-data from it's settings and merge this additional data with the one that is read from json before writing changes to keycloak. This allows to both separate seeding-data of different domains and override values in the keycloak-json by settings being passed as environment-variables (which can be defined via helm-chart).
The following client-properties can now be updated: RootUrl, BaseUrl, AdminUrl, RedirectUrls, Secret. (Before the change those values could only be initially set on creation of the respective entity)
KeecloakSeederSettings have been adjusted accordingly:
Why
seeding e.g. secrets from json-files would uncover confidential data. It also is unflexible - settings defined by environment-variables can e.g. be defined in kubernetes secrets.
Issue
#438
Checklist
Please delete options that are not relevant.