feat: fixed 403 errors
This commit is contained in:
@ -56,12 +56,18 @@ public class WebSecurityCustomConfiguration {
|
||||
http.authorizeHttpRequests(
|
||||
authorize ->
|
||||
authorize
|
||||
.requestMatchers("/entrepreneur/**", "/shared/**")
|
||||
.requestMatchers("/entrepreneur/**")
|
||||
.access(hasRole("REALM_MyINPulse-entrepreneur"))
|
||||
.requestMatchers("/admin/**", "/shared/**")
|
||||
.requestMatchers("/admin/**")
|
||||
.access(hasRole("REALM_MyINPulse-admin"))
|
||||
.requestMatchers("/shared/**")
|
||||
.hasAnyRole(
|
||||
"REALM_MyINPulse-admin",
|
||||
"REALM_MyINPulse-entrepreneur")
|
||||
.requestMatchers("/unauth/**")
|
||||
.authenticated())
|
||||
.authenticated()
|
||||
.anyRequest()
|
||||
.denyAll())
|
||||
.oauth2ResourceServer(
|
||||
oauth2 ->
|
||||
oauth2.jwt(
|
||||
|
@ -1,6 +1,6 @@
|
||||
spring.application.name=myinpulse
|
||||
spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://localhost:7080/realms/test/protocol/openid-connect/certs
|
||||
spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:7080/realms/test
|
||||
spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://localhost:7080/realms/${VITE_KEYCLOAK_REALM}/protocol/openid-connect/certs
|
||||
spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:7080/realms/${VITE_KEYCLOAK_REALM}
|
||||
spring.datasource.url=jdbc:postgresql://${DATABASE_URL}/${BACKEND_DB}
|
||||
spring.datasource.username=${BACKEND_USER}
|
||||
spring.datasource.password=${BACKEND_PASSWORD}
|
||||
|
Reference in New Issue
Block a user