-
Notifications
You must be signed in to change notification settings - Fork 96
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
Direct integration, Keycloak #288
Direct integration, Keycloak #288
Conversation
taba90
commented
Jun 24, 2022
- Adds Keycloak UserDAO
- Adds Keycloak UserGroup
- Adds mapping logic for Roles from keycloak to GeoStore.
e587648
to
220ba58
Compare
cee9c9a
to
bb73f8d
Compare
64134d6
to
bf7d80c
Compare
|
||
|
||
<!-- Uncomment the following to use Keycloak as a User and Group persistence layer. | ||
|
||
<bean id="keycloakUserDAO" class="it.geosolutions.geostore.services.rest.security.keycloak.KeycloakUserDAO"> | ||
<constructor-arg ref="keycloakRESTClient"/> | ||
</bean> | ||
<alias name="keycloakUserDAO" alias="userDAO"/> | ||
|
||
<bean id="keycloakUserGroupDAO" class="it.geosolutions.geostore.services.rest.security.keycloak.KeycloakUserGroupDAO"> | ||
<constructor-arg ref="keycloakRESTClient"/> | ||
</bean> | ||
<alias name="keycloakUserGroupDAO" alias="userGroupDAO"/> | ||
|
||
<alias name="externalSecurityDAO" alias="securityDAO"/> | ||
|
||
--> | ||
|
||
|
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.
replace with
<!-- Uncomment the following to use Keycloak as a User and Group persistence layer. | |
<bean id="keycloakUserDAO" class="it.geosolutions.geostore.services.rest.security.keycloak.KeycloakUserDAO"> | |
<constructor-arg ref="keycloakRESTClient"/> | |
</bean> | |
<alias name="keycloakUserDAO" alias="userDAO"/> | |
<bean id="keycloakUserGroupDAO" class="it.geosolutions.geostore.services.rest.security.keycloak.KeycloakUserGroupDAO"> | |
<constructor-arg ref="keycloakRESTClient"/> | |
</bean> | |
<alias name="keycloakUserGroupDAO" alias="userGroupDAO"/> | |
<alias name="externalSecurityDAO" alias="securityDAO"/> | |
--> | |
<!-- security itegration inclusions --> | |
<import resource="classpath*:security-integration-${security.integration:default}.xml"/> |
and add files for secuirity-integration-default.xml
and secuirity-integration-keycloak-direct.xml
@@ -43,14 +45,24 @@ public interface IdPLoginRest { | |||
|
|||
@GET | |||
@Path("/{provider}/login") | |||
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_ANONYMOUS"}) | |||
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_GUEST", "ROLE_ANONYMOUS"}) |
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.
We didn't support this for the moment, so please remove
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_GUEST", "ROLE_ANONYMOUS"}) | |
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_ANONYMOUS"}) |
void login(@PathParam("provider") String provider) throws NotFoundWebEx; | ||
|
||
@GET | ||
@Path("/{provider}/callback") | ||
@Secured({"ROLE_USER", "ROLE_ADMIN","ROLE_ANONYMOUS"}) | ||
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_GUEST","ROLE_ANONYMOUS"}) |
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.
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_GUEST","ROLE_ANONYMOUS"}) | |
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_ANONYMOUS"}) |
Response callback(@PathParam("provider") String provider) throws NotFoundWebEx; | ||
|
||
@GET | ||
@Path("/{provider}/tokens") | ||
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_GUEST","ROLE_ANONYMOUS"}) |
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.
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_GUEST","ROLE_ANONYMOUS"}) | |
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_ANONYMOUS"}) |
7b52eba
to
d0506ed
Compare
d0506ed
to
42f5845
Compare
going to merge next week |
@offtherailz, keep me posted when done |