Open gislab-augsburg opened 5 months ago
@DanielOber @klml :
Das Frontend läuft, aber ich komme nicht rein. Liegt das nur daran dass ich über Keycloak nicht berechtigt bin? Wenn ja, könnt ihr mich da berechtigen?
Ich hab momentan ein SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_KEYCLOAK_CLIENT-SECRET, aus dave-c rauskopiert, in meinen values-secret.yaml. Passt das evtl. nicht? Ich kenn mich da nicht aus.
Oder passt was mit den Pfaden nicht ( https://ssodev.muenchen.de/auth/realms/Dave vs. https://dave-frontend-apigateway-service-dave-external.apps.capk.muenchen.de ), muss ich die anpassen?
--
Oder liegt es an Authentication failed: [invalid_scope] Invalid scopes: LHM LHM_Extended
?
Die Scopes hab ich aus Dave-internal, application-prod.yaml: https://git.muenchen.de/dave/dave-internal/-/blob/main/dave-frontend/apigateway/src/main/resources/application-prod.yml?ref_type=heads#L72-L74 Ohne die gab es vorher einen Error, dass der Scope fehlt
Ohne Scopes kommt folgender Error:
Caused by: java.lang.IllegalArgumentException: scope "<Hier Scope definieren>" contains invalid characters
Den Platzhalter versuchen zu löschen indem man den Scope als Null
, None
oder ""
definiert, funktioniert nicht:
SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_KEYCLOAK_SCOPE_0: None
mb@nbo00370518:~/dave2/helm-charts/charts/dave$ oc logs dave-frontend-apigateway-service-65856b8cfd-xcxjc | grep "scope"
DEBUG | [reactor-http-epoll-3] | DefaultServerRedirectStrategy | [DefaultServerRedirectStrategy.java : 54] - Redirecting to 'https://ssodev.muenchen.de/auth/realms/Dave/protocol/openid-connect/auth?response_type=code&client_id=dave&scope=None&state=_4qt-OGyWj_q4V6IPTj2PKx14LuqJxUGk7dnygkswzE%3D&redirect_uri=https://dave-frontend-apigateway-service-dave-external.apps.capk.muenchen.de/login/oauth2/code/keycloak'
DEBUG | [reactor-http-epoll-3] | HttpWebHandlerAdapter | [LogFormatUtils.java : 119] - [88424229-3] HTTP GET "/login/oauth2/code/keycloak?error=invalid_scope&error_description=Invalid+scop
s%3A+None&state=_4qt-OGyWj_q4V6IPTj2PKx14LuqJxUGk7dnygkswzE%3D"
DEBUG | [reactor-http-epoll-3] | AuthenticationWebFilter | [AuthenticationWebFilter.java : 127] - Authentication failed: [invalid_scope] Invalid scopes: None
SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_KEYCLOAK_SCOPE_0: Null
mb@nbo00370518:~/dave2/helm-charts/charts/dave$ oc logs dave-frontend-apigateway-service-67fd9bcd6f-4pth8 | grep "scope"
DEBUG | [reactor-http-epoll-2] | DefaultServerRedirectStrategy | [DefaultServerRedirectStrategy.java : 54] - Redirecting to 'https://ssodev.muenchen.de/auth/realms/Dave/protocol/openid-connect/auth?response_type=code&client_id=dave&scope=&state=7xWhHxnKEXKnBvUruElXpQUhUW6CcnIzRqFHOWP9Cqo%3D&redirect_uri=https://dave-frontend-apigateway-service-dave-external.apps.capk.muenchen.de/login/oauth2/code/keycloak'
DEBUG | [reactor-http-epoll-2] | HttpWebHandlerAdapter | [LogFormatUtils.java : 119] - [51097639-3] HTTP GET "/login/oauth2/code/keycloak?error=invalid_scope&error_description=Invalid+scop
s%3A+&state=7xWhHxnKEXKnBvUruElXpQUhUW6CcnIzRqFHOWP9Cqo%3D"
DEBUG | [reactor-http-epoll-2] | AuthenticationWebFilter | [AuthenticationWebFilter.java : 127] - Authentication failed: [invalid_scope] Invalid scopes:
SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_KEYCLOAK_SCOPE_0: ""
mb@nbo00370518:~/dave2/helm-charts/charts/dave$ oc logs dave-frontend-apigateway-service-dfc5d49b-pbgxz | grep "scope"
DEBUG | [reactor-http-epoll-2] | DefaultServerRedirectStrategy | [DefaultServerRedirectStrategy.java : 54] - Redirecting to 'https://ssodev.muenchen.de/auth/realms/Dave/protocol/openid-connect/auth?response_type=code&client_id=dave&scope=&state=E53HOWb3Jddf_aaDSvu1Wz-R7bq9DfQ42VinxdEYSrs%3D&redirect_uri=https://dave-frontend-apigateway-service-dave-external.apps.capk.muenchen.de/login/oauth2/code/keycloak'
DEBUG | [reactor-http-epoll-2] | HttpWebHandlerAdapter | [LogFormatUtils.java : 119] - [1917bb49-3] HTTP GET "/login/oauth2/code/keycloak?error=invalid_scope&error_description=Invalid+scopes%3A+&state=E53HOWb3Jddf_aaDSvu1Wz-R7bq9DfQ42VinxdEYSrs%3D"
DEBUG | [reactor-http-epoll-2] | AuthenticationWebFilter | [AuthenticationWebFilter.java : 127] - Authentication failed: [invalid_scope] Invalid scopes:
--> Dann nehm ich den Scope halt hier im dave-frontend Repo bzw. hier raus und bau ein neues Image, analog im dave-selfservice-portal Repo.
@DanielOber Sollte gehen, oder?
--> Dann nehm ich den Scope halt hier im dave-frontend Repo bzw. hier raus und bau ein neues Image, analog im dave-selfservice-portal Repo.
-> https://github.com/gislab-augsburg/dave-frontend/commit/3eccb37c7d38ba5863bd13e8e72182446cb20ebe
So geht's :)
Error in dave-frontend GUI (Browser):
Login with OAuth 2.0 Invalid credentials https://ssodev.muenchen.de/auth/realms/Dave
Details in dave-frontend pod log:
Das gleiche bei dave-adminportal und dave-selfservice-portal.