-
Notifications
You must be signed in to change notification settings - Fork 13
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
Keycloak integration #48
Conversation
Update org registration saga to invoke keycloak to update user attributes Add custom user attributes updation code
Separate keycloak into a module. Update swagger UI to work with keycloak.
Update an user details in keycloak when a new user is added to an existing organization
Handle keycloak user roles update, delete interactions through saga. Fix database connection closed issue and functional tests
This would close lhotse#30, close lhotse#43 and close lhotse#33 Also deprecates the security module which can then be archived. Once merged, allows for all dependencies to be brought up to date. |
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.
More to come later....
src/users/src/main/java/engineering/everest/lhotse/users/eventhandlers/UsersEventHandler.java
Outdated
Show resolved
Hide resolved
src/users/src/main/java/engineering/everest/lhotse/users/eventhandlers/UsersEventHandler.java
Outdated
Show resolved
Hide resolved
src/users/src/main/java/engineering/everest/lhotse/users/domain/UserAggregate.java
Outdated
Show resolved
Hide resolved
src/api/src/main/java/engineering/everest/lhotse/api/config/SwaggerConfig.java
Show resolved
Hide resolved
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.
Functionality is broken. It is not possible to self register yourself.
.../main/java/engineering/everest/lhotse/api/rest/controllers/AdminOrganizationsController.java
Outdated
Show resolved
Hide resolved
...i/src/main/java/engineering/everest/lhotse/api/rest/controllers/OrganizationsController.java
Outdated
Show resolved
Hide resolved
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.
It's a big PR. I didn't read everything. Here are some comments before I can commit more time to read it again.
One question that I have is about how keycloak should be positioned in the architecture, or more specifically, the command/event flow. My take is that keycloak should still be secondary because it is not the core of the business model. The principle is that we should be able to rebuild it as long as we have the full events. With the proposed changes, it seems that passwords are known only to keycloak and bypass the core application. This means we cannot replay events for full recovery. The code currently does not deal with user roles, but I believe it would have the similar issue with the current approach.
.../java/engineering/everest/lhotse/api/rest/annotations/AdminOrExpertOfTargetOrganization.java
Outdated
Show resolved
Hide resolved
...port/src/main/java/engineering/everest/lhotse/api/config/CustomMethodSecurityExpression.java
Outdated
Show resolved
Hide resolved
...n/java/engineering/everest/lhotse/api/rest/annotations/AdminOrAdminOfTargetOrganization.java
Outdated
Show resolved
Hide resolved
src/api/src/main/java/engineering/everest/lhotse/api/rest/controllers/UserController.java
Outdated
Show resolved
Hide resolved
.../main/java/engineering/everest/lhotse/api/rest/controllers/AdminOrganizationsController.java
Show resolved
Hide resolved
src/api/src/main/java/engineering/everest/lhotse/api/rest/controllers/UserController.java
Show resolved
Hide resolved
...ain/java/engineering/everest/lhotse/axon/common/services/KeycloakSynchronizationService.java
Outdated
Show resolved
Hide resolved
src/users/src/main/java/engineering/everest/lhotse/users/services/DefaultUsersService.java
Outdated
Show resolved
Hide resolved
00119cf
to
34403ea
Compare
34403ea
to
fcb5e4f
Compare
.../engineering/everest/lhotse/organizations/domain/events/OrganizationCreatedByAdminEvent.java
Outdated
Show resolved
Hide resolved
b16c35f
to
39eb987
Compare
f6aeb51
to
b0c6658
Compare
src/api/src/main/java/engineering/everest/lhotse/api/config/FilterConfig.java
Outdated
Show resolved
Hide resolved
We have some remaining issues before we can close this off and start picking up the issues that we have identified as part of this review:
The first two points need some changes applied to avoid the issues. The third point I think we can resolve by removing the "admin does a thing for you" flow. |
Move role management to keycloak.
8aaeefc
to
06830b8
Compare
06830b8
to
d424ea3
Compare
…er bootstrapping. Removed application admin account creation flow from Juptyer notebook.
Fixed 'memberOfOrg' pre-authorisation expression. Updated example flows in Jupyter notebook
bf32ce9
to
f2f006c
Compare
…Jupyter notebook with example of org user creation and email verification via Keycloak
Proposed changes
Replace the Spring Security OAuth with Keycloak.
Keycloak is an open source identity and access management solution. It will take care of handling the authentication and authorisation part. No extra maintenance is required. It will take care of managing the user details and sessions information etc,.
Checklist
./gradlew clean build
without failures)