3.2.1 ユーザーの管理
GoldenGate Stream Analyticsをインストールしたら、アプリケーションを使用するユーザーを認証および管理することが重要です。
ユーザーの詳細はデータベースに格納されます。インストール時にGGSAスキーマを作成すると、次のデータベース表の各表に1つのレコードが移入されます:
-
osa_users
— ユーザーを格納した表 -
osa_user_roles
— ユーザー名とその関連ロールを格納した表
osa_users
表からすべてのデータを取得する問合せを実行すると、次の内容が表示されます。
select * from osa_users;
+----+----------+--------------------------------------+
| id | username | pwd |
+----+----------+--------------------------------------+
| 1 | osaadmin | MD5:201f00b5ca5d65a1c118e5e32431514c |
+----+----------+--------------------------------------+
ここで、osaadmin
は、暗号化されたパスワードを持つ事前構成済ユーザーです。
osa_user_roles
表からすべてのデータを取得する問合せを実行すると、次の内容が表示されます。
select * from osa_user_roles;
+---------+---------+
| user_id | role_id |
+---------+---------+
| 1 | 1 |
+---------+---------+
ここで、値1
のrole_id
は、そのユーザーが管理者であることを示します。
3.2.1.1 ユーザーの追加
事前構成済ユーザーでOracle GoldenGate Stream Analyticsを使用し続けることはできますが、独自のユーザーを作成してデフォルトの事前構成済ユーザーを削除するのがベスト・プラクティスです。
ユーザーを追加する場合、必須ではありませんが、パスワードを不明瞭化または暗号化することを強くお薦めします。アプリケーション・サーバー(Jetty)に付属するユーティリティを使用して、パスワードを暗号化できます。
ユーザー・インタフェースを使用したユーザーの追加
Oracle GoldenGate Stream Analyticsのアプリケーション・ユーザー・インタフェースを使用して、ユーザーを追加または作成できます。
新規ユーザーを追加するには:
-
「システム設定」に移動します。
-
「ユーザー管理」タブで、「ユーザーの追加」をクリックします。
-
「ユーザー名」、「パスワード」および「パスワードの確認」フィールドに詳細を入力します。
- 「作成」をクリックします。
使用可能なユーザーのリストに、事前定義されたユーザーと一緒に新しいユーザーが表示されます。
要件に基づいて必要なユーザーの数だけこれらのステップを繰り返します。既存のユーザーと同じ名前のユーザーを追加しようとすると、「ユーザー名が<username>のユーザー・プロファイルはすでに存在します。別のユーザー名を指定してください。」
というエラーが表示されます。
コードを使用したユーザーの追加
新規ユーザーを追加するには:
<password>
を使用してNewUser
としてOracle GoldenGate Stream Analyticsにログインできます。必要なユーザーの数だけこれらの作成ステップを繰り返します。
3.2.1.2 パスワードの変更
ユーザー・インタフェースを使用したパスワードの変更
ユーザーのパスワードを変更するには:
-
「システム設定」に移動します。
-
「ユーザー管理」タブをクリックします。
-
使用可能なユーザーのリスト内で適切なユーザーの横にある「パスワードの変更」をクリックし、新しいパスワードの値を入力して「保存」をクリックします。
パスワードは、MD5ハッシュ形式で格納されます。
コードを使用したパスワードの変更
ユーザーのパスワードを変更するには:
NewUser
でログインしたときは、必ず更新したパスワードを使用してください。
3.2.1.3 ユーザーの削除
不要になったユーザーは、削除できます。
ユーザーの削除操作を進める前に、次のことに留意してください。
-
ドラフト・パイプラインを所有するユーザーが削除されると、そのパイプラインは、削除時の選択に基づいて現在のユーザーに移行されるか、削除されます。
-
自分自身を削除しようとすると、確認後に自分のドラフト・パイプラインはすべて削除されます。現在のユーザー・セッションは無効化され、アプリケーションから即座にサインアウトされます。
ユーザー・インタフェースを使用したユーザーの削除
ユーザーを削除するには:
-
「システム設定」に移動します。
-
「ユーザー管理」タブをクリックします。
-
使用可能なユーザーのリスト内で適切なユーザーの横にある「削除」をクリックし、確認ダイアログで「OK」をクリックします。
コードを使用したユーザーの削除
ユーザーを削除するには:
3.2.1.4 ユーザーの認証および管理のためのLDAPの構成
Oracle GoldenGate Stream Analyticsでは、LDAPによるJettyのサポートを使用します。Lightweight Directory Access Protocol (LDAP)は、様々な業界で使用されているオープン・ソース・アプリケーションです。このアプリケーション・プロトコルは、インターネット・プロトコル(IP)を使用し、分散ディレクトリ情報サービスをネットワーク経由で取得および保持するために使用されます。この機能を使用すると、ユーザー認証および管理にディレクトリ情報サービスを使用できます。Microsoftディレクトリ・サービスを使用するには、Microsoft Active Directoryを設定します。
ユーザーの認証および管理は、内部LDAPまたは外部LDAPを介して行うことができます。
内部LDAPの場合は、次のコマンドを使用して、デフォルトの管理アクセス権でLDAPサービスを作成します:
docker run --name LDAP-service --hostname LDAP-service -p 389:389 --detach osixia/openLDAP:1.2.1
3.2.1.4.1 LDAPの設定
ユーザー認証にLDAPを使用するには:
- etc/override-web.xmlを更新して、LDAPロール(Oracle LDAPの場合はEMPLOYEE)を指定し、レルムに
osa-realm-ldap
を指定します。LDAPからデータ・ソースに切り替える必要がある場合は、
etc/override-web.xml
を更新して、ロール(admin)を指定し、レルムにosa-realm-ds
を指定します。etc/override-web.xml
でレルムを変更することにより、LDAPとデータ・ソースを切り替えます。ldap-login.conf
の構成は変更せずにLDAP構成を保持したまま、override-web.xml
ファイルを変更するだけで、LDAPとデータ・ソースを切り替えることができます。 - LDAPユーザー/グループ設定に応じて、
/osa-base/etc/LDAP-login.conf
を更新します。たとえば:ユーザー・ロールの場合:
osa-demo-LDAP { org.eclipse.jetty.jaas.spi.LDAPLoginModule required debug="true" contextFactory="com.sun.jndi.LDAP.LDAPCtxFactory" hostname=<hostname> <!-- hostname of LDAP --> port="389" authenticationMethod="simple" forceBindingLogin="true" userBaseDn="l=emea,dc=oracle,dc=com" userRdnAttribute="uid" userIdAttribute="mail" userPasswordAttribute="userPassword" userObjectClass="person" roleBaseDn="l=emea,dc=oracle,dc=com" roleNameAttribute="opn_access_level" roleMemberAttribute="targetdn" roleObjectClass="person"; };
従業員ロールの場合:
osa-demo-LDAP { org.eclipse.jetty.jaas.spi.LDAPLoginModule required debug="true" contextFactory="com.sun.jndi.LDAP.LDAPCtxFactory" hostname=<hostname> <!-- hostname of LDAP --> port="389" authenticationMethod="simple" forceBindingLogin="true" userBaseDn="l=amer,dc=oracle,dc=com" userRdnAttribute="uid" userIdAttribute="mail" userPasswordAttribute="userPassword" userObjectClass="person" roleBaseDn="l=amer,dc=oracle,dc=com" roleNameAttribute="employeetype" roleMemberAttribute="targetdn" roleObjectClass="organizationalPerson"; };
ユーザーの地域名に応じて、userBaseDnとRoleBaseDnを変更してください。
アメリカの場合:
userBaseDn="l=amer,dc=oracle,dc=com" roleBaseDn="l=amer,dc=oracle,dc=com"
アジア太平洋の場合:
userBaseDn="l=apac,dc=oracle,dc=com" roleBaseDn="l=apac,dc=oracle,dc=com"
ヨーロッパの場合:
userBaseDn="l=emea,dc=oracle,dc=com" roleBaseDn="l=emea,dc=oracle,dc=com"
- アプリケーションを(再)起動します。
3.2.1.4.2 Microsoft Active Directoryの設定
Microsoft Active Directory 2016を設定するには:
/osa-base/etc/override-web.xml
にあるweb.xmlファイルでロール名が更新されていることを確認します:<auth-constraint> <role-name>developer</role-name> </auth-constraint>
- LDAPユーザー/グループ設定に応じて、
/osa-base/etc/ldap-login.conf
を更新します。たとえば:osa_demo_ldap { org.eclipse.jetty.jaas.spi.LdapLoginModule required debug="true" contextFactory="com.sun.jndi.ldap.LdapCtxFactory" hostname=<hostname> <!-- this is the active directory server hostname --> port="389" <!-- this is the active directory server port --> bindDn="CN=Administrator,CN=Users,DC=corp,DC=oradev,DC=com" bindPassword=<password> <!-- If the active directory server allows anonymous login, no need to provide bindDn and bindPassword. Else, set the active directory server admin DN and password --> authenticationMethod="simple" <!-- if the active directory server allows anonymous login then set to 'none' otherwise set it to 'simple'--> forceBindingLogin="true" userBaseDn="l=amer,dc=oracle,dc=com" <!-- user attributes as per user setup in active directory server --> userRdnAttribute="uid" <!-- user attributes as per user setup in active directory server --> userIdAttribute="mail" <!-- user attributes as per user setup in active directory server --> userPasswordAttribute="userPassword" <!-- user attributes as per user setup in active directory server --> userObjectClass="person" <!-- user attributes as per user setup in active directory server --> roleBaseDn="l=amer,dc=oracle,dc=com" <!-- role (group) attributes as per user setup in active directory server --> roleNameAttribute="opn_access_level" <!-- role (group) attributes as per user setup in active directory server --> roleMemberAttribute="targetdn" <!-- role (group) attributes as per user setup in active directory server --> roleObjectClass="person"; <!-- role (group) attributes as per user setup in active directory server --> };