Showing posts with label TIPS. Show all posts
Showing posts with label TIPS. Show all posts

Tuesday, July 25, 2017

OAAM Tips: Enable Secure and HTTPonly to all OAAM cookies

There are two properties to set OAAM cookies Secure and HTTPOnly.

  1. "oaam.cookies.secure" property can be "true" or "false". By default property value always "false". If all OAAM cookies needed to be secure make this property "true".
  2. "oaam.cookies.httponly" property is "true" by default.
It's always good practice to have both true as it prevents sending the cookie over the network in clear text.

Thanks
Siva Pokuri.



Thursday, July 14, 2016

Tips: Set OVD 11g Debug Logs to Trace level

Step 1

1. Open ODSM
2. Click Advanced tab
3. Click/Expand Global Plugin
4. Click on the button to Create Plug-in 
5. For Name put for ex. myDumpTr
6. For Class choose DumpTransactions
7. Click on the button Create Parameter
8. For Name write loglevel 
9. For Value write FINEST
10.Cick Ok

Step 2:

1. Open Oracle Enterprise Manager, access http://<host>:<port>/em login with user name Weblogic (or whatever other user that you choose for admin)
2. Expand -> Farm_<name>Domain -> Identity and Access right click ovd1 ->choose Logs -> Log Configuration
3. Click Log Levels tab
 For Logger Name -- com.octetstring.accesslog choose TRACE:32 (FINEST)
 For Logger Name -- com.octetstring.vde choose TRACE:32 (FINEST)
4. Click Apply
5. Click Close in Confirmation dialog box

Stop OVD:

$ORACLE_INSTANCE/bin/opmnctl stopproc ias-component=ovd1

Start OVD:

$ORACLE_INSTANCE/bin/opmnctl startproc ias-component=ovd1


Check logs in $ORACLE_INSTANCE/diagnostics/logs/OVD/ovd1/ location

Wednesday, March 2, 2016

TIP: Enable HTTP debug in Weblogic server

Steps:

1. Stop all the weblogic admin servers & managed servers
2. Add below list to JAVA_OPTIONS in setDomainEnv.sh file in the weblogic domain.
-Dweblogic.log.StdoutSeverity=Debug
-Dweblogic.log.LogSeverity=Debug
-Dweblogic.log.LoggerSeverity=Debug
-Dweblogic.debug.DebugHttpSessions=true
-Dweblogic.debug.DebugReplication=true
-Dweblogic.debug.DebugHttp=true
-Dweblogic.debug.DebugHttpLogging=true
3. If you want to enable HTTP debug for any specific admin or managed server follow below steps.
a. Login to Weblogic Admin console
b. Click on “Servers” link
c. Click on the Admin server/ managed server and click on debug
d. Expand weblogic
e. Expand servlet
f. Select “DebugHTTP”
g. Select “DebugHTTPSessions”
h. Select “DebugHTTPLogging”
i. Navigate to weblogic>>core>>cluster
j. Select “DebugReplication”
k. Click on “Enable” button
l. Click on “Activate Changes”
4. Navigate to Environment >>Servers in the left panel
5. Click on the server name
6. Click on Logging tab
7. Expand Advanced tab
8. Change the severity level from “Trace” to “Debug”
9. Click on “Save” button
10. Click on “Activate Changes”
11. Start Weblogic admin & managed servers in the cluster
12. Check the server log files

-- Siva Pokuri.

Thursday, October 22, 2015

TIPS: SQL query to search OAAM 11g User security questions registered in database

Query:

select question from v_user_questions where question_id in (select question_id from v_user_qa where user_id in (select user_id from vcrypt_users where login_id = 'spokuri') and answer != 'null');

-- Siva Pokuri.

Sunday, September 27, 2015

TIPS: To turn off location prompt in OAAM Server login page

OAAM Location tracker screenshot:



Change below property value from "true" to "false" in OAAM Admin Console to stop that Location tracker prompt:

bharosa.uio.default.javascript.fingerprint.location.prompt.enabled=true

-- Siva Pokuri.

Wednesday, October 8, 2014

TIPS: Sample Create User Oracle Identity Manager 11g API code

Sample Code:

import Thor.API.Operations.tcLookupOperationsIntf;

import java.util.HashMap;
import java.util.Hashtable;

import javax.security.auth.login.LoginException;

import oracle.iam.identity.exception.UserAlreadyExistsException;
import oracle.iam.identity.exception.UserCreateException;
import oracle.iam.identity.exception.ValidationFailedException;
import oracle.iam.identity.usermgmt.api.UserManager;
import oracle.iam.identity.usermgmt.vo.User;
import oracle.iam.platform.OIMClient;

public class OIMTestClient
{  
    public static void main(String arg[])
    {
        Hashtable<Object, Object> env = new Hashtable<Object, Object>();
        env.put(OIMClient.JAVA_NAMING_FACTORY_INITIAL, "weblogic.jndi.WLInitialContextFactory");
        env.put(OIMClient.JAVA_NAMING_PROVIDER_URL, "t3://pokuri.demo.com:14000");
     
        System.setProperty("java.security.auth.login.config", "/IdentityManagement/Blog/OIM/JDeveloperConfigforOIM/designconsole/config/authwl.conf");
        System.setProperty("OIM.AppServerType", "wls");
        System.setProperty("APPSERVER_TYPE", "wls");
        oracle.iam.platform.OIMClient oimClient = new oracle.iam.platform.OIMClient(env);
     
        try
        {                      
            oimClient.login("xelsysadm", "Abcd1234".toCharArray());
            System.out.print("Successfully Connected with OIM ");
            System.out.println("Before Create User --");
         
         
            HashMap<String, Object> userAttributeValueMap = new HashMap<String, Object>();
            userAttributeValueMap.put("act_key", new Long(1));
            userAttributeValueMap.put("User Login", "sam");
            userAttributeValueMap.put("First Name", "sam");
            userAttributeValueMap.put("Last Name", "peter");
            userAttributeValueMap.put("Email", "speter@abc.com");
            userAttributeValueMap.put("usr_password", "Password123");
            userAttributeValueMap.put("Role", "OTHER");
            User user = new User("sam", userAttributeValueMap);
            UserManager userManager = oimClient.getService(UserManager.class);
            try {
                userManager.create(user);
                System.out.println("\nUser Created");
            } catch (ValidationFailedException e) {
                e.printStackTrace();
            } catch (UserAlreadyExistsException e) {
                e.printStackTrace();
            } catch (UserCreateException e) {
                e.printStackTrace();
            }
            System.out.println("User Created successfully");
        }
        catch (Exception e)
        {
            System.out.print(" Exception"+ e);
        }
    }
}