Google's configuration requires a SAML Application (for login) and a Service Account with domain-wide delegation (for user provisioning).
Part A: SAML Authentication (Login)
-
Go to the Google Admin Console (
admin.google.com). -
Go to
Apps > Web and mobile apps. -
Click
Add app > Add custom SAML app. -
Download metadata: On the "Google Identity Provider details" screen, click "Download Metadata".
-
Upload this file (e.g.
google-metadata.xml) to an accessible path on your server (e.g./opt/anjana/config/saml/).
-
-
Configure SP data (your application):
-
Entity ID:
identificador-unico-para-saml(unique and must match theyml). -
ACS URL:
https://dev.anjanadata.org/gateway/saml2/sso/devgcp(the keydevgcpmatches the one used in theymlbelow).
-
-
Activate the application: Turn on "User access" for the users or groups that need access.
Part B: User Provisioning (user list)
-
Go to the Google Cloud Console (
console.cloud.google.com). -
Go to
IAM & Admin > Service Accountsand create a new account. -
Generate a JSON key for this service account.
-
jsonPath/jsonContent: Upload this JSON file to your server (file:/...) or paste its content into theyml.
-
-
Copy the "Unique ID" (Client ID) of the service account.
Domain-wide delegation
-
Go back to the Google Admin Console (
admin.google.com). -
Go to
Security > Access and data control > API controls. -
Click "Manage Domain Wide Delegation".
-
Add a new delegation:
-
Client ID: Paste the "Unique ID" of your service account.
-
OAuth Scopes: Paste this list (comma-separated):
https://www.googleapis.com/auth/admin.directory.user.readonly,https://www.googleapis.com/auth/admin.directory.group.readonly,https://www.googleapis.com/auth/admin.directory.group.member.readonly
-
Final data for the yml
-
delegatedUser: Email of a Google Super Administrator account (e.g.admin@su-dominio.com). -
groupnames: Emails/identifiers of Google groups with users who have access (e.g.usuarios-anjana@su-dominio.com). -
application-name: Application name for audits in Google Workspace
Example application-default.yml file
This example details the SAML-specific properties for GCP. The properties common to all providers are found in SAML 2.0 (Deprecated)
security:
provisioning:
providers:
google:
# The key 'devgcp' must be IDENTICAL to the key used in 'saml2'
devgcp:
# Email of a Google Super Administrator account
delegated-user: <delegatedUser>
# Application name for audits in Google Workspace
application-name: <appName>
# Emails/identifiers of Google groups with users who have access
groupNames:
- <group1>
- <group2>
# JSON with the required authentication content, can be obtained directly from GCP
json-content: |
{
<content>
}
# Path where the JSON with the authentication content is located, can be used instead of json-content
json-path: /opt/AAAAA-aaabbbccc.json # absolute path --> /xxxxxx.json