Thursday, September 10, 2015

Recover WebLogic Server Admin Password


Recover  WebLogic Server Admin Password 


1.        Please save below script as recoveradminpass.py for real time best practice save this file in shared drive which can be access from all servers.


from weblogic.security.internal import *
from weblogic.security.internal.encryption import *
encryptionService = SerializedSystemIni.getEncryptionService(".")
clearOrEncryptService = ClearOrEncryptedService(encryptionService)

# Take encrypt password from user
pwd = raw_input("Paste encrypted password ({AES}fk9EK...): ")

# Delete unnecessary escape characters
preppwd = pwd.replace("\\", "")

# Display password
print "Decrypted string is: " + clearOrEncryptService.decrypt(preppwd)


2. Set domain environment variables

source $DOMAIN_HOME/bin/setDomainEnv.sh

3. Get encrypted password from boot.properties file of AdminServer


#Password:
grep password $DOMAIN_HOME/servers/AdminServer/security/boot.properties | sed -e "s/^password=\(.*\)/\1/"

4. Navigate to $DOMAIN_HOME/security directory and run the following command to start decryption:

cd $DOMAIN_HOME/security

java weblogic.WLST  location/recoveradminpass.py


Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Paste encrypted password ({AES}fk9EK...): {AES}dXHAlPujdpMNKUNDUJuGtcZiWmLagbtNFexVPAi4sek=
Decrypted string is: welcome123




Tuesday, July 21, 2015

SSL Notes


Understanding SSL communication

What is SSL?

SSL stands for Secure Sockets Layer. It is a technology using which the data exchange between two systems are encrypted so that no one except the systems involved can interpret the data.







As you can see in the picture above, SSL communication involves a client and a server. Client is most probably a browser from a user’s PC, even though it can be a server application communicating with another server application. The server is most probably a Web Server, even though it can be any ssl enabled server application such as a Database Server or a Message queueing Server.
When you access a website using your browser, if the site is SSL enabled, you can see the security information in the browser. For example, see image below.



Note that SSL is a protocol, meaning various software products and frameworks implement SSL a little differently. However they must all adhere to the SSL specification. From Administration and Support perspective, what this means is you will have to do a bit of a reading to support SSL with various products. For example, while it is true that you need to add the CA certificate of the remote system you are trying to connect to your trust store, the steps you must follow for a WebLogic Application server will be different from a Jboss Application Server. I will explain all about CA certs in a sec


TLS, which stands for Transport Layer Security is the new generation SSL (After SSL version 3.0, it is TLS). As you can guess, TLS is the preferred protocol as it is newer (TLS 1.2 is the latest as of June 2015).
In the OSI Network model, SSL/TLS will fit in somewhere between Transport and Application layer.
SSL provides for two key security aspects in a client-server communication.
Authentication: You are guaranteed to communicate with the system that you are trying to communicate with (unless you are victim of Man in the Middle attack)
Encryption: The data being exchanged is guaranteed to be decrypted ONLY by you and the system you are communicating with (unless someone gets access to your private key)



How does SSL work?
SSL is based on Public Key Cryptography. Let us take a simple case to illustrate how it works.
A Web Server that wants to use SSL for its communication with the clients will first obtain a Private Key and a corresponding Public key (this is called Key Pair as they are mathematically related). When a client accesses the Web Server (for example, using the URL https://yourserver.com), the server sends the public key to the client. The client encrypts the data using the public key (or a derivative of the public key) which can be decrypted ONLY by someone who has the private key; in this case it is your server.
Public keys come in various strengths, depending on their size. A strong key size is 2048 bits. A 2048 bits RSA Public key looks like below:
30 82





Public keys come in various strengths, depending on their size. A strong key size is 2048 bits. A 2048 bits RSA Public key looks like below:
30 82 01 0a 02 82 01 01 00 b9 4b 64 43 5c 68 dc 87 6b 29 6f 5d 2b 2d 50 80 e1 38 1e 07 f4 e2 34 b1 cf 73 37 8a 30 9c c8 63 da 8a 50 64 1f 71 80 93 c1 f5 9e d8 4d 71 05 ea ff 8b 43 97 21 47 1a fb f0 6b dc 74 ca da a9 0d a1 cf e7 b8 59 09 27 77 a3 d7 b0 3d 2a fd 44 62 1b


Note: Larger keys come with some performance hit but it is more difficult to crack. You must use at least 2048 bits.



Where do SSL certificates come into play?
A SSL certificate is nothing but a file containing Signed Public Key. It is a secure mechanism to send the Public key. More importantly, since the public key is signed, it proves the validity of the certificate (Authentication).
Here is how it works:
When a Server wants to enable SSL, it generates a key pair (the method of creating the key pair depends on the technology/product it is using. But typically java based applications can use the application ‘keytool’ that comes with Java). It then applies for a singed public key. It does so by creating a CSR (Certificate signing request) and sending it to a CA (Certificate authority). Upon reviewing the application, CA generates a Certificate chain which includes the Server certificate (signed public key) and a certificate (or certificates) of the CA itself. This certificate chain will need to be installed in the Server application (again, installing the server certificate depends on the product/technology the server is using).
To summarize:
1. Server generates a private key and a public key
2. Server generates and submits a CSR (Certificate signing request) to a CA (Certificate authority such as Symantec)
3. CA generates a Certificate chain containing the Server certificate (signed public key) and a certificate (or certificates) of the CA itself.
4. This certificate chain will need to be installed in the Server application
Taking a deeper look at a SSL certificate



Will keep update this ....

Thursday, July 2, 2015



Oracle Critical Patch Updates for Weblogic/SOA



http://www.oracle.com/technetwork/topics/security/cpujul2014-1972956.html


http://www.oracle.com/technetwork/topics/security/cpuoct2014-1972960.html

http://www.oracle.com/technetwork/topics/security/cpujan2015-1972971.html



http://www.oracle.com/technetwork/topics/security/cpuapr2015-2365600.html





Product Home
Patch
Advisory Number
Comments
WebLogic Server 10.3.6.0.0 home
PSU 10.3.6.0.11
Patch 20181997
CVE-2014-3566, CVE-2015-0449
See Note 1306505.1, Announcing Oracle WebLogic Server PSUs (Patch Set Updates)
For CVE-2014-4256, see Note 1903763.1, Download Request for Security Configuratio


10.3.6 Patch Set Updates

PSU
Description
Patch Download
Patch Availability Document
Smart Update Patch ID
Bugs fixed in this PSU
10..3.6.0.11
10.3.6.0.11 Patch Set Update (PSU) for WebLogic Server 10.3.6.0
YUIS
My Oracle Support
Note 1997891.1
10..3.6.0.10
10.3.6.0.10 Patch Set Update (PSU) for WebLogic Server 10.3.6.0
12UV
My Oracle Support   Note 19637463.1
10.3.6.0.9
10.3.6.0.9 Patch Set Update (PSU) for WebLogic Server 10.3.6.0
My Oracle Support
Note 1912224.1
FSR2
My Oracle Support
Note 1935048.1
10.3.6.0.8
10.3.6.0.8 Patch Set Update (PSU) for WebLogic Server 10.3.6.0
My Oracle Support
Note 1618213.1
T5F1
My Oracle Support
Note 1645823.1


Oracle SOA Suite 11.1.1.7.0

https://support.oracle.com/epmos/faces/PatchDetail?_adf.ctrl-state=19l298hkuy_642&patch_name=20423535&releaseId=17111170&patchId=20423535&languageId=0&platformId=2000&_afrLoop=455304959776028

20423535 --SOA Bundle Patch 11.1.1.7.7 (Patch)


OSB: 11.1.1.7.0 

 20423630 - OSB Bundle Patch 11.1.1.7.4 (Patch)  39.4 MB




Thursday, June 25, 2015

DataBase Connectivity Check form application server(weblogic/soa)


DataBase Connectivity Check form application server(weblogic/soa)


Command :java utils.dbping DBMS user password DB

Before executing below command u have to set envronment

cd $DOMAIN_HOME/bin

source setDomainEnv.sh

or cd $WL_HOME/server/bin

source setWLSEnv.sh

java utils.dbping ORACLE_THIN username password hostname:port/instance_name

Thursday, April 9, 2015

SOA/OSB 12C upgrade from 11.1.1.7

High Level Steps



Steps: High Level Steps



1.            Prerequisites Check for Upgrade

2.            Prepare Install/Upgrade doc with new directory structure & ports(if req).

3.            Backup Current System (APP+DB)

4.            Install new software under new location

5.            Upgrade Dehydration store   (Schema Upgrade)

6.            Upgrade Domain 

7.            Reconfigure Domain

8.            Post Upgrade Activities

Monday, March 30, 2015

SOA Patching Process in Windows Environment



SOA Patching Process in Windows Environment


1. Set Oracle Home to SOA Home

set ORACLE_HOME=D:\Oracle\Middleware\Oracle_SOA1

this should be set as per your environment

2. Go to D:\Oracle\Middleware\Oracle_SOA1\OPatch

3. To check Inventory and patch intory  execute opatch.bat lsinventory

D:\Oracle\Middleware\Oracle_SOA1\OPatch>opatch.bat lsinventory


D:\Oracle\Middleware\Oracle_SOA1\OPatch\opatch.bat lsinventory

4. Down load patch 14641824 and unzip

5. go to patch location and execute below command


D:\Oracle\Middleware\Oracle_SOA1\OPatch\opatch.bat apply

If any doubts please check patch readme for more details


To check patch applied or not execute below

D:\Oracle\Middleware\Oracle_SOA1\OPatch\opatch.bat lsinventory


Saturday, October 18, 2014

system-jazn-data.xml : Security issues issues




Symptoms:



You are unable to deploy SOA composites due to permission problem.

When a manged server was stopped you are no longer able to start it.
The Admin console shows the server state as 'FAILED_NOT_RESTARTABLE' and the following exception is seen in the server log:


java.security.AccessControlException: access denied (oracle.security.jps.service.credstore.CredentialAccessPermission context=SYSTEM,mapName=SOA,keyName=KeystorePassword read)



Cause:

Check of the system-jazn-data.xml shows that it is missing all preseeded roles such as SOAAdmin






Location : DOMAIN_HOME/config/fmwconfig


Solution:


Copy system-jazn-data.xml from a working installation into non-working installation.





Below will be error's u can see in front end logn, b2bconsole and soa composer




Tuesday, September 23, 2014

Caused by java.lang.UnsupportedOperationException: Remote JDBC disabled

Caused by java.lang.UnsupportedOperationException: Remote JDBC disabled

Caused by java.lang.UnsupportedOperationException: Remote JDBC disabled.
; nested exception is: BINDING.JCA-11622
Could not create/access the TopLink Session.

This session is used to connect to the datastore.


Above issue happening at OSB Calls 

Solution for this issue  is need to Enable Remote JDBC 

Shut Down OSB Managed Servers.

Please find below parameter  in setDomainEnv.sh and set it to true. It will be false by default

-Dweblogic.jdbc.remoteEnabled=true 


Thursday, September 11, 2014

weblogic.ldap.EmbeddedLDAP.validateVDEDirectories

Error/Issue: AdminServer is shutting down with below error in log file

<Sep 9, 2014 1:14:25 AM PDT> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: java.lang.NumberFormatException: null
java.lang.NumberFormatException: null
        at java.lang.Integer.parseInt(Integer.java:417)
        at java.lang.Integer.parseInt(Integer.java:499)
        at weblogic.ldap.EmbeddedLDAP.validateVDEDirectories(EmbeddedLDAP.java:1104)
        at weblogic.ldap.EmbeddedLDAP.start(EmbeddedLDAP.java:242)
        at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
        Truncated. see log file for complete stacktrace
>
<Sep 9, 2014 1:14:25 AM PDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED>
<Sep 9, 2014 1:14:25 AM PDT> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down>
<Sep 9, 2014 1:14:25 AM PDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>



Solution:  Move data,cache,tmp under AdminServer directory and start AdminServer.

Or you can move ldap directory under data directory 

Bottom line is LDAP was corrupted need to recreate.


"class java.lang.NoClassDefFoundError : sun/awt/X11GraphicsEnvironment"

"class java.lang.NoClassDefFoundError : sun/awt/X11GraphicsEnvironment"

While opening EM Console will see that error in AdminServer log file.

Issue: We can open EM Console but we cant expand soa_infra, not only soa_infra we cant open any thing in em console except tropology.
  

Solution:
Please include below parameter in startup parameters of adminserver.


-Djava.awt.headless=true

Please mail me if required any help to implement solution bonams@gmail.com