Configuring Custom Service Applications

Use this information to configure a service application for an OAuth 2.0 authorization server that is not currently supported by Oracle for the PeopleSoft system.

You can create a REST Consumer (Client) or REST Provider (Resource) service application for a non-supported authorization server. .

Configuring the Service Application as a Client

  • Create a new service application.

    On the Add a New Value page, select CUST from the Authorization Server drop-down list.

  • Configure the Service Applications page.

    Select Client Only, and supply the required information for the authorization server, as described in Service Applications - REST Consumer.

  • Use PeopleCode to configure any format or additional properties that are required to retrieve the OAuth token.

    Modify the following application package for your requirements:

    Application Package: PT_SECURITY Application Path: OAuth2 Application Class: SEC_AUTHTOKEN.

    Modify the method to retrieve the OAuth 2.0 token. If the authorization server does not use an OAuth 2.0 token, use the following methods to properly store and retrieve the token from the database. These APIs will perform all necessary encryption and decryption of the token for storage.

    Application Package: PT_SECURITY Application Path: Oauth2 Application Class: CUSTOM   
    class CUSTOM
       method CUSTOM();
       method StoreToken(&sName As string, &sToken As string, &UserID As string, &Dttm_expire As datetime);
       method GetToken(&Name As string, &UserID As string) Returns string;
       method DeleteToken(&Name As string, &UserID As string);
       method TokenValidation(&sToken As string, &ExternalOperationName As string) Returns string;
    end-class;

Configuring the Service Application as a Resource

  • Create a new service application.

    On the Add a New Value page, select CUST from the Authorization Server drop-down list.

  • Configure the Service Applications page.

    Select Resource Only, and supply the required information for the authorization server, as described in Service Application - REST Provider.

  • Update the Integration Broker integrationGateway.properties file.

    In this case, the non-supported authorization server contacts the PeopleSoft authorization framework and passes in a token as part of the authorization header. To enable this, you must disable the Integration Broker OAuth 2.0 framework by modifying the integrationGateway.properties file. Set the following option:

    ig.TurnOffOAuth2=TRUE

    See Integration Broker Administration: Using the integrationGateway.properties File and Disabling OAuth2 Authentication for REST Service Operations.

  • Use PeopleCode to configure any format or additional properties that are required to retrieve the OAuth token.

    Setting the ig.TurnOffOAuth2 option means that the OAuth 2.0 processing by the application server will bypass the Integration Broker OAuth 2.0 framework and instead call the following Application Class Method, passing the contents of the authorization header

    Add PeopleCode to perform the necessary validation and authorization. For the return value, specify the appropriate PeopleSoft UserID to perform the rest of the IB authorization. This should be a valid PeopleSoft user, with the proper permissions to invoke the Service Operation requested. Define a PeopleCode exception if validation or authentication fails.

    /* method should only be called from IB authorization when oAuth2 validation
    is turned off at the Gateway. Customer should update this method to evaluate 
    the Token and determine UserID for IB context for the invoked integration.
    return the appropriate UserID or "" which results in using the default UserID off 
    the Anonymous Node.
    */method TokenValidation
       /+ &sToken as String, +/
       /+ &ExternalOperationName as String +/
       /+ Returns String +/
       
       Return "";
       
    end-method;;