-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation: Missing OAuth2 scopes required for group validation (Google Workspace) #305
Comments
Hm strange. Normally, if validation groups is enabled, openvpn-auth-oauth2 automaticly set
And the
|
Could you please explain this to me? |
Initially I went with this http:
baseurl: "https://***/"
listen: ":9000"
secret: "***"
oauth2:
provider: "google"
issuer: "https://accounts.google.com"
client:
id: "***"
secret: "***"
scopes:
- "openid"
- "profile"
- "email"
validate:
groups:
- "***"
refresh:
enabled: true
expires: "8h"
secret: "***"
validate-user: true
use-session-id: true
openvpn:
addr: "unix:///run/openvpn/server.sock"
password: "***" It results in an authentication error:
I just replicated it. If I add the required scope, the error is gone and the authentication flow works as expected: http:
baseurl: "https://***/"
listen: ":9000"
secret: "***"
oauth2:
provider: "google"
issuer: "https://accounts.google.com"
client:
id: "***"
secret: "***"
scopes:
- "openid"
- "profile"
- "email"
- "https://www.googleapis.com/auth/cloud-identity.groups.readonly"
validate:
groups:
- "***"
refresh:
enabled: true
expires: "8h"
secret: "***"
validate-user: true
use-session-id: true
openvpn:
addr: "unix:///run/openvpn/server.sock"
password: "***"
I just discovered that if I remove the If that's all intended, maybe it's worth mentioning the default scopes in the providers section of the documentation 🙇♂️ With that all being said, I believe that there's still a missing step of enabling the
Please disregard that part, I made an incorrect assumption there 🙇♂️ When the issue was present, I had to manually remove the consent to trigger the consent screen again, but it's a non-issue when the scopes are configured properly. |
Is it required? On my test workspace, I did not configure that. #306 add the info, that |
Problem Statement
The documentation on group validation for the Google Workspace provider mentions enabling Cloud Identity API, but omits that both allowed and requested scopes have to include
https://www.googleapis.com/auth/cloud-identity.groups.readonly
. Otherwise, the following error is observed:Proposed Solution
Update the docs here to include:
.../auth/cloud-identity.groups.readonly
https://www.googleapis.com/auth/cloud-identity.groups.readonly
tooauth2.scopes
Additional information
I'd also add that if users have already went through the consent screen before the additional scopes were added, they have to remove the consent manually at https://account.google.com
Acceptance Criteria
The text was updated successfully, but these errors were encountered: