WebLogic 11g:Override Production enabled Security

Michel Schildmeijer 1
0 0
Read Time:1 Minute, 4 Second

When you configure yor domain in WebLogic 11g, by screen install or by scripts, when you choose Production Mode security will be more strict as in Development Mode.

Normally it would require a boot.properties afterwards to create in order to start; anyway, all kinds of unnecessary steps.

In a scripted install with WLST , here is a way to override it… watch wonderous python!:lol:

First, in your script define some variables:

def createBootPropertiesFile(domain_dir, username, password) :
if not os.path.exists(domain_dir + “/servers/” + “AdminServer” + “/security”):
os.makedirs(domain_dir + “/servers/” + “AdminServer” + “/security”)
filename=(domain_dir + “/servers/” + “AdminServer” + “/security/boot.properties”)
f=open(filename, ‘w’)
line=’username=’ + username + ‘\n’
f.write(line)
line=’password=’ + password + ‘\n’
f.write(line)
f.close()
else:
print ‘domain_dir + “/servers/” + “AdminServer” + “/security” exists’

Then, finally in your WriteDomain statement include

writeDomain(properties.domain_dir)
if (properties.production_mode_enabled):
createBootPropertiesFile(properties.domain_dir, ‘weblogic’, properties.weblogic_password)
else:
print ‘Dry run completed, if you still have an interactive session (started with wlst -i), ‘ + \
‘run: writeDomain(\” + properties.domain_dir + ‘\’) to write the domain to disk’
if (properties.production_mode_enabled):
print ‘and createBootPropertiesFile(\” + properties.domain_dir + ‘\’,\’weblogic\’,’+ ‘\” + properties.weblogic_password + ‘ \’)’

About Post Author

Michel Schildmeijer

Started in pharmacy, I made the change to IT in 1996. I am an Oracle Fusion Middleware Architect at AMIS, with focus on technical infrastructure, Serverside solutions, installing, administering, configuring the Oracle Fusion Middleware stack. My experience is from integrations at telco´s using Oracle AIA, Oracle Portal, OID, Forms&Reports, Discoverer upto the latest Oracle WebLogic 11g releases with practically all Oracle products running on top of it
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

One thought on “WebLogic 11g:Override Production enabled Security

Comments are closed.

Next Post

Java Developers: Make the Database Work for You!

This article accompanies the similarly named article in the Dutch Java Magazine. It provides additional resources, some source code and an invitation to the 4 February Masterclass by Lucas Jellema that presents a detailed study of the topics raised in this article. The article itself: Click JavaMagazine_LaatDeDatabaseVoorJeWerken_partOne_dec2010.pdf for this article. Friday […]
%d bloggers like this: