Advertisements
RSS

WLST for creating Weblogic domain with RDBMS Security Store

05 Aug

I often use WLST scripts to quickly build a Weblogic or OSB domain for development and testing. However this time I wanted to configure the RDBMS security store which you normally can configure as one of the 1st steps in the wizard GUI.

So this example code creates a Weblogic 10.3 domain with a configured RDBMS security store.

In this case a local OracleXE database is used since it’s on my development machine.
Dont forget to run the rdbms_security_store_oracle.sql script in the Oracle database to make sure all the required tables are present.

#=================================
# Open Weblogic 10.3 template.
#=================================</pre>
readTemplate('c:/osb/wlserver_10.3/common/templates/domains/wls.jar')

#=================================
# Configure Admin settings
#=================================

print('Set default settings for osb_dev_admin')
cd('/Servers/AdminServer')
cmo.setName('osb_dev_admin')
set('ListenAddress','localhost')
set('ListenPort', int('7001'))

#=================================
# Configure User settings
#=================================

print('Start creating OSBadmin user')
delete('weblogic','User')
create('OSBadmin','User')
cd('/Security/base_domain/User/OSBadmin')
cmo.setIsDefaultAdmin(true)
cmo.setPassword('ChangeME01')
cmo.setDescription('OSBadmin created by WLST script')

#=================================
# Configure RDBMS Security Store settings
#=================================

print 'Configure RDBMS security store'
create('base_domain','SecurityConfiguration')
cd('/SecurityConfiguration/base_domain')
realm=get('DefaultRealm')
cd('Realm/myrealm')
rdbms = create("myRDBMSSecurityStore", "RDBMSSecurityStore")
rdbms.setUsername('system')
rdbms.setPasswordEncrypted('password')
rdbms.setConnectionURL('jdbc:bea:oracle://localhost:1521')
rdbms.setDriverName('weblogic.jdbc.oracle.OracleDriver')
rdbms.setConnectionProperties('user=system,portNumber=1521,SID=XE,serverName=localhost')

#=================================
# Write domain and finalize
#=================================

print ('Write domain in: c:/osb_shared/osb_dev_domain')
setOption('OverwriteDomain', 'true')
writeDomain('c:/osb_shared/osb_dev_domain')
closeTemplate()

Advertisements
 
6 Comments

Posted by on 05-08-2009 in Oracle, OSB, Weblogic, WLST

 

Tags: , ,

6 responses to “WLST for creating Weblogic domain with RDBMS Security Store

  1. Matthias Gärtner

    03-02-2012 at 23:29

    Cool, this seems to include *offline* creation of a further user, next to the one “weblogic” user?

    Searching so far has revealed only *online* ways to create a new user (= entry in DefaultAuthenticator). Can it really be as easy as create(..,”User”)?

     
    • jvzoggel

      06-02-2012 at 14:15

      Hi Matthias, yes this works offline. But only due to the fact that your domain is not created yet. A template is read and we adjust certain settings before writing the domain and finalizing the creation. But I don’t really understand your case where you would need an offline user creation option.

      If you search for good user management options you might want to consider an external LDAP (like OID for instance), configure the LDAP connection in the Weblogic security realm and use this for user management instead of the internal Weblogic LDAP.

       
  2. asnblogger

    09-03-2012 at 05:47

    HI,

    Thanks for the information.

    I am configuring an RDBMS security store in an clustered environment and am having difficulty in understanding what exact details should be provided in the “Server Synchronization Configuration” of the RDBMS Security Store on the admin console.

    There are the following parameters:

    JNDI User Name: I am not sure which user name should be given here. Should it be the admin user id for the domain?
    JNDI Password:What should this value be?
    JMS Topic:I configured a module and created a topic in the module. And gave the name of the topic.
    JMS Topic Connection Factory: Gave a value “weblogic.jms.ConnectionFactory”
    Notification Properties:Documents are stating to define 2 properties: java.naming.provider.url and java.naming.factory.initial. Not sure where to find them

    Can you please help out in this regard?

    Abhi

     
  3. asnblogger

    09-03-2012 at 13:23

    Hi,

    As part of the configuration details, I gave the following details:
    JNDI User Name:
    JNDI Password:
    JMS Topic:
    JMS Topic Connection Factory: weblogic.jms.ConnectionFactory
    Notification Properties: java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory,java.naming.provider.url=t3://localhost:7101,java.naming.security.principal=,java.naming.security.credentials=

    Upon restart after this configuration, I get the following error

    Any information as to whats the configuration to avoid the error would be helpful.

    Thanks

     
    • Sam

      29-08-2012 at 05:40

      Can some body help me by giving me steps as how to find out whether my RDBMS security store is running or updating??Please reply ..thanks

       
  4. Carlo

    24-09-2015 at 01:01

    Hi asnblogger,
    Did you figured out how to set up the JMS topic for the RDBMS security store?
    Thanks

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: