接続の確立
JDBC データソースの作成
Java アプリケーションから接続するJDBC データソースを作成できます。CData JDBC Driver for Garoon に基づくJDBC データソースの作成は、3つの基本ステップで構成されます。
- ドライバーのJAR ファイルをクラスパスに追加します。JAR ファイルはインストールディレクトリの[lib]サブフォルダ内にあります。.lic ファイルはJAR ファイルと同じフォルダ内に配置される必要があることに注意してください。
- ドライバークラスを入力します。次に例を示します。
cdata.jdbc.garoon.GaroonDriver
- JDBC URL を入力します。次に例を示します。
jdbc:garoon:User=myuseraccount;Password=mypassword;Url=http://subdomain.domain.com; or jdbc:cdata:garoon:User=myuseraccount;Password=mypassword;Url=http://subdomain.domain.com;
上記の2つ目の形式は、同じURL 形式を使用しているドライバー間でアプリケーションに競合がある場合は、CData ドライバーを使用していることを確認するために常に使用できます。URL は "jdbc:garoon:" または"jdbc:cdata:garoon:" のいずれかから始まり、任意の接続プロパティの名前と値のペアをセミコロン区切りで入力します。
Garoon への接続
認証値に加えて、下記のパラメータを使いGaroon に接続しデータを取得します。
- Url:アカウントのURL。
NOTE:サポートされているバージョンで許容されるURL 形式は以下のとおりです。
- Cloud 版:https://(subdomain).cybozu.com
- Package 版(Windows 環境):http://(server IP address or host name)/scripts/(installation identifier)/grn.exe
- Package 版(Linux 環境):http://(server IP address or host name)/cgi-bin/(installation identifier)/grn.cgi
Garoon への認証
Garoon は、以下の認証メソッドをサポートしています。
パスワード
Garoon への認証には、以下を設定する必要があります。
- User:アカウントのユーザー名。
- Password:アカウントのパスワード。
- AuthScheme:AuthScheme をPassword に設定。
Additional Security
In addition to the mentioned authentication schemes, Garoon offers additional security in the form of both an additional Basic Auth header, and an SSL Certificate.Basic
Garoon environments using basic authentication will need to pass additional basic credentials. To do so, specify the following:
- BasicAuthUser - The basic login name.
- BasicAuthPassword - The basic password.
クライアントSSL
In addition to your authentication information, Garoon may be configured to require an SSL certificate to accept requests. To do so, set the following:
- SSLClientCert - The file containing the certificate of the SSL Cert. Or alternatively, the name of the certificate store for the client certificate.
- SSLClientCertType - The type of certificate.
- SSLClientCertSubject - (Optional) If searching for a certificate in the certificate store, the store is searched for subjects containing the value of the property.
- SSLClientCertPassword - If the certificate store is of a type that requires a password, this property is used to specify that password to open the certificate store.