ODBC Driver for Workday

Build 22.0.8479

ヘッドレスマシン

Using OAuth on a Headless Machine

To authenticate with a user account on a headless server, it is necessary to authenticate from another machine. Authentication is a two-step process.

  1. Instead of installing the 本製品 on another machine, follow the steps below to obtain the OAuthVerifier value. Or, install the 本製品 on another machine and transfer the OAuth authentication values, after authenticating through the usual browser-based flow.
  2. Configure the 本製品 to automatically refresh the access token from the headless machine.

Follow the headless OAuth authentication flow the OAuth credentials for the custom OAuth app.

Note that the headless OAuth flow uses several undocumented connection properties -- set these in the connection string as usual.

Using the Credentials for a Custom OAuth App

Create a Custom OAuth App

After creating a custom OAuth application, then follow the procedures below to authenticate and connect to data.

Obtain a Verifier Code

Set the following properties on the headless machine:

  • UseWQL: Set this to true.
  • Set the Host and Tenant as usual.
  • InitiateOAuth: Set this to OFF.
  • OAuthClientId: Set this to the Client Id in the OAuth app settings.
  • OAuthClientSecret: Set this to the Client Secret in the OAuth app settings.

Follow the steps below to authenticate from another machine and obtain the OAuthVerifier connection property.

  1. Call the GetOAuthAuthorizationURL stored procedure with the CallbackURL input parameter set to the exact Redirect URI specified in the OAuth app settings.
  2. Open the returned URL in a browser. Log in and grant permissions to the 本製品. You are then redirected to the callback URL, which contains the verifier code.
  3. Save the value of the verifier code. Set this in the OAuthVerifier connection property.

On the headless machine, set the following connection properties to obtain the OAuth authentication values:

  • UseWQL: Set this to true.
  • Set the Host and Tenant as usual.
  • InitiateOAuth: Set this to REFRESH.
  • OAuthVerifier: Set this to the verifier code.
  • OAuthSettingsLocation: Set this to persist the encrypted OAuth authentication values to the specified file.

After the OAuth settings file is generated, set the following properties to connect to data:

  • UseWQL: Set this to true.
  • Set the Host and Tenant as usual.
  • InitiateOAuth: Set this to REFRESH.
  • OAuthClientId: Set this to the client Id assigned when registering the OAuth app.
  • OAuthClientSecret: Set this to the client secret assigned when registering the OAuth app.
  • OAuthSettingsLocation: Set this to the file containing the encrypted OAuth authentication values. Make sure this file gives read and write permissions to the provider to enable the automatic refreshing of the access token.

Transfer OAuth Settings

Follow the steps below to install the 本製品 on another machine, authenticate, and then transfer the resulting OAuth values.

On a second machine, install the 本製品 and connect with the following properties set:

  • UseWQL: Set this to true.
  • Set the Host and Tenant as usual.
  • OAuthClientId: Set this to the client Id assigned when registering the OAuth app.
  • OAuthClientSecret: Set this to the client secret assigned registering the OAuth app.
  • OAuthSettingsLocation: Set this to a writable text file.

Test the connection to authenticate. The resulting authentication values are written, encrypted, to the path specified by OAuthSettingsLocation. Having successfully tested the connection, copy the OAuth settings file to the headless machine. On the headless machine, set the following connection properties to connect to data:

  • UseWQL: Set this to true.
  • Set the Host and Tenant as usual.
  • InitiateOAuth: Set this to REFRESH.
  • OAuthClientId: Set this to the client Id assigned when registering the OAuth app.
  • OAuthClientSecret: Set this to the client secret assigned when registering the OAuth app.
  • OAuthSettingsLocation: Set this to the path to the OAuth settings file. Make sure this file gives read and write permissions to the 本製品 to enable the automatic refreshing of the access token.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8479