Google Workspace Configuration using SAML 2.0
As of this writing, Google Workspace seems to support SAML 2.0 and not OIDC.
In Google Workspace
- Visit https://admin.google.com and log in as a super-administrator user.
- Visit https://admin.google.com/ac/apps/unified
- Click “Add App” -> “Add custom SAML app”
- Set “App name” to
Philanthropy Data Commons - Set “Description” to
Allows login to the PDC using this Google Workspace - Set “App icon” to the PDC logo
- Click “Continue”
- Click “DOWNLOAD METADATA” and save the XML file
- Click “Continue”
Send the metadata XML file to the person helping with integration.
In PDC Keycloak
- Visit the Keycloak admin console
- In the PDC realm, visit “Identity providers”
- Click “Add Identity Provider” of type “SAML v2.0.” If none are present such
that “Add Identity Provider” is not available, click “SAML v2.0” under “User
defined” - Set the “Alias” to the descriptive, simple, unique alias named above, e.g.
foundation-google-saml, Important: this alias sets the broker or
“Single Sign-on URL” used by Google for integration and therefore must match
the “Single Sign-on URL” configured in Google Workspace - Set “Use entity descriptor” to “Off”
- Under “Import config from file” click “Browse”
- Choose the metadata file downloaded from Google above
- Ensure “NameID policy format” is set to “Email”
- Ensure “Principal type” is set to “Subject NameID”
- Set “Want Assertions signed” to “On”
- Ensure “Validate signatures” is “On”
- Set “Pass subject” to “On”
- Set “Sync mode” to “Import”
- Click “Save”
- Visit the new Identity provider’s Provider details
- Write down the “Redirect URI” value and “Service provider entity ID” value
- Click “Mappers” tab
- Add a map from
firstNametofirstName:- Click “Add mapper”
- Set “Name” to
Import First Name - Leave “Sync mode override” as
Inherit - Select
Attribute Importerfrom the “Mapper type” dropdown menu - Set “Attribute Name” to
firstNameImportant: this attribute name
must match a “Name” set in Google “App attributes” for the import to work - Leave “Name Format” as
ATTRIBUTE_FORMAT_BASIC - Select
firstNamefrom the “User Attribute Name” dropdown - Click “Save”
- Add a map from
lastNametolastName:- Click “Add mapper”
- Set “Name” to
Import Last Name - Leave “Sync mode override” as
Inherit - Select
Attribute Importerfrom the “Mapper type” dropdown menu - Set “Attribute Name” to
lastNameImportant: this attribute name must
match a “Name” set in Google “App attributes” for the import to work - Leave “Name Format” as
ATTRIBUTE_FORMAT_BASIC - Select
lastNamefrom the “User Attribute Name” dropdown - Click “Save”.
Send the following information to the organization integrating Google:
- PDC Keycloak’s “Redirect URI” (to be Google’s “ACS URL”)
- PDC Keycloak’s “Service provider entity ID” (to be Google’s “Entity ID”)
Link the newly added IdP to its corresponding organization.
See also this Keycloak documentation:
https://www.keycloak.org/docs/26.2.5/server_admin/index.html#_managing_identity_provider_
- Visit “Organizations”
- Open the organization
- Click the “Identity Providers” tab
- Click “Link identity provider”
- Select the IdP (created above) from the “Identity provider” dropdown menu
- Select the organization’s domain name from the “Domain” dropdown menu
- Keep “Hide on login page” set to
On - Set “Redirect when email domain matches” to
On - Click “Save”.
In Google Workspace Again
- Enter Keycloak’s “Redirect URI” as Google’s “ACS URL”
- Enter Keycloak’s “Service provider entity ID” as Google’s “Entity ID”
- Ensure “Signed response” is unchecked (assertions will still be signed)
- Set “Name ID format” to
Email - Set “Name ID” to
Basic Information > Primary email - Click “Continue”
- Under Attributes, click “Add Mapping”
- Select “First name”, set “App attributes” to
firstNameImportant: this
attribute name must match an “Attribute Name” set in Keycloak Mappers for the
import to work. - Click “Add Mapping” again
- Select “Last name”, set “App attributes” to
lastNameImportant: this
attribute name must match an “Attribute Name” set in Keycloak Mappers for
the import to work. - Click “Finish”
By default, User access is “OFF for everyone” so create a group for PDC access.
- Click “Directory” on the leftmost menu
- Click “Groups”
- Click “Create group” or “CREATE A GROUP”
- Set “Group name” to “PDC”
- Set “Group email” to “pdc”
- Set “Group description” to “Philanthropy Data Commons users”
- Check “Security” to make it a security group to which you apply policies
- Click “Next”
- Set “Access type” to “Restricted”
- Click “CREATE GROUP”
Add at least one member to the newly created PDC group.
- From the PDC group, click “ADD MEMBERS”
- Find and add a user by clicking “ADD TO GROUP”
Grant members of the PDC group access to log in to the PDC App.
- Visit the “Apps” area
- Click the “Philanthropy Data Commons” app
- Under “User access” click the inverted carat to expand “User access”
- Under “Philanthropy Data Commons” click “Groups”
- Click “Search for a group”
- Click the “PDC” group
- Under “Service status” click “ON”
- Click “SAVE”
- Visit the “Philanthropy Data Commons” app again
- Verify that “User access” is “ON for 1 group”, namely the “PDC” group
This content was automatically generated from GitHub. Any edits made on WordPress will be lost.