ODBC Driver for Confluence

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/ConfluenceODBCDriverforUnix.deb 

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

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

ドライバーのライセンス

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

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

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

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

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

DSN の作成

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

Connecting to Confluence

You can establish a connection to any Confluence Cloud account or Confluence Server instance. To connect set the URL connection property. For example, https://yoursitename.atlassian.net.

Authenticating to Confluence

Confluence supports the following authentication methods: Basic Authentication, standard OAuth2.0 Authentication and SSO.

Basic Authentication

Confluence Cloud Account

Aquire a Token

An API token is necessary for account authentication. To generate one, login to your Atlassian account and select API tokens > Create API token. The generated token is displayed.

Authenticate Using the Token

To authenticate to a Cloud account, provide the following (Note: Password has been deprecated for connecting to a Cloud Account and is now used only to connect to a Server Instance.):

  • AuthScheme: Set this to Basic.
  • User: The user to be used to authenticate with the Confluence server.
  • APIToken: The API Token associated with the currently authenticated user.
  • Url: The URL associated with your Jira endpoint. For example, https://yoursitename.atlassian.net.

Confluence Server Instance

To authenticate to a Server instance, specify the following:

  • AuthScheme: Set this to Basic.
  • User: The user which to be used to authenticate with the Confluence instance.
  • Password: The password which is used to authenticate with the Confluence server.
  • Url: The URL associated with your Jira endpoint. For example, https://yoursitename.atlassian.net.

OAuth

In all cases, you must set AuthScheme to OAuth and Scope to to the value obtained from your application settings. In all the flows described below, it is assumed that you have done so.

Desktop Applications

This section describes desktop authentication using the credentials for your custom OAuth app. See カスタムOAuth アプリの作成 for more information.

Get an OAuth Access Token

After setting the following, you are ready to connect:

  • OAuthClientId: Set to the client Id in your app settings.
  • OAuthClientSecret: Set to the client secret in your app settings.
  • CallbackURL: Set to the Redirect URL in your app settings.
  • OAuthVersion: Set to 2.0.
  • Url: The URL to your Confluence endpoint; for example, https://yoursitename.atlassian.net.
When you connect, the 本製品 opens the OAuth endpoint in your default browser. Log in and grant permissions to the application.

Headless Machines

To configure the driver to use OAuth with a user account on a headless machine, you need to authenticate on another device that has an internet browser.

  1. Choose one of two options:

    • Option 1: Obtain the OAuthVerifier value as described in "Obtain and Exchange a Verifier Code" below.
    • Option 2: Install the 本製品 on a machine with a browser and transfer the OAuth authentication values after you authenticate through the usual browser-based flow, as described in "Transfer OAuth Settings" below.

  2. Then configure the 本製品 to automatically refresh the access token on the headless machine.

Option 1: Obtain and Exchange a Verifier Code

To obtain a verifier code, you must authenticate at the OAuth authorization URL.

Follow the steps below to authenticate from the machine with an internet browser and obtain the OAuthVerifier connection property.

  1. Create the Authorization URL by setting the following properties:
    • InitiateOAuth: Set to OFF.
    • OAuthClientId: Set to the client Id assigned when you registered your application.
    • OAuthClientSecret: Set to the client secret assigned when you registered your application.
    • OAuthVersion: Set to 2.0.
  2. Call the GetOAuthAuthorizationURL stored procedure with the CallbackURL input parameter set to the exact Redirect URI you specified in your app details under APIS AND FEATURES > OAuth 2.0 (3LO).
  3. 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.
  4. Save the value of the verifier code. You need to set this in the OAuthVerifier connection property.

Next, you need to exchange the OAuth verifier code for OAuth refresh and access tokens. Set the following properties:

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

  • InitiateOAuth: Set this to REFRESH.
  • OAuthVerifier: Set this to the verifier code.
  • OAuthClientId: (custom applications only) Set this to the client Id in your custom OAuth application settings.
  • OAuthClientSecret: (custom applications only) Set this to the client secret in the custom OAuth application settings.
  • OAuthSettingsLocation: Set this to persist the encrypted OAuth authentication values to the specified location.
  • InitiateOAuth: Set to REFRESH.

After the OAuth settings file is generated, you need to re-set the following properties to connect:

  • InitiateOAuth: Set this to REFRESH.
  • OAuthClientId: Set this to the client Id assigned when you registered your application.
  • OAuthClientSecret: Set this to the client secret assigned when you registered your application.
  • OAuthSettingsLocation: Set this to the location containing the encrypted OAuth authentication values. Make sure this location gives read and write permissions to the 本製品 to enable the automatic refreshing of the access token.
  • OAuthVersion: Set to 2.0.
  • Url: The URL to your Confluence endpoint; for example, https://yoursitename.atlassian.net.

Option 2: Transfer OAuth Settings

Prior to connecting on a headless machine, you need to install and create a connection with the driver on a device that supports an internet browser. Set the connection properties as described in "Desktop Applications" above.

After completing the instructions in "Desktop Applications", the resulting authentication values are encrypted and written to the location specified by OAuthSettingsLocation. The default filename is OAuthSettings.txt.

