Administration Console Online Help
![]() |
![]() |
![]() |
![]() |
![]() |
[Attributes and Console Screen Reference for Compatibility Security]
This topic describes configuring and managing security when using Compatibility security. For more information, see Using Compatibility Security in Managing WebLogic Security. For information about how to use the security features in WebLogic Server, see Security in the Administration Console online help and Managing WebLogic Security.
To set up Compatibility security:
config.xml
file) before using Compatibility security.<Security Name="
mydomain"
Realm=
"mysecurity"
/>
<Realm Name="mysecurity"
FileRealm="
myrealm"
/>
<FileRealm Name="myrealm"
/>
To verify whether you are correctly running Compatibility security, do the following:
In addition, a CompatibilitySecurity node will appear in the WebLogic Server Administration Console.
The Realm Adapter Authentication provider includes an Identity Assertion provider.The Identity Assertion provider provides backward compatibility for implementations of the weblogic.security.acl.CertAuthenticator
class. The identity assertion is performed on X.509 tokens. By default, the Identity Assertion provider is not enabled in the Realm Adapter Authentication provider.
To enable identity assertion in the Realm Adapter Authentication provider:
The Realm Adapter Auditing provider allows you to use implementations of the weblogic.security.audit.AuditProvider
class when using Compatibility security. In order for the Realm Adapter Auditing provider to work properly, the implementation of the weblogic.security.audit.AuditProvider
class must have been defined in the Audit Provider class attribute on the Domain-->Security-->Compatibility-->General tab.
To configure a Realm Adapter Auditing provider:
During installation, WebLogic Server does the following to the File realm in mydomain:
These steps ensure that a system
user is defined in the compatibility version of the File realm.
When using the Configuration Wizard to create a new WebLogic Server domain, WebLogic Server sets the system password in the File realm in mydomain to the password of the first user defined in the Admin role. If the Admin role is mapped only to the Administrators group, the system password is the password of the first alphabetical user in the Administrators group.
To improve security, BEA recommends frequently changing the system password that was set during installation. Each WebLogic Server deployment must have a unique password.
When you use an Administration Server and Managed Servers in a domain, the Managed Server must always use the password for the Administration Server in the domain. Always change the password for the Administration Server through the WebLogic Server Administration Console. When WebLogic Server is rebooted, the new password is propagated to all the Managed Servers in the domain.
All user and group data for the File realm is stored in the fileRealm.properties
file. If the fileRealm.properties
file becomes corrupted or is destroyed, you must reconfigure the security information for WebLogic Server. Compatibility security cannot run without a fileRealm.properties
file. Even if you write a custom security realm, you still need a fileRealm.properties
file to boot WebLogic Server. Therefore, BEA recommends that you take the following steps:
Note: Also make a backup copy of the SerializedSystemIni.dat
file for the File realm.
To configure the Caching realm:
To enable the Authentication cache:
To enable the Permission cache:
To add a note to the caching realm:
The Lightweight Directory Access Protocol (LDAP) V1 security realm provides authentication through users and groups stored in an LDAP directory. This server allows you to manage all the users for your organization in one place: the LDAP directory. The LDAP V1 security realm supports Open LDAP, Netscape iPlanet, Microsoft Site Server, and Novell NDS directory servers.
To use the LDAP V1 security realm instead of the File realm:
To enable communication between the LDAP server and WebLogic Server:
To specify how users are located in the LDAP V1 security realm:
To specify how groups are located in the LDAP V1 security realm:
To add a note to the LDAP V1 security realm:
In Compatibility security, the LDAP realm V2 is configured as a custom security realm.
The LDAP tree and schema is different for every LDAP server. The Supported Server Templates has templates for the supported LDAP servers. These templates specify default configuration information used to represent users and groups in each of the supported LDAP servers.
Name of the LDAP realm V2, such as defaultLDAPRealmForNetscapeDirectoryServer. |
|
Name of the WebLogic class that implements the LDAP V2 realm such as |
|
Specify information specific to your LDAP configuration for the following:
See Supported Server Templates for sample values for the supported LDAP servers. |
Listing 152-1 through Listing 152-1 are templates used to configure LDAP servers supported in the LDAP realm V2. Copy these templates directly into the config.xml
file for your application.
Warning: Each line in the following code examples must appear on a single line. The examples in the code examples have been formated to fit the margins of this document and some lines have been broken to facilitate that formatting. If you paste this text into the config.xml
file, be sure to concatentate the lines that are broken so that they appear on a single line in your code.
Listing 152-1 Default Netscape Directory Server Template
<CustomRealmName="defaultLDAPRealmForNetscapeDirectoryServer"
RealmClassName="weblogic.security.ldaprealmv2.LDAPRealm"
ConfigurationData=
"server.host=ldapserver.example.com;
server.port=700;
useSSL=true;
server.principal=uid=admin,
ou=Administrators,ou=TopologyManagement,o=NetscapeRoot;
server.credential=*secret*;
user.dn=ou=people,o=beasys.com;
user.filter=(&(uid=%u)(objectclass=person));
group.dn=ou=groups,o=beasys.com;
group.filter=(&(cn=%g)(objectclass=groupofuniquenames));
membership.filter=(&(uniquemember=%M)
(objectclass=groupofuniquenames));
membership.directmembershiponly
"Notes="Before enabling the LDAP V2 security realm, edit the configuration parameters for your environment."/>
Listing 152-2 Default Microsoft Site Server Template
<CustomRealmName="defaultLDAPRealmForMicrosoftSiteServer"
RealmClassName="weblogic.security.ldaprealmv2.LDAPRealm"
ConfigurationData=
"server.host=ldapserver.example.com;
server.port=700;
useSSL=true;
server.principal=cn=Administrator,ou=Members,
o=ExampleMembershipDir;
server.credential=*secret*
user.dn=ou=Members, o=ExampleMembershipDir;
user.filter=(&(cn=%u)(objectclass=member)(!userAccountControl:1.2.840.113556.1.4.803:=2)))
;
group.dn=ou=Groups, o=ExampleMembershipDir;
group.filter=(&(cn=%g)(objectclass=mgroup));
membership.scope.depth=1;microsoft.membership.scope=sub;
membership.filter=(|(&(memberobject=%M)
(objectclass=memberof))(&(groupobject=%M)
(objectclass=groupmemberof)));
membership.search=true;
membership.directmembershiponly
"Notes="Before enabling the LDAP V2 security realm, edit the configuration parameters for your environment."/>
Listing 152-3 Default Novell Directory Services Template
<CustomRealmName="defaultLDAPRealmForNovellDirectoryServices"
RealmClassName="weblogic.security.ldaprealmv2.LDAPRealm"
ConfigurationData=
"server.host=ldapserver.example.com;
server.port=700;
useSSL=true;
server.principal=cn=Admin, DC=BEASYS
server.credential= *secret*;
user.dn=ou=people,o=example.com;
user.filter=(&(cn=%u)(objectclass=person));
group.dn=ou=groups,o=example.com;
group.filter=(&(cn=%g)(objectclass=groupofuniquenames));
membership.filter=(&(member=%M)
(objectclass=groupofuniquenames));
membership.directmembershiponly;"
"Notes="Before enabling the LDAP V2 security realm, edit the configuration parameters for your environment."/>
Listing 152-4 Default Open LDAP Directory Services Template
<CustomRealmName="defaultLDAPRealmForOpenLDAPDirectoryServices"
RealmClassName="weblogic.security.ldaprealmv2.LDAPRealm"
ConfigurationData=
"server.host=ldapserver.example.com;
server.port=700;
useSSL=true;
server.principal=cn=Manager, dc=example, dc=com;
server.credential= *secret*;
user.dn=ou=people, dc=example,dc=com;
user.filter=(&(uid=%u)(objectclass=person));
group.dn=ou=groups,dc=example,c=com;
group.filter=(&(cn=%g)(objectclass=groupofuniquenames));
membership.filter=(&(uniquemember=%M) (objectclass=groupofuniquenames));"
membership.directmembershiponly;
"Notes="Before enabling the LDAP V2 security realm, edit the configuration parameters for your environment."/>
To add a note to the LDAP V2 security realm:
To configure the Windows NT security realm:
When configuring the Caching realm, select your Windows NT security realm from the pull-down menu for the Basic Realm attribute on the General page. The Basic Realm attribute defines the association between the Caching realm and the alternate security realm (in this case, the Windows NT security realm).
Use the following command to verify that you have the correct privileges to run WebLogic Server as the specified Windows NT user:
java weblogic.security.ntrealm.NTRealm
username
password
where username and password are the username and password of the Windows NT account under which WebLogic Server runs.
The output from this command indicates if the specified username and password authenticated properly.
The entered username and password did not authenticate properly. |
If the test comes up with an immediate failure stating that the client or user running WebLogic Server does not have the privileges to run the Windows NT Security realm,then it may be necessary to do one of two things:
-Dweblogic.security.ntrealm.logonNetwork=true
to change the NTRealm's NT Logon from LOGON32_LOGIN_INTERACTIVE to LOGON32_LOGIN_NETWORK. To update the rights in Windows NT:
To update the rights in Windows 2000:
The following are common Windows NT error codes that occur when using the Windows NT Security realm:
A full explanation of the Windows NT error codes is found in the winerror.h
file.
To add a note to the Windows NT securitty realm:
The wlauth
program runs setuid root
. You need root permissions to modify the ownership and file attributes on the wlauth
program and to set up the PAM configuration file for wlauth
.
To set up the wlauth
program for the UNIX security realm:
wlauth
file to a file system on the computer that executes WebLogic Server, for example, the /usr/sbin
directory. The wlauth
file is in the weblogic/lib/
arch
directory, where arch
is the name of your platform.
# chown root wlauth
# chmod +xs wlauth
Solaris—Add the following lines to your /etc/pam.conf
file:
# Setup for WebLogic authentication on Solaris machines
#
wlauth auth required /usr/lib/security/pam_unix.so.1
wlauth password required /usr/lib/security/pam_unix.so.1
wlauth account required /usr/lib/security/pam_unix.so.1
Linux—Create a file called /etc/pam.d/wlauth
containing the following:
#%PAM-1.0
#
# File name:
# /etc/pam.d/wlauth
#
# If you do not use shadow passwords, delete "shadow".
auth required /lib/security/pam_pwdb.so shadow
account required /lib/security/pam_pwdb.so
If wlauth
is not in the WebLogic Server class path or if you have given the program a name other than wlauth
, you must add a Java command-line property when you start WebLogic Server. Edit the script you use to start WebLogic Server and add the following option after the java
command:
-Dweblogic.security.unixrealm.authProgram=
wlauth_prog
Replace wlauth_prog
with the name of the wlauth
program, including the full path if the program is not in the search path. Start WebLogic Server. If the wlauth
program is in the WebLogic Server path and is named wlauth
, this step is not needed.
Note: The UNIX Security realm runs only on the Solaris and Linux platforms.
To configure the Unix security realm:
The RDBMS security realm is a BEA-provided custom security realm that stores users, groups and ACLs in a relational database.The RDBMS security realm is an example and is not meant to be used in a production environment.
Notes: The RDBMS example does not work with databases that have an autocommit feature enabled. If you use the RDBMS example as a starting point for your RDBMS implementation, use explicit commit statements in your code and make sure the autocommit feature in the database you are using is disabled.
If your implementation of the RDBMS security realm uses the getActiveDomain()
method, you need to edit and recompile your RDBMSDelegate
class in order to use the RDBMS security realm with Compatibility security. Replace the getActiveDomain()
method with the getSecurityConfig()
method in the weblogic.server
package.
To configure an RDBMS security realm:
To define attributes for the JDBC driver that connects to the database in the RDBMS security realm:
To define attribute for the database schema used by the RDBMS security realm:
Listing 152-1 contains the database statements entered in the Schema properties for the RDBMS code example shipped with WebLogic Server in the /samples/examples/security/rdbmsrealm
directory.
Listing 152-1 Sample Schema for RDBMS Security Realm
"getGroupNewStatement=true;getUser=SELECT U_NAME, U_PASSWORD FROM users WHERE U_NAME = ?;
getGroupMembers=SELECT GM_GROUP, GM_MEMBER from groupmembers WHERE GM_GROUP = ?;
getAclEntries=SELECT A_NAME, A_PRINCIPAL, A_PERMISSION FROM aclentries WHERE A_NAME = ? ORDER BY A_PRINCIPAL;
getUsers=SELECT U_NAME, U_PASSWORD FROM users;
getGroups=SELECT GM_GROUP, GM_MEMBER FROM groupmembers;
getAcls=SELECT A_NAME, A_PRINCIPAL, A_PERMISSION FROM aclentries ORDER BY A_NAME, A_PRINCIPAL;
getPermissions=SELECT DISTINCT A_PERMISSION FROM aclentries;
getPermission=SELECT DISTINCT A_PERMISSION FROM aclentries WHERE A_PERMISSION = ?;
newUser=INSERT INTO users VALUES ( ? , ? );
addGroupMember=INSERT INTO groupmembers VALUES ( ? , ? );
removeGroupMember=DELETE FROM groupmembers WHERE GM_GROUP = ? AND GM_MEMBER = ?;
deleteUser1=DELETE FROM users WHERE U_NAME = ?;
deleteUser2=DELETE FROM groupmembers WHERE GM_MEMBER = ?;
deleteUser3=DELETE FROM aclentries WHERE A_PRINCIPAL = ?;
deleteGroup1=DELETE FROM groupmembers WHERE GM_GROUP = ?;
deleteGroup2=DELETE FROM aclentries WHERE A_PRINCIPAL = ?"
To add a note to the RDBMS security realm:
You can create a custom security realm that draws from an existing store of users such as directory server on the network. To use a custom security realm, you create an implementation of the weblogic.security.acl.AbstractListableRealm
interface or the weblogic.security.acl.AbstractManageableRealm
interface and then use the Administration Console to install your implementation.
To install a custom security realm:
To add a note to a custom security realm:
Note: This section explains how to add users to a manageable security realm (for example, the File realm) in the CompatibilityRealm. If you are using a security realm that is not manageable through the WebLogic Server Administration Console, you must use the administration tools provided in that realm to define a user.
For a more secure deployment, BEA recommends running WebLogic Server with the guest
account disabled.
Disabling the guest
account just disables the ability to log in into the account guest
; it does not disable the ability for unauthenticated users to access a WebLogic Server deployment.
Note: This section explains how to add groups to a manageable security realm (for example, the File realm) in the CompatibilityRealm. If you are using a security realm that is not manageable through the WebLogic Server Administration Console, you must use the administration tools provided in that realm to define a group.
To define a group in the Compatibility realm:
To remove a user from a group:
Compatibility security provides backward compatibility for ACLs and should not be considered a long-term security solution. The steps in this section should only be used if you corrupt an existing 6.x security realm and you have no choice but to restore it. Instead of ACLs, use security roles and security policies to protect WebLogic resources.
Note: ACLs on MBeans are not supported in this release of WebLogic Server. For more information, see "Layered Security Scheme for Server Resources in Securing WebLogic Resources.
When you specify an ACL for a JDBC connection pool, you must specifically define access to the JDBC connection pool for the system
user in the filerealm.properties file. For example:
acl.reserve.poolforsecurity=system
acl.reset.poolforsecurity=system
To create ACLs for WebLogic resources:
Either create separate ACLs for each permission available for a resource or one ACL that grants all the permissions for a resource. For example, you can create three ACLs for the JDBC connection pool, demopool
: one with reserve
permission, one with reset
permission, and one with shrink
permission. Or you can create one ACL with reserve
, reset
, and shrink
permissions.
To protect user accounts in your WebLogic Server domain:
If your WebLogic Server 6.x security configuration uses an implementation of the weblogic.security.audit.AuditProvider
class, the Auditor is not automatically configured in Compatibility security. Configure a Realm Adapter Auditing provider in the Compatibility realm to access the 6.x Auditor.
To configure a Realm Adapter Auditing provider:
java weblogic.Admin -url t3://localhost:7001 -username
adminusername
-password
adminpassword
CREATE -mbean Security:
Name=CompatibilityRealmRealmAdapterAuditor -type
weblogic.security.providers.realmadapter.RealmAdapterAuditor commotype
java weblogic.Admin -url t3://localhost:7001 -username
adminusername
-password
adminpassword
SET -mbean Security:
Name=CompatibilityRealmRealmAdapterAuditor -property Realm Security:Name=CompatibilityRealm commotype
java weblogic.Admin -url t3://localhost:7001 -username
adminusername
-password
adminpassword
SET -mbean Security
Name=CompatibilityRealm -property Auditors
Security:Name=CompatibilityRealmRealmAdapterAuditor commotype
![]() ![]() |
![]() |
![]() |