Open theodotos opened 6 days ago
@theodotos , I suggest checking the redirect url in keycloak server.
@theodotos , also, I think you misunderstand how plugins work.
the following is invalid
authorize with mypolicy authenticate with myportal
please see the issue pinned to the βIssuesβ. It has working config, where route directive is being used.
`
Yes it seems I have misunderstood some things. I removed the authenticate with myportal
line and add the correct URL:
--- etc/Caddyfile-mypolicy 2024-11-11 14:34:53.146784597 +0000
+++ etc/Caddyfile-mypolicy-v2 2024-11-11 14:35:09.418727879 +0000
@@ -33,7 +33,7 @@
}
authorization policy mypolicy {
- set auth url https://login-test.collabora.com/auth/realms/master
+ set auth url https://login-test.collabora.com/auth
allow roles admin collaboran
crypto key verify PassphraseForPrivateKey
}
@@ -63,7 +63,6 @@
rewrite @rewritePath /index.php?__path__=/{http.regexp.path.1}
tls /etc/letsencrypt/live/kati.collaboradmins.com/fullchain.pem /etc/letsencrypt/live/kati.collaboradmins.com/privkey.pem
- authenticate with myportal
authorize with mypolicy
respond "phabricator is running"
Now i get redirected to the auth site of keycloak but I am not redirected back after successful authentication.
Not redirected back to the app from keycloak
We already have a working keycloak setup.
The problem is when we are redirected to keycloak.example.com we are not prompted for login and we are not redirected back to app.example.org. Instead we get a json response from Keycloak:
The configuration is:
Configuration
Version Information
I use authcrunch v1.0.11 on Linux AMD64.
Here's a list of modules:
Expected behavior
I expect to be prompted for login on nextcloud and be redirected back after the successful login.
I read this guide:
https://docs.authcrunch.com/docs/authenticate/oauth/backend-oauth2-0011-keycloak
and based my configuration on this example:
https://github.com/greenpau/caddy-auth-docs/blob/main/assets/conf/oauth/keycloak/Caddyfile
Any idea what I am doing wrong?