Closed KodakMaciel closed 2 weeks ago
Sounds like the token exchange URL of your IDP returns 404 not found.
Sep 24 08:53:17 openvpn openvpn-auth-oauth2[378859]: time=2024-09-24T08:53:17.343-03:00 level=WARN msg="Unauthorized: failed to exchange token: oauth2: \"Not found\"" ip=201.47.211.5:63564 cid=0 kid=1 common_name=dvasconcelos error_id=ec49aeac0f5d3800f2648ae9e3c80d282c8e3409f99c40e8bef727623e2c52d8
how can i resolve the log below?
Sep 24 08:53:17 openvpn openvpn-auth-oauth2[378859]: time=2024-09-24T08:53:17.343-03:00 level=WARN msg="Unauthorized: failed to exchange token: oauth2: \"Not found\"" ip=201.47.211.5:63564 cid=0 kid=1 common_name=dvasconcelos error_id=ec49aeac0f5d3800f2648ae9e3c80d282c8e3409f99c40e8bef727623e2c52d8
Unauthorized: failed to exchange token: oauth2: \"Not found\""
After you logged into into IDP, openvpn-auth-oauth2 do a token exchange. It using the auth code returned by the user login and calls the OIDC compatible token endpoint and exchange the auth code with an access token.
oauth2: \"Not found\"
mean that the error is coming from golang standard library oauth2
which simply returns Not found
.
Since a HTTP call is done in that context, the error "Not found" returns, because the HTTP call return 404 not found.
This error can happen, if you configure a wrong oauth2.endpoint.token
OR the auto discovery returns a incorrect endpoint.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Problem Statement
Hello! I'm getting "deny OpenVPN client cid", what could it be?
Below are my settings.
Ubuntu
log oauth(syslog)
Server Config
Client Config
OpenVPN Version
Environment