Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel

Table of Contents

SSO Google

...


Panel

Table of Contents

Overview

Assuming the following service configuration on the UDMG Authentication Proxy, the below sections describe how to add the google, openid, and oauth provider as options for user authentication.

Code Block
languagetext
[service.localsso]
protocol = "http"
policy = "failover"
admins
= ["admin"]

[service.localsso.credential]
username = "user"
password = "password"

[[service.localsso.targets]]
hostname = "b2bmftudmg.stonebranch.com"
port = 9180

...

18080


All the examples assume that Google Cloud is the identity provider.

For OpenID and Oauth2, other identity providers can be configured, provided that the needed configuration parameters are known.


Image Added

Example with Google OAuth

Before you begin


The Redirect URI (or callback URI) must be determined.

It will be in the form https://<FQDN>:<PORT>/service/auth/sso/google/callback, where FQDN and PORT are the name and port for the host where the UDMG Authentication Proxy and NGINX server are installed.

For example https://udmg.stonebranch.com/service/auth/sso/google/callback.

Configuration on Google Cloud

  • Create a new Project under your

...

Image RemovedImage Added

Image RemovedImage Added

  • From the menu Create Credentials Select OAuth Client ID.
  • The application type must be: Web Application
  • Under the Authorized redirect URIs,  put the

...

https://<fqnd>:<port>/service/auth/sso/google/callback

...

  • value for UDMG Authentication Proxy callback URI.

Image Added

  • Click Create
  • Keep the client id, the client secret and the JSON file for reference. This is needed to complete the setup on UDMG.

Image Added


Reference:

https://b2bmftdevelopers.stonebranchgoogle.com:9190/servicechat/authapi/ssoguides/google/callback

Configure your application.

After you complete the form, copy the following field or download the json file where you will have the credentials needed to prepare our setup.

Create the following instance under your service with the path related to the configuration file

...

auth/users#step_3_create_oauth_client_id_credentials_in

Configuration on UDMG

To configure the SSO Google integration on UDMG Authentication Proxy, follow these steps.

  • Create a google provider section in the configuration file for a service, for example here for the service sso:
Code Block
languagetext
[service.sso.auth.google]
file = "udmg-sso-google

...

.json"
  • Add a file parameter with a filename, for example udmg-sso-google.json
  • Create this configuration file in the same location as the UDMG Authentication Proxy configuration file
  • Fille in the clientID and clientSecret with the values from the setup on Google Cloud.
  • Set the redirectURI with the callback URI for the UDMG Authentication Proxy.
  • Set the hostedDomain to the list of white listed domains on Google Apps.
Code Block
languagetext
{
    "clientID": "client-id",
    "clientSecret": "client-server",
    "redirectURI": "

...

https://udmg.stonebranch.com/service/auth/sso/google/callback",
    "hostedDomains": ["domain.com"]
}

Note

If you are going to use a public domain, like @gmail@gmail.com dont , don't setup the hostedDomains, since the hd parameter in the callback will be empty.

  • Restart the UDMG Auth Proxy.
  • The google provider is now available for the sso service on UDMG Admin UI login page

Example with OpenID Provider

Before you begin


The Redirect URI (or callback URI) must be determined.

It will be in the form https://console.cloud.google.com/apis/credentials<FQDN>:<PORT>/service/auth/sso/openid/callback, where FQDN and PORT are the name and port for the host where the UDMG Authentication Proxy and NGINX server are installed.

For example https://udmg.stonebranch.com:8080/service/auth/sso/openid/callback.

Configuration on UDMG

To configure the SSO OpenID integration on UDMG Authentication Proxy, follow these steps.

  • Create a oidc provider section in the configuration file for a service, for example here for the service sso:
Code Block
languagetext
[service.localsso.auth.oidc]
file = "udmg-sso-openid-config.json"
  • Add a file parameter with a filename, for example udmg-sso-openid.json
  • Create this configuration file in the same location as the UDMG Authentication Proxy configuration file
  • Fill in the clientID and clientSecret with the values from the setup on Google Cloud.
  • Set the redirectURI with the callback URI for the UDMG Authentication Proxy.
Code Block
languagetext
{
    "issuer": "https://accounts.google.com",
    "clientID": "<client-id>",
    "clientSecret": "<client-secret-id>",
    "redirectURI": "https://<fqdn>udmg.stonebranch.com/service/auth/sso/openid/callback"
}
  • Restart the UDMG Auth Proxy.
  • The openid provider is now available for the sso service on UDMG Admin UI login page


Reference:

https://console.cloud.google.com/apis/credentials

https://developers.google.com/identity/openid-connect/openid-connect

Example with OAuth2 Provider

Before you begin


The Redirect URI (or callback URI) must be determined.

It will be in the form https://<FQDN>:<PORT>/service/auth/sso/openid/callback, where FQDN and PORT are the name and port for the host where the UDMG Authentication Proxy and NGINX server are installed.

For example https://udmg.stonebranch.com/service/auth/sso/openid/callback.


Configuration on OAuth2 identity provider

The following parameters must be known

  • Client ID
  • Client Secret
  • token URL
  • authorization URL
  • User Info URL

Scope and user email

The user email is needed for the identification of the user record in UDMG and must be returned by the identity provider.

The specific required scope depends on the identity provider.

In the case of OAuth2 with Google Cloud Provider, it is required to grant additional scopes for that purpose.

  • On Google Cloud console, go to OAuth consent screen and edit the App.

Image Added

  • Under the Scopes step

Image Added

  • Grant the following scopes

Image Added

  • After clicking Update the scopes, they are listed under Your non-sensitive scopes

Image Added

Configuration on UDMG

To configure the SSO OAuth integration on UDMG Authentication Proxy, follow these steps.

  • Create an oauth provider section in the configuration file for a service, for example here for the service sso:
Code Block
languagetext
[service.localsso.auth.oauth]
file = "udmg-sso-oauth-config.json"
{
    "issuer": "https://accounts.google.com",.json"
  • Add a file parameter with a filename, for example udmg-sso-oauth.json
  • Create this configuration file in the same location as the UDMG Authentication Proxy configuration file
  • Fill in the clientID and clientSecret with the values from OAuth identity provider.
  • Set the redirectURI with the callback URI for the UDMG Authentication Proxy.
  • Set the tokenURL, authorizationURL and userInfoURL with the values from OAuth identity provider.
Google provider offers a setup for Oauth2.
Code Block
languagejs
{
    "clientID": "<client-id>",
    "clientSecret": "<client-secret-id>",
    "redirectURI": "https://<fqdn>udmg.stonebranch.com/service/auth/sso/oauth/callback",
    "tokenURL": "https://oauth2.googleapis.com/token",
    "authorizationURL": "https://accounts.google.com/o/oauth2/auth",
    "scopes": ["profile"],
    "insecureSkipVerify": true,
    "userInfoURL": "https://www.googleapis.com/oauth2/v3/userinfo",
    "userIDKey": "sub"
}
Note
  • Restart the UDMG Auth Proxy.
  • The oauth provider is now available for the sso service on UDMG Admin UI login page

Reference: