Configure service to service authentication with IdP
Configure SSO for a service-to-service implementaton that is protected by an Identity Provider.
- You must have an account with an OpenID Connect/OAuth2 provider that will provide authentication services for you.
- Determine which single sign-on protocol the IdP uses: OpenID Connect or OAuth2. For details, go to Identify the protocol in use by IdP. If using OAuth2, go to Import IdP metadata as OAuth2 for instructions on importing the metadata in the GAS.
In service-to-service – also known as "machine-to-machine" – implementation, a web service protected by an Identity Provider (IdP) calls another web service. At runtime, the initial service must authenticate with the IdP using a Client ID and Client Secret. The IdP returns an access token with the scopes (permissions) granting access to the web services. The access token is available via the GAS environment at runtime, and the initial web service will send this access token to any other service it needs to use.
Typically, you provide a web application secured by your IdP to provide the interface to the web services, and the services are protected by the application. But in this instance, clients may create their own applications to access your web services; therefore, you want to protect your web service directly with the IdP, which in turn will protect other services it accesses. This is the implementation of service-to-service described in this task.
Steps
- If errors are encountered accessing your service, check the logs:
vm-services-GeneroAccessService*.log, and the
AccessService.log: For instance, if you get error 403 "Forbidden" and you see the following message in the AccessService.log:
ERROR : 29389 - [AccessService] "RetrieveIDPMetadata" INSERT failed :UNIQUE constraint failed: fjs_provider.issuer
Check that the IdP's URL in theDELEGATE
element of your web service xcf is correct. - If a call made to a Genero web service function fails, check the error status code returned to
the client. For example, a value of -1 indicates a failed operation. The code
-15553
with a description such asAsynchronous Connection failed
orconnection timeout expired
indicates an infrastructure error.Check that you have a call to
OAuthAPI.InitService()
in your web service.For more information on handling errors, refer to the Handle REST server errors page in Genero Business Development Language User Guide