OpenID Connect Discovery

OpenID Connect Discovery enables clients to verify the identity of the end user based on the authentication performed by SAP Commerce.

OpenID Connect Discovery is based on two endpoints provided by SAP Commerce.

The Discovery endpoint is available at https://{server}:9002/authorizationserver/.well-known/openid-configuration. The following is an example response from the Discovery endpoint:

{
		  "issuer" : "https://myserver.sap.corp:9002/authorizationserver",
		  "authorization_endpoint" : "https://myserver.sap.corp:9002/authorizationserver/oauth/authorize",
		  "token_endpoint" : "https://myserver.sap.corp:9002/authorizationserver/oauth/token",
		  "jwks_uri" : "https://myserver.sap.corp:9002/authorizationserver/.well-known/jwks.json",
		  "token_endpoint_auth_methods_supported" : [ "client_secret_post", "client_secret_basic" ],
		  "subject_types_supported" : [ "public" ],
		  "response_types_supported" : [ "code", "code id_token", "id_token", "token id_token" ],
		  "scopes_supported" : [ "openid", "email", "groups" ],
		  "id_token_signing_alg_values_supported" : [ "RS256" ]
		}

The JWKS endpoint is available at https://{server}:9002/authorizationserver/.well-known/jwks.json. The following is an example response from the JWKS endpoint:

{
  "keys" : [ {
    "kty" : "RSA",
    "use" : "sig",
    "kid" : "kyma",
    "alg" : "RS256",
    "n" : "ALyXGDrQ3QZcugzjcJDPsVsK7ORTNHxnJIEt0ANM_tPxzf5wd7lFaZ7xjbL2rZaNICxT7MqfY-euvX1PAsXkby8V1MfmwbO7pjgOBhAZp2yTmOScZTrKFuHAbkqk7eGKvO-Nswpj9ed_ubLMpqCjYH5f-dpc21pGIRbRqRQSUoo9z_ZVMGj8y38OaWLCDddBey1Yb2gO4Q0vWDZCwuiqSfqxuQs7fpz1VGkS8URGNd9ZUhyQVYcJFtEiboHalDdDQog8vTPV1jjthkSl0pKSeSfEFnZK3JHiiO9NYKf0aHzIuR0rm_o7COU6o7m20PDAyVW0xbslC1KurbU1AyKP4VM",
    "e" : "AQAB"
  } ]
}

The following is an example configuration:

Property

Example Value

Info

oauth2.kyma.algorithm

RS256

Defaults to RS256

oauth2.kyma.responseTypes

code, code id_token, id_token, token id_token

Defaults to code, code id_token, id_token, token id_token

oauth2.kyma.kid

kyma

kid stands for key id (alias) for the kyma keytore

oauth2.kyma.keystore.location

/security/keystore.jks

Kyma keystore location

oauth2.kyma.keystore.password

nimda123

oauth2.kyma.public.address

http://www.example.com

Replaces myserver.sap.corp from the example Discovery endpoint response with chosen address

To enable configuration per client, you can access endpoints per configuration/key:

  • https://{server}:9002/authorizationserver/.well-known/openid-configuration?client_id={id}

  • https://{server}:9002/authorizationserver/.well-known/ jwks.json ?client_id={id}

For example:

  • https://{server}:9002/authorizationserver/.well-known/openid-configuration?client_id=kyma

  • https://{server}:9002/authorizationserver/.well-known/ jwks.json ?client_id=kyma