BIEE创建Database认证的Authentication Provider
通过数据库表格来存储用户名,密码和Group关系,然后将用户相关表格在RPD建模,发布到前端支持回写,使管理员能够在analytics中管理用户,同时支持用户在analytics中自己修改登录口令。
以下文档基于BIEE官方安全文档及metalink相关问题解决文档,并进行适当修改。
数据库元数据创建
先创建数据库需要使用的元数据,插入基本数据。
Create user bi_auth identified by bi_auth account unlock;
Grant dba to bi_auth;
Conn bi_auth/bi_auth;
create table USERS(U_NAME varchar2(100),U_PASSWORD varchar2(100),U_DESCRIPTION varchar2(100));
create table GROUPS(G_NAME varchar2(100),G_DESCRIPTION varchar2(100));
create table GROUPMEMBERS(G_NAME varchar2(100),G_MEMBER varchar2(100));
insert into groups(g_name) values('AdminChannelUsers');
insert into groups(g_name) values('Administrators');
insert into groups(g_name) values('AppTesters');
insert into groups(g_name) values('BIAdministrators');
insert into groups(g_name) values('CrossDomainConnectot');
insert into groups(g_name) values('Deployers');
insert into groups(g_name) values('BIAuthors');
insert into groups(g_name) values('BIConsumers');
insert into groups(g_name) values('Monitors');
insert into groups(g_name) values('Operators');
insert into groups(g_name) values('OracleSystemGroup');
insert into USERS (U_NAME,U_PASSWORD,U_DESCRIPTION) values('ZC','zc123456','');
insert into GROUPS (G_NAME,G_DESCRIPTION) values('Administrators','Administrators');
insert into GROUPMEMBERS (G_NAME,G_MEMBER) values('Administrators','ZC');
commit;
CREATE OR REPLACE VIEW users_vw AS SELECT U_NAME, U_PASSWORD, RPAD(U_NAME, 16, '0') AS GUID FROM users;
注:注意红色字体部分,因为BIEE认证需要guid保证16位长度,所以建立USERS_VW并生成16进制的GUID字段。
Configuring a Data Source Using the Oracle WebLogic Server Administration Console
To configure a data source using the Oracle WebLogic Server Administration Console:
For example, select: Oracle's Driver (Thin) for Service Connections; Releases:9.0.1 and later
You should select the Administration Server and Managed server as your targets, for example:Select the AdminServer check box.
Configuring a SQL Authenticator Using the Oracle WebLogic Server Administration Console
This task enables a suitably privileged user to log in to the Oracle WebLogic Server Administration Console using the WebLogic database authenticator.
To configure a SQL authenticator using the Oracle WebLogic Server Administration Console:
The default Security Realm is named myrealm.
If the Plaintext Password Enabled option is cleared, the SQLAuthenticator expects passwords to have been hashed using SHA-1 (default encryption algorithm). For more information on the supported encryption algorithms, see the documentation for the base SQLAuthenticator Mbean PasswordAlgorithm attribute.
此步骤可选,如同时还保留LDAP认证的话,可不进行此步骤.
Note:
Check the Users and Groups tab to confirm that the database users and groups appear there.
Configure the virtualized identity store as follows:
Enabling Virtualization by Configuring the Identity Store
You must configure the identity store to enable virtualization so that more than one Identity Store can be used with the identity store service, and therefore user profile information can be split across different authentication providers (identity stores).
Configuring a Database Adaptor
You configure a database adaptor to make the database appear like an LDAP server, which enables the virtualized identity store provider to retrieve user profile information from a database using the database adapter.
To configure a database adaptor:
This task shows how to edit and apply adapter templates that specify how to use your database tables as an identity store.
This file describes the mapping of the user table to a virtual LDAP store.
%ROOT%
true
directoryType
true
50
Yes
-1
true
DBGUID
oracle.ods.virtualization.engine.chain.plugins.dbguid.DBGuidPlugin
oracle.jdbc.driver.OracleDriver
%URL%
%USER%
%PASSWORD%
false
true
10
USERS_VW " field="U_NAME" type=""/>
USERS_VW " field="U_NAME" type=""/>
USERS_VW " field="U_NAME" type=""/>
USERS_VW " field="U_NAME" type=""/>
USERS_VW " field="U_NAME" type=""/>
true
10
0
false
注:注意红色字体部分,因为database认证的guid需要16位长度,所以红色字体部分使用的是视图USERS_VW的相关字段。
The cn attribute is used as its RDN (Relative Distinguished Name). The sub-elements then declare which LDAP attributes map to which tables and columns in the database. For example, the line maps the USER_ID field of the USER table to the standard LDAP attribute uid (that is, a unique user id for each user).
Next, you map groups using the same method.
This file describes the mapping of the group table to a virtual LDAP store.
%ROOT%
true
directoryType
true
50
Yes
-1
true
VirtualAttribute
oracle.ods.virtualization.engine.chain.plugins.virtualattr.VirtualAttributePlugin
oracle.jdbc.driver.OracleDriver
%URL%
%USER%
%PASSWORD%
false
true
10
true
10
0
false
<MW_HOME>/oracle_common/modules/oracle.ovd_11.1.1/templates/
<MW_HOME>/oracle_common/bin
libovdadapterconfig -adapterName userGroupAdapter1 -adapterTemplate adapter_template_usergroup1.xml -host use-pc -port 7001 -userName weblogic -domainPath D:\app\OBI\user_projects\domains\bifoundation_domain\ -dataStore DB -root cn=users,dc=oracle,dc=com -contextName default -dataSourceJNDIName jdbc/UserGroupDS
libovdadapterconfig -adapterName userGroupAdapter2 -adapterTemplate adapter_template_usergroup2.xml -host use-pc -port 7001 -userName weblogic -domainPath D:\app\OBI\user_projects\domains\bifoundation_domain\ -dataStore DB -root cn=users,dc=oracle,dc=com -contextName default -dataSourceJNDIName jdbc/UserGroupDS
The scripts should exit without error.
注:注意执行后,需要通过命令行进行交互,输入weblogic用户的口令。
Configuring Multiple Authentication Providers Using Fusion Middleware Control
This section describes how to configure Oracle Business Intelligence to use multiple authentication providers using Fusion Middleware Control.
To configure multiple authentication providers using Fusion Middleware Control:
Property Name=virtualize
Value=true
Note:
The Property Name virtualize must be lowercase.
Note:
If you set the virtualize custom property value to true, Oracle recommends that the BISystemUser must exist in only one identity store.建议只保留在LDAP的认证中。
Note:
If you are using multiple authentication providers, configure the Control Flag setting as follows:
Set the value of Control Flag for all authentication providers to SUFFICIENT.
Set the value of Control Flag for all authentication providers to OPTIONAL.
For example, if a user's group membership is spread across more than one authentication provider
Correcting Database Adapter Errors by Deleting and Recreating the Adapter
You cannot modify an existing database adapter, so if you make an error in either the libovdadapter command, or the templates you use to create the adapters, you must delete then recreate the adapter using the following procedure.
To correct database adapter errors by deleting and recreating the adapter:
For example:
MW_HOME\oracle_common\common\bin\wlst.cmd (Windows)
connect ('<WLS admin user name>','<WLS admin password>','t3://<admin server host>:<admin server port>')
For example:
connect('weblogic','weblogic123','t3://myserver:7001')
deleteAdapter(adapterName='<AdapterName>')
For example:
deleteAdapter(adapterName='userGroupAdapter2')
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10009036/viewspace-1425656/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10009036/viewspace-1425656/