WebLogic 11g:Override Production enabled Security

1

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 + ‘ \’)’
Share.

About Author

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