After you have successfully tested the connection, copy the OAuth settings file to your headless machine.

On the headless machine, set the following connection properties to connect to data:

  • InitiateOAuth: Set this to REFRESH.
  • OAuthClientId: Set this to the client Id assigned when you registered your application.
  • OAuthClientSecret: Set this to the client secret assigned when you registered your application.
  • OAuthSettingsLocation: Set this to the location of your OAuth settings file. Make sure this location gives read and write permissions to the 本製品 to enable the automatic refreshing of the access token.
  • CallbackURL: Set to the Callback URL in your app details under APIS AND FEATURES > OAuth 2.0 (3LO).
Test the connection to authenticate. The resulting authentication values are written, encrypted, to the location specified by OAuthSettingsLocation. Once you have successfully tested the connection, copy the OAuth settings file to your headless machine. On the headless machine, set the following connection properties to connect to data:

  • InitiateOAuth: Set to REFRESH.
  • OAuthSettingsLocation: Set to the location of your OAuth settings file. Make sure this location gives read and write permissions to the 本製品 to enable the automatic refreshing of the access token.
  • OAuthVersion: Set to 2.0.
  • Url: The URL to your Confluence endpoint; for example, https://yoursitename.atlassian.net.

Crowd

AuthSchemeCrowd に設定します。Crowd への接続には、次の接続プロパティを使用します。

  • User:Crowd ユーザーアカウント。
  • Password:Crowd アカウントに関連付けられたパスワード。
  • SSOLoginURL:Crowd アカウントに関連付けられたログインURL。IDP URL は、自身のアプリケーション->[SSO]->[SSO information]->[Identity provider single sign-on URL]にあります。
  • SSOAppName:SSO を有効にするアプリケーションの名前。
  • SSOAppPassword:SSO を有効にするアプリケーションのパスワード。
  • SSOExchangeUrl: The URL used used to exchange the SAML token for Confluence cookies. This URL may have the following formats:
    • https://<authority of Confluence instance>/plugins/servlet/samlconsumer
    • https://<authority of Confluence instance>/plugins/servlet/samlsso

次は接続文字列の例です。

AuthScheme=Crowd;Url=https://yoursitename.atlassian.net;SSOLoginURL='https://<authority>/crowd/console/secure/saml/sso.action';User=crowdUserName;Password=crowdPassword;SSOExchangeUrl=https://<authority of Confluence instance>/plugins/servlet/samlconsumer;SSOAppName=CrowdAppName;SSOAppPassword=CrowdAppPassword;

Okta

Okta に接続するには、AuthSchemeOkta に設定し、次のプロパティを設定します。

  • User:Okta ユーザー。
  • Password:Okta ユーザーのパスワード。
  • SSOLoginURL:SSO プロバイダーのログインURL。
  • SSOExchangeUrl: The URL used used to exchange the SAML token for Confluence cookies. This URL may have the following formats:
    • https://<authority of Confluence instance>/plugins/servlet/samlconsumer
    • https://<authority of Confluence instance>/plugins/servlet/samlsso

Okta クライアントリクエストコンテキストをオーバーライドする信頼されたアプリケーションまたはプロキシを使用する場合、またはMFA を設定している場合は、Okta を使用して認証するためにSSOProperties を組み合わせて使用する必要があります。必要に応じて、以下のいずれかを設定します。

  • APIToken:Okta クライアントリクエストコンテキストをオーバーライドする、信頼されたアプリケーションまたはプロキシ経由でユーザーを認証する場合、これを顧客がOkta 組織で作成したAPI Token に設定します。
  • MFAType:MFA フローを設定した場合、次の対応するタイプのいずれかに設定します:OktaVerifyEmail、またはSMS
  • MFAPassCode:MFA フローを設定した場合は、有効なパスコードに設定します。
    これを空欄または無効な値に設定した場合、本製品 はユーザーのデバイスまたはE メールにワンタイムパスワードチャレンジを発行します。パスコードを受信後、取得したワンタイムパスワードをMFAPassCode 接続プロパティに設定する接続を再度開きます。
  • MFARememberDevice:デフォルトはTrue です。Okta は、MFA が必要な場合にデバイスを記憶させることをサポートします。設定された認証ポリシーに従ってデバイスの記憶が許可されている場合、本製品 はMFA 認証の有効期間を延長するデバイストークンを送信します。MFA を記憶させない場合は、この 変数をFalse に設定してください。

接続文字列の例:

AuthScheme=Okta;Url=https://yoursitename.atlassian.net;SSOLoginURL='https://example.okta.com/home/appType/0bg4ivz6cJRZgCz5d6/46';User=oktaUserName;Password=oktaPassword;SSOExchangeUrl=https://<authority of Confluence instance>/plugins/servlet/samlconsumer;

OAuth 値のリフレッシュ

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

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

    OAuthSettingsLocation=/tmp/oauthsettings.txt
    

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

OAuth 認証標準は、認証するユーザーにWeb ブラウザを使用したConfluence との通信を要求します。最初の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-confluence/lib/cdata.odbc.confluence.ini' でコードページを指定できます。

[Driver]
AnsiCodePage = 932

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