authentik icon indicating copy to clipboard operation
authentik copied to clipboard

Portainer requests login twice

Open TheLion opened this issue 1 year ago • 1 comments

Describe your question/ Login to Portainer using Authentik

Relevant info Authentik is configured to login with several application (Proxmox, Proxmox Backup Server), that work fine with only one login. When already authenticated through, for example, Proxmox and connecting to Portainer, it also prompts for a login.

Screenshots Not applicable

Logs The Authentik log shows that the first login is successfull, but still prompts for a second login.

Version and Deployment (please complete the following information):

  • authentik version: 2024.6.0
  • Portainer Business Edition 2.19.5
  • Deployment: Docker

Additional context Already removed and re-deployed Authentik from scratch. Also checked and reconfigured Portainer. Still same issue.

TheLion avatar Aug 03 '24 11:08 TheLion

Without the logs my suspicion is that portainer sets the prompt parameter to login which tells authentik that it needs to re-authenticate the user. Please add the logs from the authentik server container for context

BeryJu avatar Oct 17 '24 16:10 BeryJu

I tried to collect some logging from the container, from a login that had to happen twice to be able to login.

{"auth_via": "unauthenticated", "domain_url": "0.0.0.0", "event": "/-/health/live/", "host": "0.0.0.0:9000", "level": "info", "logger": "authentik.asgi", "method": "HEAD", "pid": 108, "remote": "127.0.0.1", "request_id": "a44de722892f42e3a55313e6f6091301", "runtime": 9, "schema_name": "public", "scheme": "http", "status": 200, "timestamp": "2024-11-01T09:19:11.764636", "user": "", "user_agent": "goauthentik.io/healthcheck"}
{"auth_via": "api_token", "domain_url": "auth.fourpets.net", "event": "/api/v3/events/events/per_month/?action=login_failed", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 108, "remote": "172.19.0.1", "request_id": "5a5ebd4ff00a45cda197d542170c18e3", "runtime": 69, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:15.960038", "user": "akadmin", "user_agent": ""}
{"auth_via": "api_token", "domain_url": "auth.fourpets.net", "event": "/api/v3/events/events/per_month/?action=login", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 108, "remote": "172.19.0.1", "request_id": "dfa7820435d944819eac3c5c0aafbd0b", "runtime": 58, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:16.028446", "user": "akadmin", "user_agent": ""}
{"auth_via": "api_token", "domain_url": "auth.fourpets.net", "event": "/api/v3/core/users/?page_size=1", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 108, "remote": "172.19.0.1", "request_id": "7ca41adf51544f6e9c9b6e65590592bf", "runtime": 99, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:16.048201", "user": "akadmin", "user_agent": ""}
{"auth_via": "unauthenticated", "domain_url": "auth.fourpets.net", "event": "/application/o/authorize/?response_type=code&client_id=d0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN&redirect_uri=https://portainer.fourpets.net&scope=email%20openid%20profile&prompt=login&state=11dd787f-d4c3-49b6-a27e-f37b56880c77", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 108, "remote": "192.168.3.83", "request_id": "13428d906419418aab710cfba4349f00", "runtime": 22, "schema_name": "public", "scheme": "https", "status": 302, "timestamp": "2024-11-01T09:19:19.427041", "user": "", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "unauthenticated", "domain_url": "auth.fourpets.net", "event": "/flows/-/default/authentication/?next=/application/o/authorize/%3Fresponse_type%3Dcode%26client_id%3Dd0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN%26redirect_uri%3Dhttps%3A//portainer.fourpets.net%26scope%3Demail%2520openid%2520profile%26prompt%3Dlogin%26state%3D11dd787f-d4c3-49b6-a27e-f37b56880c77", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 108, "remote": "192.168.3.83", "request_id": "382a208347b043f7811d785d5f243427", "runtime": 13, "schema_name": "public", "scheme": "https", "status": 302, "timestamp": "2024-11-01T09:19:19.506513", "user": "", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "unauthenticated", "domain_url": "auth.fourpets.net", "event": "/if/flow/default-authentication-flow/?next=%2Fapplication%2Fo%2Fauthorize%2F%3Fresponse_type%3Dcode%26client_id%3Dd0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN%26redirect_uri%3Dhttps%3A%2F%2Fportainer.fourpets.net%26scope%3Demail%2520openid%2520profile%26prompt%3Dlogin%26state%3D11dd787f-d4c3-49b6-a27e-f37b56880c77", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 108, "remote": "192.168.3.83", "request_id": "2a0dbd9c56b2478eb6affd09aa883b65", "runtime": 22, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:19.564938", "user": "", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"domain_url": null, "event": "/ws/client/", "level": "info", "logger": "authentik.asgi", "pid": 108, "remote": "192.168.3.83", "schema_name": "public", "scheme": "ws", "timestamp": "2024-11-01T09:19:19.754270", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "unauthenticated", "domain_url": "auth.fourpets.net", "event": "/api/v3/root/config/", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 109, "remote": "192.168.3.83", "request_id": "42f2f1b9ed9e4183bbc660440554a8e0", "runtime": 22, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:19.785573", "user": "", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "unauthenticated", "domain_url": "auth.fourpets.net", "event": "/api/v3/core/brands/current/", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 108, "remote": "192.168.3.83", "request_id": "ff7a1c2a75e24762bc2b371dc16dec42", "runtime": 30, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:19.791136", "user": "", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "unauthenticated", "domain_url": "auth.fourpets.net", "event": "/api/v3/root/config/", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 108, "remote": "192.168.3.83", "request_id": "0639bbf91bf44e04aa631d1a650fd5c0", "runtime": 14, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:19.830531", "user": "", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "unauthenticated", "domain_url": "auth.fourpets.net", "event": "/api/v3/core/brands/current/", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 109, "remote": "192.168.3.83", "request_id": "77a0e2891c9f4fdba979f8d6c9adbf86", "runtime": 21, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:19.847986", "user": "", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "unauthenticated", "domain_url": "auth.fourpets.net", "errors": {"captcha_stage": ["This field may not be null."]}, "event": "f(ch): Invalid challenge", "host": "auth.fourpets.net", "level": "warning", "logger": "authentik.flows.stage", "pid": 109, "request_id": "2c92bd43aa7449429abdeb004974a629", "schema_name": "public", "stage": "default-authentication-identification", "stage_view": "authentik.stages.identification.stage.IdentificationStageView", "timestamp": "2024-11-01T09:19:20.577282"}
{"auth_via": "unauthenticated", "domain_url": "auth.fourpets.net", "event": "/api/v3/flows/executor/default-authentication-flow/?query=next%3D%252Fapplication%252Fo%252Fauthorize%252F%253Fresponse_type%253Dcode%2526client_id%253Dd0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN%2526redirect_uri%253Dhttps%253A%252F%252Fportainer.fourpets.net%2526scope%253Demail%252520openid%252520profile%2526prompt%253Dlogin%2526state%253D11dd787f-d4c3-49b6-a27e-f37b56880c77", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 109, "remote": "192.168.3.83", "request_id": "2c92bd43aa7449429abdeb004974a629", "runtime": 789, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:20.580293", "user": "", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "unauthenticated", "domain_url": "auth.fourpets.net", "event": "/api/v3/flows/executor/default-authentication-flow/?query=next%3D%252Fapplication%252Fo%252Fauthorize%252F%253Fresponse_type%253Dcode%2526client_id%253Dd0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN%2526redirect_uri%253Dhttps%253A%252F%252Fportainer.fourpets.net%2526scope%253Demail%252520openid%252520profile%2526prompt%253Dlogin%2526state%253D11dd787f-d4c3-49b6-a27e-f37b56880c77", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "POST", "pid": 108, "remote": "192.168.3.83", "request_id": "591f1a12ac63470aa5c3017f729aada1", "runtime": 26, "schema_name": "public", "scheme": "https", "status": 302, "timestamp": "2024-11-01T09:19:25.104511", "user": "", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "unauthenticated", "domain_url": "auth.fourpets.net", "event": "/api/v3/flows/executor/default-authentication-flow/?query=next%3D%252Fapplication%252Fo%252Fauthorize%252F%253Fresponse_type%253Dcode%2526client_id%253Dd0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN%2526redirect_uri%253Dhttps%253A%252F%252Fportainer.fourpets.net%2526scope%253Demail%252520openid%252520profile%2526prompt%253Dlogin%2526state%253D11dd787f-d4c3-49b6-a27e-f37b56880c77", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 108, "remote": "192.168.3.83", "request_id": "d08e5c1cff30405286a9d0a65b91c7be", "runtime": 51, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:25.190994", "user": "", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "unauthenticated", "backend": "authentik.core.auth.InbuiltBackend", "domain_url": "auth.fourpets.net", "event": "Successful authentication", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.stages.password.stage", "pid": 109, "request_id": "000120fe47ce4c738b09a429cf813ddb", "schema_name": "public", "timestamp": "2024-11-01T09:19:28.046272", "user": "martijn"}
{"auth_via": "unauthenticated", "domain_url": "auth.fourpets.net", "event": "/api/v3/flows/executor/default-authentication-flow/?query=next%3D%252Fapplication%252Fo%252Fauthorize%252F%253Fresponse_type%253Dcode%2526client_id%253Dd0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN%2526redirect_uri%253Dhttps%253A%252F%252Fportainer.fourpets.net%2526scope%253Demail%252520openid%252520profile%2526prompt%253Dlogin%2526state%253D11dd787f-d4c3-49b6-a27e-f37b56880c77", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "POST", "pid": 109, "remote": "192.168.3.83", "request_id": "000120fe47ce4c738b09a429cf813ddb", "runtime": 436, "schema_name": "public", "scheme": "https", "status": 302, "timestamp": "2024-11-01T09:19:28.050564", "user": "", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "unauthenticated", "domain_url": "auth.fourpets.net", "event": "/api/v3/flows/executor/default-authentication-flow/?query=next%3D%252Fapplication%252Fo%252Fauthorize%252F%253Fresponse_type%253Dcode%2526client_id%253Dd0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN%2526redirect_uri%253Dhttps%253A%252F%252Fportainer.fourpets.net%2526scope%253Demail%252520openid%252520profile%2526prompt%253Dlogin%2526state%253D11dd787f-d4c3-49b6-a27e-f37b56880c77", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 109, "remote": "192.168.3.83", "request_id": "7604938c44eb4926ad56694d12beff6d", "runtime": 52, "schema_name": "public", "scheme": "https", "status": 302, "timestamp": "2024-11-01T09:19:28.151751", "user": "", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"action": "login", "auth_via": "unauthenticated", "client_ip": "192.168.3.83", "context": {"auth_method": "password", "auth_method_args": {}, "http_request": {"args": {"next": "/application/o/authorize/?response_type=code&client_id=d0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN&redirect_uri=https://portainer.fourpets.net&scope=email%20openid%20profile&prompt=login&state=11dd787f-d4c3-49b6-a27e-f37b56880c77"}, "method": "GET", "path": "/api/v3/flows/executor/default-authentication-flow/", "request_id": "697eebecad50443c84d9a6d9ca367872", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}}, "domain_url": "auth.fourpets.net", "event": "Created Event", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.events.models", "pid": 109, "request_id": "697eebecad50443c84d9a6d9ca367872", "schema_name": "public", "timestamp": "2024-11-01T09:19:28.252616", "user": {"email": "[email protected]", "pk": 5, "username": "martijn"}}
{"auth_via": "unauthenticated", "domain_url": "auth.fourpets.net", "event": "Task published", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.root.celery", "pid": 109, "request_id": "697eebecad50443c84d9a6d9ca367872", "schema_name": "public", "task_id": "3ec0eafa82b3437eb3e92d9f042cd2e2", "task_name": "authentik.events.tasks.event_notification_handler", "timestamp": "2024-11-01T09:19:28.304682"}
{"amount": 1, "auth_via": "unauthenticated", "domain_url": "auth.fourpets.net", "event": "Updated score", "for_ip": "192.168.3.83", "for_user": "martijn", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.policies.reputation.signals", "pid": 109, "request_id": "697eebecad50443c84d9a6d9ca367872", "schema_name": "public", "timestamp": "2024-11-01T09:19:28.326647"}
{"auth_via": "unauthenticated", "domain_url": "auth.fourpets.net", "event": "/api/v3/flows/executor/default-authentication-flow/?query=next%3D%252Fapplication%252Fo%252Fauthorize%252F%253Fresponse_type%253Dcode%2526client_id%253Dd0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN%2526redirect_uri%253Dhttps%253A%252F%252Fportainer.fourpets.net%2526scope%253Demail%252520openid%252520profile%2526prompt%253Dlogin%2526state%253D11dd787f-d4c3-49b6-a27e-f37b56880c77", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 109, "remote": "192.168.3.83", "request_id": "697eebecad50443c84d9a6d9ca367872", "runtime": 150, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:28.333995", "user": "martijn", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "session", "domain_url": "auth.fourpets.net", "event": "/application/o/authorize/?response_type=code&client_id=d0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN&redirect_uri=https://portainer.fourpets.net&scope=email%20openid%20profile&prompt=login&state=11dd787f-d4c3-49b6-a27e-f37b56880c77", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 109, "remote": "192.168.3.83", "request_id": "6766f34ccbfa4233927f43f6140af061", "runtime": 28, "schema_name": "public", "scheme": "https", "status": 302, "timestamp": "2024-11-01T09:19:28.434417", "user": "martijn", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "session", "domain_url": "auth.fourpets.net", "event": "/flows/-/default/authentication/?next=/application/o/authorize/%3Fresponse_type%3Dcode%26client_id%3Dd0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN%26redirect_uri%3Dhttps%3A//portainer.fourpets.net%26scope%3Demail%2520openid%2520profile%26prompt%3Dlogin%26state%3D11dd787f-d4c3-49b6-a27e-f37b56880c77", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 109, "remote": "192.168.3.83", "request_id": "b67c806473134c53a7b417055c149e3a", "runtime": 20, "schema_name": "public", "scheme": "https", "status": 302, "timestamp": "2024-11-01T09:19:28.504455", "user": "martijn", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "session", "domain_url": "auth.fourpets.net", "event": "/if/flow/default-authentication-flow/?next=%2Fapplication%2Fo%2Fauthorize%2F%3Fresponse_type%3Dcode%26client_id%3Dd0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN%26redirect_uri%3Dhttps%3A%2F%2Fportainer.fourpets.net%26scope%3Demail%2520openid%2520profile%26prompt%3Dlogin%26state%3D11dd787f-d4c3-49b6-a27e-f37b56880c77", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 109, "remote": "192.168.3.83", "request_id": "12934b73b7dd4b05a12fdca0823cc40b", "runtime": 35, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:28.580245", "user": "martijn", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"domain_url": null, "event": "/ws/client/", "level": "info", "logger": "authentik.asgi", "pid": 108, "remote": "192.168.3.83", "schema_name": "public", "scheme": "ws", "timestamp": "2024-11-01T09:19:28.609465", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"domain_url": null, "event": "/ws/client/", "level": "info", "logger": "authentik.asgi", "pid": 108, "remote": "192.168.3.83", "schema_name": "public", "scheme": "ws", "timestamp": "2024-11-01T09:19:28.779996", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "session", "domain_url": "auth.fourpets.net", "event": "/api/v3/root/config/", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 109, "remote": "192.168.3.83", "request_id": "bd860ede036d44cd9578f43e25f544f7", "runtime": 29, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:28.829890", "user": "martijn", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "session", "domain_url": "auth.fourpets.net", "event": "/api/v3/core/brands/current/", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 108, "remote": "192.168.3.83", "request_id": "f4bcc07cfbde44038e8c9b01f8b0cbc3", "runtime": 29, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:28.833070", "user": "martijn", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "session", "domain_url": "auth.fourpets.net", "event": "/api/v3/core/brands/current/", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 108, "remote": "192.168.3.83", "request_id": "0f0c28e39b3140fa988abd781d356a2d", "runtime": 23, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:28.855508", "user": "martijn", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "session", "domain_url": "auth.fourpets.net", "event": "/api/v3/root/config/", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 109, "remote": "192.168.3.83", "request_id": "9224c336720d4ca6a39632e6f5614010", "runtime": 25, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:28.861177", "user": "martijn", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "session", "domain_url": "auth.fourpets.net", "errors": {"captcha_stage": ["This field may not be null."]}, "event": "f(ch): Invalid challenge", "host": "auth.fourpets.net", "level": "warning", "logger": "authentik.flows.stage", "pid": 109, "request_id": "06641da41a5642d7a73ab40d7a87b95c", "schema_name": "public", "stage": "default-authentication-identification", "stage_view": "authentik.stages.identification.stage.IdentificationStageView", "timestamp": "2024-11-01T09:19:29.650399"}
{"auth_via": "session", "domain_url": "auth.fourpets.net", "event": "/api/v3/flows/executor/default-authentication-flow/?query=next%3D%252Fapplication%252Fo%252Fauthorize%252F%253Fresponse_type%253Dcode%2526client_id%253Dd0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN%2526redirect_uri%253Dhttps%253A%252F%252Fportainer.fourpets.net%2526scope%253Demail%252520openid%252520profile%2526prompt%253Dlogin%2526state%253D11dd787f-d4c3-49b6-a27e-f37b56880c77", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 109, "remote": "192.168.3.83", "request_id": "06641da41a5642d7a73ab40d7a87b95c", "runtime": 819, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:29.653832", "user": "martijn", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "session", "domain_url": "auth.fourpets.net", "event": "/api/v3/flows/executor/default-authentication-flow/?query=next%3D%252Fapplication%252Fo%252Fauthorize%252F%253Fresponse_type%253Dcode%2526client_id%253Dd0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN%2526redirect_uri%253Dhttps%253A%252F%252Fportainer.fourpets.net%2526scope%253Demail%252520openid%252520profile%2526prompt%253Dlogin%2526state%253D11dd787f-d4c3-49b6-a27e-f37b56880c77", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "POST", "pid": 108, "remote": "192.168.3.83", "request_id": "8fb4c33f49344507ae2bd5b15ae3e062", "runtime": 30, "schema_name": "public", "scheme": "https", "status": 302, "timestamp": "2024-11-01T09:19:34.053283", "user": "martijn", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "session", "domain_url": "auth.fourpets.net", "event": "/api/v3/flows/executor/default-authentication-flow/?query=next%3D%252Fapplication%252Fo%252Fauthorize%252F%253Fresponse_type%253Dcode%2526client_id%253Dd0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN%2526redirect_uri%253Dhttps%253A%252F%252Fportainer.fourpets.net%2526scope%253Demail%252520openid%252520profile%2526prompt%253Dlogin%2526state%253D11dd787f-d4c3-49b6-a27e-f37b56880c77", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 108, "remote": "192.168.3.83", "request_id": "8264f8f76f6e469ab49bfb05b08c8bbf", "runtime": 50, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:34.140270", "user": "martijn", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "session", "backend": "authentik.core.auth.InbuiltBackend", "domain_url": "auth.fourpets.net", "event": "Successful authentication", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.stages.password.stage", "pid": 109, "request_id": "ddb54edf2269424db2a4883e5cdc8397", "schema_name": "public", "timestamp": "2024-11-01T09:19:36.982008", "user": "martijn"}
{"auth_via": "session", "domain_url": "auth.fourpets.net", "event": "/api/v3/flows/executor/default-authentication-flow/?query=next%3D%252Fapplication%252Fo%252Fauthorize%252F%253Fresponse_type%253Dcode%2526client_id%253Dd0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN%2526redirect_uri%253Dhttps%253A%252F%252Fportainer.fourpets.net%2526scope%253Demail%252520openid%252520profile%2526prompt%253Dlogin%2526state%253D11dd787f-d4c3-49b6-a27e-f37b56880c77", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "POST", "pid": 109, "remote": "192.168.3.83", "request_id": "ddb54edf2269424db2a4883e5cdc8397", "runtime": 430, "schema_name": "public", "scheme": "https", "status": 302, "timestamp": "2024-11-01T09:19:36.986281", "user": "martijn", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "session", "domain_url": "auth.fourpets.net", "event": "/api/v3/flows/executor/default-authentication-flow/?query=next%3D%252Fapplication%252Fo%252Fauthorize%252F%253Fresponse_type%253Dcode%2526client_id%253Dd0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN%2526redirect_uri%253Dhttps%253A%252F%252Fportainer.fourpets.net%2526scope%253Demail%252520openid%252520profile%2526prompt%253Dlogin%2526state%253D11dd787f-d4c3-49b6-a27e-f37b56880c77", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 109, "remote": "192.168.3.83", "request_id": "8e9fd9f291eb4424879fe67de3561a91", "runtime": 50, "schema_name": "public", "scheme": "https", "status": 302, "timestamp": "2024-11-01T09:19:37.071680", "user": "martijn", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"action": "login", "auth_via": "session", "client_ip": "192.168.3.83", "context": {"auth_method": "password", "auth_method_args": {}, "http_request": {"args": {"next": "/application/o/authorize/?response_type=code&client_id=d0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN&redirect_uri=https://portainer.fourpets.net&scope=email%20openid%20profile&prompt=login&state=11dd787f-d4c3-49b6-a27e-f37b56880c77"}, "method": "GET", "path": "/api/v3/flows/executor/default-authentication-flow/", "request_id": "c7af4cdba4784dfc900383a5eff91b8b", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}}, "domain_url": "auth.fourpets.net", "event": "Created Event", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.events.models", "pid": 109, "request_id": "c7af4cdba4784dfc900383a5eff91b8b", "schema_name": "public", "timestamp": "2024-11-01T09:19:37.167016", "user": {"email": "[email protected]", "pk": 5, "username": "martijn"}}
{"auth_via": "session", "domain_url": "auth.fourpets.net", "event": "Task published", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.root.celery", "pid": 109, "request_id": "c7af4cdba4784dfc900383a5eff91b8b", "schema_name": "public", "task_id": "f195ddac93c64c40a6d95ef27ea3ac33", "task_name": "authentik.events.tasks.event_notification_handler", "timestamp": "2024-11-01T09:19:37.205623"}
{"amount": 1, "auth_via": "session", "domain_url": "auth.fourpets.net", "event": "Updated score", "for_ip": "192.168.3.83", "for_user": "martijn", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.policies.reputation.signals", "pid": 109, "request_id": "c7af4cdba4784dfc900383a5eff91b8b", "schema_name": "public", "timestamp": "2024-11-01T09:19:37.226975"}
{"auth_via": "session", "domain_url": "auth.fourpets.net", "event": "/api/v3/flows/executor/default-authentication-flow/?query=next%3D%252Fapplication%252Fo%252Fauthorize%252F%253Fresponse_type%253Dcode%2526client_id%253Dd0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN%2526redirect_uri%253Dhttps%253A%252F%252Fportainer.fourpets.net%2526scope%253Demail%252520openid%252520profile%2526prompt%253Dlogin%2526state%253D11dd787f-d4c3-49b6-a27e-f37b56880c77", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 109, "remote": "192.168.3.83", "request_id": "c7af4cdba4784dfc900383a5eff91b8b", "runtime": 124, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:37.234510", "user": "martijn", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "session", "domain_url": "auth.fourpets.net", "event": "/application/o/authorize/?response_type=code&client_id=d0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN&redirect_uri=https://portainer.fourpets.net&scope=email%20openid%20profile&prompt=login&state=11dd787f-d4c3-49b6-a27e-f37b56880c77", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 109, "remote": "192.168.3.83", "request_id": "3386a34d2e414b308b8badfe1dc4933f", "runtime": 85, "schema_name": "public", "scheme": "https", "status": 302, "timestamp": "2024-11-01T09:19:37.422814", "user": "martijn", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"domain_url": null, "event": "/ws/client/", "level": "info", "logger": "authentik.asgi", "pid": 109, "remote": "192.168.3.83", "schema_name": "public", "scheme": "ws", "timestamp": "2024-11-01T09:19:37.503568", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "session", "domain_url": "auth.fourpets.net", "event": "/if/flow/default-provider-authorization-implicit-consent/?response_type=code&client_id=d0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN&redirect_uri=https%3A%2F%2Fportainer.fourpets.net&scope=email+openid+profile&prompt=login&state=11dd787f-d4c3-49b6-a27e-f37b56880c77", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 109, "remote": "192.168.3.83", "request_id": "ed1b271d4f9d475a89a9a52bfa9826c7", "runtime": 42, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:37.516171", "user": "martijn", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"domain_url": null, "event": "/ws/client/", "level": "info", "logger": "authentik.asgi", "pid": 108, "remote": "192.168.3.83", "schema_name": "public", "scheme": "ws", "timestamp": "2024-11-01T09:19:37.697907", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "session", "domain_url": "auth.fourpets.net", "event": "/api/v3/root/config/", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 109, "remote": "192.168.3.83", "request_id": "077a536dec534d3db8ea107a4cfc6526", "runtime": 19, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:37.725544", "user": "martijn", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "session", "domain_url": "auth.fourpets.net", "event": "/api/v3/core/brands/current/", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 108, "remote": "192.168.3.83", "request_id": "05323baac655420d9e24ed69937cd815", "runtime": 27, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:37.732893", "user": "martijn", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"action": "authorize_application", "auth_via": "session", "client_ip": "192.168.3.83", "context": {"authorized_application": {"app": "authentik_core", "model_name": "application", "name": "Portainer", "pk": "79273ca130ba405eab38be9e62ddd1c7"}, "flow": "de4f8be5b5ff41bb918d1ddd9bd809e2", "http_request": {"args": {"client_id": "d0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN", "prompt": "login", "redirect_uri": "https://portainer.fourpets.net", "response_type": "code", "scope": "email openid profile", "state": "11dd787f-d4c3-49b6-a27e-f37b56880c77"}, "method": "GET", "path": "/api/v3/flows/executor/default-provider-authorization-implicit-consent/", "request_id": "31c1e5a332cd4c009a9f2fb5750e3b17", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}, "scopes": "email profile openid"}, "domain_url": "auth.fourpets.net", "event": "Created Event", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.events.models", "pid": 109, "request_id": "31c1e5a332cd4c009a9f2fb5750e3b17", "schema_name": "public", "timestamp": "2024-11-01T09:19:37.757568", "user": {"email": "[email protected]", "pk": 5, "username": "martijn"}}
{"auth_via": "session", "domain_url": "auth.fourpets.net", "event": "/api/v3/root/config/", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 109, "remote": "192.168.3.83", "request_id": "56066344fc104b3386d847cbc227b684", "runtime": 19, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:37.781725", "user": "martijn", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "session", "domain_url": "auth.fourpets.net", "event": "/api/v3/core/brands/current/", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 108, "remote": "192.168.3.83", "request_id": "1102e1717ac84e9e9859dbccba16ec3f", "runtime": 24, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:37.792720", "user": "martijn", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "session", "domain_url": "auth.fourpets.net", "event": "Task published", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.root.celery", "pid": 109, "request_id": "31c1e5a332cd4c009a9f2fb5750e3b17", "schema_name": "public", "task_id": "94260bb0c2294eb6a1748e5a923a7c7a", "task_name": "authentik.events.tasks.event_notification_handler", "timestamp": "2024-11-01T09:19:37.809878"}
{"auth_via": "session", "domain_url": "auth.fourpets.net", "event": "/api/v3/flows/executor/default-provider-authorization-implicit-consent/?query=response_type%3Dcode%26client_id%3Dd0oy5UqnEvKkbeJLmELyYLHijIlIVX8v6zJ411xN%26redirect_uri%3Dhttps%253A%252F%252Fportainer.fourpets.net%26scope%3Demail%2Bopenid%2Bprofile%26prompt%3Dlogin%26state%3D11dd787f-d4c3-49b6-a27e-f37b56880c77", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 109, "remote": "192.168.3.83", "request_id": "31c1e5a332cd4c009a9f2fb5750e3b17", "runtime": 91, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:37.820869", "user": "martijn", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0"}
{"auth_via": "oauth_client_secret", "domain_url": "auth.fourpets.net", "event": "/application/o/token/", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "POST", "pid": 108, "remote": "172.19.0.1", "request_id": "843535b98d174c2ca570d783d25bbedb", "runtime": 104, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:38.635724", "user": "", "user_agent": "Go-http-client/2.0"}
{"auth_via": "oauth_token", "domain_url": "auth.fourpets.net", "event": "/application/o/userinfo/", "host": "auth.fourpets.net", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 108, "remote": "172.19.0.1", "request_id": "832b750cf9114c44ba455d475be31148", "runtime": 25, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2024-11-01T09:19:38.683392", "user": "", "user_agent": "Go-http-client/2.0"}
{"auth_via": "unauthenticated", "domain_url": "0.0.0.0", "event": "/-/health/live/", "host": "0.0.0.0:9000", "level": "info", "logger": "authentik.asgi", "method": "HEAD", "pid": 108, "remote": "127.0.0.1", "request_id": "9b62a2c3ddeb49ea9199bcb00ed80ceb", "runtime": 8, "schema_name": "public", "scheme": "http", "status": 200, "timestamp": "2024-11-01T09:19:41.851780", "user": "", "user_agent": "goauthentik.io/healthcheck"}
{"auth_via": "secret_key", "domain_url": "0.0.0.0", "event": "/api/v3/outposts/instances/", "host": "0.0.0.0:9000", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 108, "remote": "127.0.0.1", "request_id": "a1fb774a7ef649cf856c4aec25014fde", "runtime": 50, "schema_name": "public", "scheme": "http", "status": 200, "timestamp": "2024-11-01T09:20:09.011813", "user": "ak-outpost-b0acc5eae29f40f2a478ec64cef53124", "user_agent": "goauthentik.io/outpost/2024.10.0"}
{"auth_via": "secret_key", "domain_url": "0.0.0.0", "event": "/api/v3/outposts/proxy/?page=1&page_size=100", "host": "0.0.0.0:9000", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 108, "remote": "127.0.0.1", "request_id": "159011d120cb42ec91b417fa1fe781fe", "runtime": 45, "schema_name": "public", "scheme": "http", "status": 200, "timestamp": "2024-11-01T09:20:09.078607", "user": "ak-outpost-b0acc5eae29f40f2a478ec64cef53124", "user_agent": "goauthentik.io/outpost/2024.10.0"}
{"event":"updating brand certificates","level":"info","logger":"authentik.router.brand_tls","timestamp":"2024-11-01T09:20:09Z"}
{"auth_via": "secret_key", "domain_url": "0.0.0.0", "event": "/api/v3/core/brands/?page=1&page_size=100", "host": "0.0.0.0:9000", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 108, "remote": "127.0.0.1", "request_id": "5ed33f02e9e74bb4a1e828e5a04d7b52", "runtime": 27, "schema_name": "public", "scheme": "http", "status": 200, "timestamp": "2024-11-01T09:20:09.131766", "user": "ak-outpost-b0acc5eae29f40f2a478ec64cef53124", "user_agent": "goauthentik.io/outpost/2024.10.0"}
{"auth_via": "unauthenticated", "domain_url": "0.0.0.0", "event": "/-/health/live/", "host": "0.0.0.0:9000", "level": "info", "logger": "authentik.asgi", "method": "HEAD", "pid": 108, "remote": "127.0.0.1", "request_id": "8cddd865518545eb8b8803055b0fce89", "runtime": 9, "schema_name": "public", "scheme": "http", "status": 200, "timestamp": "2024-11-01T09:20:11.938956", "user": "", "user_agent": "goauthentik.io/healthcheck"}

Hope this explains what is happening.

TheLion avatar Nov 01 '24 09:11 TheLion

It seems like there is an issue caused by the query parameter prompt=login, the same is happening with NetBird.

mlsmaycon avatar Apr 10 '25 16:04 mlsmaycon

Never mind my previous comment, this is not an issue, the prompt = login should cause the additional login for client authentication.

mlsmaycon avatar Apr 10 '25 16:04 mlsmaycon

@BeryJu confirmed with a few users that the issue is not the request for authentication, but rather that when using an external source like Google and having the prompt=login in the authentication url, the login flow does seem to be working correctly.

mlsmaycon avatar Apr 11 '25 09:04 mlsmaycon

Is there anything that I can do to solve this for Portainer? Or is it something that the devs of Portainer/Authentik could solve?

TheLion avatar May 04 '25 12:05 TheLion

I don't know if this was the same issue but, I was having a similar issue of having to sign in twice, I found out that Portainer has a setting that is not well named. There is a "use SSO" setting on the authentication page of Portainer, and when its not enabled, it forces a re-authentication with the SSO which requires logging in a second time. Turning this setting on removed my need of authenticating twice. I figured "use SSO" meant that it would force SSO and not allow for internal, but it seems that is a different setting that is only shown if that setting is on.

This likely isn't the solution to your issue but, I figured I would chime in /just in case/ since I haden't seen mention of the setting previously in the issue.

piks avatar Jul 20 '25 17:07 piks

I don't know if this was the same issue but, I was having a similar issue of having to sign in twice, I found out that Portainer has a setting that is not well named. There is a "use SSO" setting on the authentication page of Portainer, and when its not enabled, it forces a re-authentication with the SSO which requires logging in a second time. Turning this setting on removed my need of authenticating twice. I figured "use SSO" meant that it would force SSO and not allow for internal, but it seems that is a different setting that is only shown if that setting is on.

This likely isn't the solution to your issue but, I figured I would chime in /just in case/ since I haden't seen mention of the setting previously in the issue.

You are a genius!

The setting was turned off and turning it on solved the double login prompt! 🙏🙏🙏

Very grateful!

TheLion avatar Jul 20 '25 18:07 TheLion