ciur / papermerge

Open Source Document Management System for Digital Archives (Scanned Documents)
https://papermerge.com
Apache License 2.0
2.54k stars 266 forks source link

OPEN_ID Login impossible #634

Open maxulm opened 4 days ago

maxulm commented 4 days ago

Hi, open-id login is impossible. The application doesn't work as soon as i enter the oidc environment variables. The following error occurs: Field required [type=missing, inputvalue={'papermergeauthoidc...eth.name/oidc/callback'}, input_type=dict] 2024-11-10T08:17:43.121684274Z For further information visit https://errors.pydantic.dev/2.7/v/missing

Info:

ciur commented 4 days ago

What OpenID provider do you use ? What's your setup ?

maxulm commented 4 days ago

I've tried it with azure ad and afterwards with keycloak. Both didn't work :/ This is my configuration: msedge_2024-11-10_11-43-37

ciur commented 3 days ago

Is there an error on auth server side (keycloak) ? Could you pls paste here (last, which maybe contain error, warning, or some evidence that it is being accessed by client) logs from keycloak ? What is the configuration of the client on keycloak side ? What are the errors on Papermerge side ?

maxulm commented 3 days ago

No, there are no errors on keycloak. This is the docker output:

2.168.178.229 - - [11/Nov/2024:06:43:09 +0000] "GET /favicon.ico HTTP/1.1" 500 579 "http://192.168.178.50/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0"
2024/11/11 06:43:09 [error] 58#58: *12 no live upstreams while connecting to upstream, client: 192.168.178.229, server: _, request: "GET /favicon.ico HTTP/1.1", subrequest: "/verify", upstream: "http://localhost/verify", host: "192.168.178.50", referrer: "http://192.168.178.50/"
2024/11/11 06:43:09 [error] 58#58: *12 auth request unexpected status: 502 while sending to client, client: 192.168.178.229, server: _, request: "GET /favicon.ico HTTP/1.1", host: "192.168.178.50", referrer: "http://192.168.178.50/"

192.168.178.50 is the papermerge host 192.1678.178.229 is the client

ciur commented 3 days ago

In first message you pasted following error:

Field required [type=missing, input_value={'papermerge__auth__oidc_...eth.name/oidc/callback'}, input_type=dict]

It means you are missing "papermergeauthoidc..." variable. This translates to missing `PAPERMERGEAUTHOIDC...` environment variable.

Can you figure out from logs complete variable name and provide it here? Could you please paste here full trace of

Field required [type=missing, input_value={'papermerge__auth__oidc_...eth.name/oidc/callback'}, input_type=dict]
2024-11-10T08:17:43.121684274Z For further information visit https://errors.pydantic.dev/2.7/v/missing

of above error ?

maxulm commented 3 days ago

@ciur those are the variables: msedge_muI8mgzdfP

ciur commented 2 days ago

Still, my question was about the missing information: "...":

Field required [type=missing, input_value={'papermerge__auth__oidc_...eth.name/oidc/callback'}, input_type=dict]
2024-11-10T08:17:43.121684274Z For further information visit https://errors.pydantic.dev/2.7/v/missing

Could you provide full error (without "...")?

maxulm commented 2 days ago

I‘d like to but the Logs are shortened by default :/