ABAP OAuth
[Zurück zur aktuellen Version][Diese Version wiederherstellen]

Connecting SAP SuccessFactors Using an OAuth 2.0 Client (OA2CS)#

Follow
SIMG > ABAP Platform > Application Server > Basis Services > Communication Interfaces
> OAuth 2.0 Client Implementation for SAP SuccessFactors Integration

The default implementation allows only a connection to ONE SuccessFactors instance.
Then you can use the existing objects.

This ones decribes how to create custom objects for multiple instances.

certificates / communication#

1. Configure Proxy Settings
x.SICF > F8 > Menu > Client > Proxy Settings

OAuth configuration#

x. OA2C_CONFIG (t.oa2c_client)

<sf_host>/oauth/token
form, header, current, SAML
www.successfactors.com
998

Modifications#

Whenever you choose to create SAML a new STRUST is created: "SSF OAuth2 Client Identity Provider - Signature" (x.SSFA) table SSFAPPLIC <==== > Create entry with r.ZMDW_TEST

Note: use always same case to avoid mixing up at all artifacts: Profile, Type, Application ID, Service Provider Type, SSF ID, Server

CL_OA2C_SPECIFICS_DEFAULT
CL_OA2C_CONFIG_EXT_DEFAULT

BADI Definition:	OA2C_SPECIFICS_BADI_DEF
BADI Implementation:	SMI_OA2C_SPEC_SFSF_BIZX				
Filter Value:		SUCCESSFACTORS
Implementation Class:	CL_SMI_OA2C_SPEC_SFSF	=> copied to ZCL_SMI_OA2C_SPEC_SFSF_CD
						=> exchange all references from class CL_SMI_OA2C_CONFIG_SFSF to ZCL_SMI_OA2C_CONFIG_SFSF_CD
						=> edit method IF_OA2C_SPECIFICS~GET_CONFIG_EXTENSION (replace R_CONFIG_EXTENSION name)
						
BADI Definition:	OA2C_CONFIG_EXTENSION_BADI_DEF
BAdI Implementation:	SMI_OA2C_CONFIG_SFSF_BIZX
Filter Value:		SUCCESSFACTORS
Implementation Class:	CL_SMI_OA2C_CONFIG_SFSF => copied to ZCL_SMI_OA2C_CONFIG_SFSF_CD
						=> update attributes GC_APPLICATION and GC_SMI_SP_SFSF
						
SE18 > BAdI OA2C_CONFIG_EXTENSION_BADI_DEF 
	> Right-Click > Create implementation > ei.Z_SMI_OA2C_SPEC_SFSF_BIZX_CD
	> bi.Z_SMI_OA2C_SPEC_SFSF_CD
	> assign class from above and add filter

SE18 > BAdI OA2C_SPECIFICS_BADI_DEF 
	> Right-Click > Create implementation > ei.Z_SMI_OA2C_CONFIG_SFSF_CD
	> bi.Z_SMI_OA2C_CONFIG_SFSF_BIZX_CD
	> assign class from above and add filter	

Connection Test#

r.RCLB2_DEMO_GENERIC

Successfactors auth endpoints#

The first is not secure anymore and should not be used anymore.

/oauth/idp
	parameters: 
		client_id
		user_id
		private_key
		token_url
		use_email
		use_username  <=== true
/oauth/token
	parameters:
		company_id
		client_id
		grant_type
		assertion
		new_token	<=== true

Trace#

/usr/sap/DMD/D11/work/dev_w* (work process traces) => search for "OA2C"

Issues#

Enable SAML button#

OA2C_CONFIG > reenable/toggle "SAML 2.0 Disabled" is creating a new certificate at STRUST "SSF OAuth2 Client Identity Provider - Signature", but not if just edited- Then you need to copy the STRUST certificate to SF again!.

400 "Invalid SAML assertion. For the correct SAML assertion format.."#

401 "Unable to verify the signature of the SAML assertion. Please ensure that the assertion has a signature and the key pairs match the client ID."#

401 Unable to authenticate the client (Login failed - invalid user)#

see https://me.sap.com/notes/2668018/E

SAML 2.0 for OAuth 2.0 client is disabled.#