Databases Reference
In-Depth Information
It is possible to use the internal LDAP to store and authenticate the users and groups in
production, but the WebLogic administrator can add more robust types of authentication
providers such as, a database, Active Directory, and external LDAP, among many others.
In this recipe, a new SQL authentication provider named PRODSQLProvider will be
configured and added to the PROD_DOMAIN domain to store and handle the users and
groups in an Oracle database.
A new data source, ds-Provider , will be created. The database runs at the dbhost
hostname and listens to the port 1521. The listener accepts requests to the service name
dbservice . The database username is dbuser , and the password is dbpwd .
Getting ready
Unfortunately, WebLogic Server 12 c does not provide an out of the box database script to
create the tables needed to store the users and groups, so you must run the script provided
to create the tables and insert the default groups.
How to do it...
Create the tables needed in your database:
1. Run the following script to create the tables in your Oracle database:
CREATE TABLE USERS
(
U_NAME VARCHAR(200) NOT NULL,
U_PASSWORD VARCHAR(50) NOT NULL,
U_DESCRIPTION VARCHAR(1000)
);
ALTER TABLE USERS
ADD CONSTRAINT PK_USERS PRIMARY KEY (U_NAME);
CREATE TABLE GROUPS
(
G_NAME VARCHAR(200) NOT NULL,
G_DESCRIPTION VARCHAR(1000) NULL
);
ALTER TABLE GROUPS
ADD CONSTRAINT PK_GROUPS PRIMARY KEY (G_NAME);
CREATE TABLE GROUPMEMBERS
(
G_NAME VARCHAR(200) NOT NULL,
G_MEMBER VARCHAR(200) NOT NULL
);
ALTER TABLE GROUPMEMBERS
 
Search WWH ::




Custom Search