Create Active Directory Authentication Provider from WLST

connect(‘weblogic’,’weblogic’,’t3://localhost:7001′) edit() startEdit(-1,-1,’false’) cmo.getSecurityConfiguration().getDefaultRealm().createAuthenticationProvider(‘ADAuthenticator’, ‘weblogic.security.providers.authentication.ActiveDirectoryAuthenticator’) cmo.getSecurityConfiguration().getDefaultRealm().lookupAuthenticationProvider(‘ADAuthenticator’).setControlFlag(‘OPTIONAL’) cd(‘/SecurityConfiguration’) cd(‘base_domain’) cd(‘Realms/myrealm/AuthenticationProviders’) cd(‘ADAuthenticator’) cmo.setGroupBaseDN(‘CN=Users,DC=faisal,DC=bea,DC=com’) cmo.setUserBaseDN(‘CN=Users,DC=faisal,DC=bea,DC=com’) cmo.setAllGroupsFilter(‘(objectclass=group)’) cmo.setPrincipal(‘CN=Administrator,CN=Users,DC=faisal,DC=bea,DC=com’) cmo.setCredential(‘Passw0rd’) cmo.setPort(389) cmo.setHost(‘localhost’) save() activate()

Continue reading

BASIC Authentication with Apache

Create user.txt with the username and password separated by colon user.txt testuser:testuser Then use the htpasswd to encrypt the password Apache2\bin>htpasswd.exe -b user.txt testuser testuser Automatically using MD5 format. Updating password for user testuser Add the following in the httpd.conf file present in C:\Program Files\Apache Group\Apache2\bin LoadModule weblogic_module modules/mod_wl128_20.so <Location

Continue reading

Resetting Admin UserName And Password in Weblogic Server 11g

Step 1 – Set the environment C:\Oracle\Middleware\user_projects\domains\FirstDomain\bin>setDomainEnv.cmd Step 2 – Create a new Admin Account C:\Oracle\Middleware\user_projects\domains\FirstDomain>java weblogic.security.utils.AdminAccount faisal faisal123 . Note: Don’t forget to add a dot(.) at the end. Step 3 – Verify the creation of a new DefaultAuthenticatorInit.ldift file. C:\Oracle\Middleware\user_projects\domains\FirstDomain>dir Volume in drive C has no label. Volume

Continue reading

Use specific SSL protocol version with Weblogic Server.

If we want the Weblogic Server to use only a specific protocol version of SSL,we can do it with the command line options below. -Dweblogic.security.SSL.protocolVersion=SSL3—Only SSL V3.0 messages are sent and accepted. -Dweblogic.security.SSL.protocolVersion=TLS1—Only TLS V1.0 messages are sent and accepted. -Dweblogic.security.SSL.protocolVersion=ALL—This is the default behavior. We can test it by

Continue reading

How to Restrict Key Size Larger that 128 bit on Weblogic Server.

To restrict keysize larger than 128 bit we need to select only those cipher suites in the configuration which use 128 bit key. Sample config:- <ssl> <enabled>true</enabled> <ciphersuite>TLS_RSA_WITH_RC4_128_SHA</ciphersuite> <ciphersuite>TLS_RSA_WITH_RC4_128_MD5</ciphersuite> <hostname-verification-ignored>true</hostname-verification-ignored> <listen-port>7002</listen-port> <server-private-key-alias>xxxxxxx </server-private-key-alias> <server-private-key-pass-phrase-encrypted>xxxxxx</server-private-key-pass-phrase-encrypted> </ssl> List of Ciphersuites Supported by Weblogic Server are:- Cipher Suite Symmetric Key Strength TLS_RSA_WITH_RC4_128_SHA 128

Continue reading

Creating Application Life Cycle Listener

Create a Class that extends ApplicationLifecycleListener. ApplicationListener.java package demo; import weblogic.application.ApplicationException; import weblogic.application.ApplicationLifecycleEvent; import weblogic.application.ApplicationLifecycleListener;; public class ApplicationListener extends ApplicationLifecycleListener { public void preStart(ApplicationLifecycleEvent evt) { System.out.println(“Event preStart received”); } public void postStart(ApplicationLifecycleEvent evt) { System.out.println(“Event postStart received”); } public void preStop(ApplicationLifecycleEvent evt) { System.out.println(“Event preStop received”); } public void

Continue reading

Side by Side deployment/Versioning

Production redeployment of application/ versioning/ side by side deployment We need versioning for updating the application in production on runtime. The sessions which are already logged in will be using the previous version of the application and the new sessions created will use the new version of application. 1)In the

Continue reading