ODBC Driver for DocuSign

Build 23.0.8839

Linux DSN の構成

このセクションでは、以下のいくつかのLinux ディストリビューションでODBC 接続をセットアップしDSN を設定する方法を説明します:Ubuntu のようなDebian ベースのシステム、Red Hat Enterprise Linux (RHEL)、CentOS、およびFedora のようなRed Hat Linux プラットフォーム。

Linux の最小バージョン

Red Hat ベースおよびDebian ベースシステムでサポートされる最小バージョンは以下のとおりです。

OSMin. Version
Ubuntu11.04
Debian7
RHEL6.9
CentOS6.9
Fedora13
SUSE12.1

ドライバー依存関係のインストール

必要な依存関係をインストールするには、次のコマンドをルートとしてまたはsudo で実行します。

  • Debian/Ubuntu:
    apt-get install libc6 libstdc++6 zlib1g libgcc1
  • RHEL/CentOS/Fedora:
    yum install glibc libstdc++ zlib libgcc

本製品 が必要とする対応ライブラリは以下のとおりです。

Debian/Ubuntu PackageRHEL/CentOS/Fedora PackageFile
libc6glibclinux-vdso.1
libc6glibclibm.so.6
libc6glibclibrt.so.1
libc6glibclibdl.so.2
libc6glibclibpthread.so.0
libc6glibclibc.so.6
libc6glibcld-linux-x86-64.so.2
libstdc++6libstdc++libstdc++.so.6
zlib1gzliblibz.so.1
libgcc1libgcclibgcc_s.so.1

ドライバーのインストール

標準のパッケージ管理システムを使用してドライバーをインストールできます。

Ubuntu のようなDebian ベースのシステムでは、次のコマンドをroot またはsudo で実行します。

dpkg -i /path/to/driver/setup/DocuSignODBCDriverforUnix.deb 

RPM パッケージ形式をサポートするシステムでは、次のコマンドをroot またはsudo で実行します。

rpm -ivh /path/to/driver/DocuSignODBCDriverforUnix.rpm 

ドライバーのライセンス

次のコマンドを実行して本製品 のライセンスを取得します。評価版をアクティベートするには、<key> の入力を省略してください。

cd /opt/cdata/cdata-odbc-driver-for-docusign/bin/
sudo ./install-license.sh <key>

ドライバーマネージャー経由の接続

ドライバーマネージャーはドライバーをロードし、アプリケーションからドライバーに関数呼び出しを渡します。本製品 をドライバーマネージャーに登録して、ドライバーマネージャーのコンフィギュレーションファイルにDSN を定義する必要があります。

本製品 のインストールでは、本製品 をunixODBC ドライバーマネージャーに登録し、システムDSN を作成します。UnixODBC ドライバーマネージャーは、Python やその他多くのアプリケーションから使用できます。アプリケーションに別のドライバーマネージャーが組み込まれている可能性があります。

DSN の作成

unixODBC をインストールしてDSN を設定するには、unixODBC の使用 を参照してください。OBIEE、Informatica、およびSAS に接続するDSN を作成するには、DataDirect ドライバーマネージャーの使用 を参照してください。

DocuSign への接続

UseSandbox
UseSandbox は現在のユーザーアカウントがサンドボックスかそうでないかを示します。デフォルトはfalse です。サンドボックスアカウントを使用する場合はtrue に設定します。以下のOAuth フローはすべて、UseSandbox が事前に設定済みであることを前提として書かれています。

AccountId
AccountId はオプションの接続プロパティです。認証が成功すると自動的に設定されます。 または、複数のAccount Id にアクセスできる場合は、接続文字列で手動で設定できます。アカウントId を取得するには、UserInfo ビューをクエリします。

DocuSign への認証

DocuSign はOAuth 認証標準を利用しています。OAuth を使って認証するには、カスタムアプリを作成してOAuthClientIdOAuthClientSecret、およびCallbackURL 接続プロパティを取得する必要があります。本製品 は、OAuth JWT 認証もサポートしています。カスタムアプリケーションの作成について詳しくは、カスタムOAuth アプリの作成 を参照してください。

OAuth

AuthScheme は、すべてのユーザーアカウントフローでOAuth に設定する必要があります。

デスクトップアプリケーション

下記の手順に従って、カスタムOAuth アプリの資格情報を使用して認証します。カスタムOAuth アプリの作成 を参照してください。

OAuth アクセストークンの取得およびリフレッシュ

次を設定して、接続してください。

  • OAuthClientId:アプリの登録時に割り当てられたIntegrator Key に設定。
  • OAuthClientSecret:アプリの登録時に割り当てられたSecret Key に設定。
  • CallbackURL:アプリの登録時に定義されたリダイレクトURI に設定。
接続すると、本製品 はデフォルトブラウザでOAuth エンドポイントを開きます。ログインして、アプリケーションにアクセス許可を与えます。

ヘッドレスマシン

ヘッドレスマシンのユーザーアカウントでOAuth を使用するようにドライバーを設定するには、インターネットブラウザに対応した別の端末で認証する必要があります。

  1. 以下の2つのオプションから選択します。

    • オプション1:後述の「Verifier code を取得および交換」に従い、OAuthVerifier 値を取得します。
    • オプション2:別のマシンに本製品 をインストールし、後述の「OAuth 設定を転送」の説明に従い、通常のブラウザベースのフローで認証後にOAuth 認証値を転送します。

  2. その後、ヘッドレスマシンからアクセストークンを自動的にリフレッシュするように本製品 を設定します。

オプション1:Verifier code を取得および交換

Verifier code を取得するには、OAuth Authorization URL で認証する必要があります。

インターネットブラウザに対応したマシンから認証してOAuthVerifier 接続プロパティを取得する方法は次のとおりです。

  1. 以下のオプションから選択します。

    • 埋め込みOAuth アプリケーションを使用する場合は、DocuSign OAuth endpoint をクリックし、ブラウザでエンドポイントを開きます。
    • カスタムOAuth アプリケーションを使用するには、以下のプロパティを設定し、認証URL を作成します。
      • InitiateOAuthOFF に設定。
      • OAuthClientId:アプリケーションの登録時に割り当てられたクライアントId に設定。
      • OAuthClientSecret:アプリケーションの登録時に割り当てられたクライアントシークレットに設定。
      次に、適切なCallbackURL を指定してGetOAuthAuthorizationURL ストアドプロシージャを呼び出します。ストアドプロシージャによって返されたURL をブラウザで開きます。

  2. ログインして、本製品 にアクセス許可を与えます。すると、verifier code を含むコールバックURL にリダイレクトされます。
  3. verifier code の値を保存します。後ほどこれをOAuthVerifier 接続プロパティに設定します。
次に、OAuth verifier code をOAuth リフレッシュトークンおよびアクセストークンと交換する必要があります。次のプロパティを設定します。

ヘッドレスマシンでは、次の接続プロパティを設定してOAuth 認証値を取得します。

  • InitiateOAuthREFRESH に設定。
  • OAuthVerifier:verifier code に設定。
  • OAuthClientId:カスタムOAuth アプリケーション設定のクライアントId に設定。
  • OAuthClientSecret:カスタムOAuth アプリケーション設定のクライアントシークレットに設定。
  • OAuthSettingsLocation:ドライバーがOAuth トークン値を保存するファイルの場所に設定。これは接続間で維持されます。

OAuth 設定ファイルが生成されたら、以下のように接続プロパティをリセットする必要があります。

  • InitiateOAuthREFRESH に設定。
  • OAuthClientId:アプリケーションの登録時に割り当てられたクライアントId に設定。
  • OAuthClientSecret:アプリケーションの登録時に割り当てられたクライアントシークレットに設定。
  • OAuthSettingsLocation:暗号化されたOAuth 認証値を含む場所に設定。アクセストークンの自動リフレッシュを有効にするために、この場所が本製品 に読み書きのアクセス許可を付与することを確認してください。

オプション2:OAuth 設定を転送

ヘッドレスマシンでの接続に先立ち、インターネットブラウザに対応したデバイスでドライバとの接続を作成し、インストールする必要があります。上述の「デスクトップアプリケーション」の説明に従って、接続プロパティを設定します。

「デスクトップアプリケーション」の手順が完了すると、生成された認証値は、OAuthSettingsLocation で指定された場所に暗号化されて書き込まれます。デフォルトのファイル名はOAuthSettings.txt です。

接続が正常にテストされたら、OAuth 設定ファイルをヘッドレスマシンにコピーします。

ヘッドレスマシンで、次の接続プロパティを設定し、データに接続します。

  • InitiateOAuthREFRESH に設定。
  • OAuthClientId:アプリケーションの登録時に割り当てられたクライアントId に設定。
  • OAuthClientSecret:アプリケーションの登録時に割り当てられたクライアントシークレットに設定。
  • OAuthSettingsLocation:OAuth 設定ファイルの場所に設定。アクセストークンの自動リフレッシュを有効にするために、この場所が本製品 に読み書きのアクセス許可を与えることを確認してください。

OAuth JWT

AuthSchemeOAuthJWT に設定します。

Obtaining a User ID

Retrieve your User ID by navigating, in the DocuSign UI, to Settings > Apps and Keys > My Account Information > User ID.

Obtaining an Integration Key

Follow the procedure below to obtain an integration key:

  1. Log in to a DocuSign developer account.
  2. Navigate to My Apps and Keys.
  3. You will see a dialog box to enter your application's name. Give your application a short, but descriptive name.
  4. Click ADD to add your application. Your application is automatically assigned an integration key (GUID) value that cannot be changed. Save this value.

Application Consent

In order to connect, you must give consent to the application. DocuSign offers three different software patterns for granting consent to an integration key. Grant consent to your application using one of the following methods.

Method 1: Administrative Consent

This is the best option for customer-oriented developers, because it requires nothing from your users.

Note: This pattern can't be used by ISVs.

This method of obtaining consent has the following prerequisites:

  • Your account must include the Access Management with SSO feature, though it is not required that you install SSO.
    • If your developer demo account (demo.docusign.net) does not include this feature, send an email to go-live@docusign.com and request that the feature be added to your account. Remember to include your developer demo account ID.
  • You must claim your email DNS domain via the DocuSign administration tool. A domain can be claimed both by the DocuSign developer demo system (for testing and development), and by your production DocuSign account.
  • Your users’ email domains must match the claimed email domain.
  • Your integration key’s management account must be one of the accounts in the DocuSign organization.

If you meet these requirements, grant consent as follows:

  1. In DocuSign Admin, open your organization home page.
  2. In the navigation pane on the left side of the page, select Connected Apps.
  3. Click Authorize Application and choose an application from the drop-down menu.
  4. In the Add New Application dialog, specify the permissions you want to grant to your application.
  5. Click ADD.

Method 2: Individual Consent

This option has no prerequisites and can be used by customer-oriented developers and the customers of ISVs. Each user must perform the following steps.

To obtain individual consent:

  1. Run the GetConsentURL stored procedure. The procedure returns a URL.
  2. Open the returned URL in your browser. A permissions page will display.
  3. Click Accept to grant consent.
Method 3: Administrative Consent for Third-party (ISV) Applications

You can grant administrative consent to third party (ISV) applications.

This method of obtaining consent has the following prerequisites:

  • All prerequisites for standard Administrative Consent apply (see section above).
  • ISVs should also support individual consent as a backup, since SSO not all customers will be able to use administative consent.
  • If you are an ISV using the JWT grant flow, then the management account tied to your application’s integration key should be a DocuSign account that your company controls.

If you meet these requirements, obtain consent as follows. Each user must perform the following steps.

  1. Run the GetConsentURL stored procedure. The procedure returns a URL.
  2. Open the returned URL in your browser. A permissions page will display.
  3. Click Accept to grant consent.

Configuring OAuth JWT Credentials

Using the information you gathered in the above sections, set the following connection properties in the 本製品:
  • OAuthJWTCert: The location of your private key. This should end with ".key".
  • OAuthJWTCertType: PEMKEY_FILE
  • OAuthJWTSubject: Your user ID.
  • OAuthJWTIssuer: Your integration key.

OAuth 値のリフレッシュ

本製品 は、ブラウザベースのOAuth 認証交換中に取得されたテンポラリーOAuth アクセストークンをリフレッシュできます。デフォルトでは、本製品 は暗号化されたトークンを、DSN に対応するodbc.ini ファイルに保存します。System DSN の場合、このodbc.ini ファイルへのアクセスを制限できます。

トークンの自動交換を有効にするには、本製品 にシステムodbc.ini への書き込みアクセス権を与えます。または、OAuthSettingsLocation 接続プロパティを、ドライバーが読み書きアクセス権を持つ別のファイルパスに設定することもできます。

    OAuthSettingsLocation=/tmp/oauthsettings.txt
    

OAuth 認証の依存関係のインストール

OAuth 認証標準は、認証するユーザーにWeb ブラウザを使用したDocuSign との通信を要求します。最初のOAuth インタラクションがドライバーがインストールされている同じマシン上で行われる場合(例えばデスクトップアプリケーションの場合)、本製品 はデフォルトブラウザを立ち上げるxdg-open プログラムにアクセスする必要があります。

この依存関係を満たすには、パッケージマネージャーに対応するパッケージをインストールします。

Debian/Ubuntu PackageRHEL/CentOS/Fedora PackageFile
xdg-utilsxdg-utilsxdg-open

ドライバーエンコーディングの設定

ODBC ドライバーは、ODBC ドライバーマネージャーで使用するエンコーディングを指定する必要があります。デフォルトでは、Unix 用のCData ODBC ドライバーはunixODBC と互換性のあるUTF-16 を使用するように設定されていますが、他のドライバーマネージャーでは代替エンコーディングが必要な場合があります。

また、ANSI ODBC API を使用するアプリケーションからODBC ドライバーを使用している場合は、ANSI コードページを設定する必要があります。例えば、ANSI アプリケーションに日本語の文字をインポートするには、設定ファイル'/opt/cdata/cdata-odbc-driver-for-docusign/lib/cdata.odbc.docusign.ini' でコードページを指定できます。

[Driver]
AnsiCodePage = 932

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839