Thursday, November 8, 2018

PL/SQL Script/Program: End Date Multiple Responsibilities

 

Business Need:

Reduce the number of EBS Responsibilities (hats) for a given user.

With Minimum Tweaking, you may achieve additional features:

  • Stop a single responsibility from entire business use
  • Stop people with a language from accessing one more responsibilities using EBS Standard Multi Language feature
  • User has 100 responsibilities in Production. Cloning this to a development environment requires only one Operating Unit and its responsibilities

Standard End Dating of FND User Responsibilities used to work in older versions (Eg: at least 12.1.3). Now responsibility is moved to Role/Permission tables and need API calls to control this.

 

Benefits:

Ease of use and less memory usage

Program / PL/SQL Script:

SET SERVEROUTPUT ON;
 
DECLARE
       CURSOR c1
       IS
    SELECT fu.user_name,
        fa.application_short_name,
        frt.responsibility_name,
        fr.responsibility_key,
        fsg.security_group_key
    FROM fnd_user_resp_groups_all ful,
        fnd_user fu,
        fnd_responsibility_tl frt,
        fnd_responsibility fr,
        fnd_security_groups fsg,
        fnd_application fa
    WHERE fu.user_id = ful.user_id
    AND frt.responsibility_id = ful.responsibility_id
    AND fr.responsibility_id = frt.responsibility_id
    AND fsg.security_group_id = ful.security_group_id
    AND fa.application_id = ful.responsibility_application_id
    AND frt.language = 'US'
    AND fu.user_name IN ('<user-name>')        -- change user name appropriately
                           -- remove user name, if this is applicable to all users
    AND frt.responsibility_name like 'XX%';    -- change resp name appropriately
 
BEGIN
 
       FOR i IN c1
       LOOP
             BEGIN
                    fnd_user_pkg.delresp (username => i.user_name,
                           resp_app => i.application_short_name,
                           resp_key => i.responsibility_key,
                           security_group => i.security_group_key);
                    COMMIT;
                    DBMS_OUTPUT.put_line ('User: '||i.user_name||'Resp: '||i.responsibility_name || ' has been End Dated Successfully !!!');
             EXCEPTION
                    WHEN OTHERS THEN
                           DBMS_OUTPUT.put_line (
                                 'Inner Exception: '
                                 || ' - '
                                 || i.responsibility_key
                                 || ' - '
                                 || SQLERRM);
             END;
       END LOOP;
 
EXCEPTION
WHEN OTHERS THEN
       DBMS_OUTPUT.put_line ('Main Exception: ' || SQLERRM);
 
END;
/
 
COMMIT;
 

Keywords:

Oracle EBS, R12, R12.2.8, Oracle Applications

FND, AOL, Request Group, Responsibility, Security, Access Control, Hat

Monday, October 22, 2018

ISG Error: java.lang.SecurityException: User: ASADMIN~~, failed to be authenticated

 Symptom/Problem/Error:

Responsibility: Integrated SOA Gateway (ISG) Administrator

Path: Search for a Service, Publish or Unpublish

The request fails with error message “java.lang.SecurityException: User: ASADMIN~~DEV, failed to be authenticated.”

We use the EBS Release 12.2.8 and REST web services by ISG. However, this error can occur in multiple R12.2 versions. Also both SOAP and REST calls can have the same issue.

This happens when you access a new instance after cloning.

 

Cause:

Two possible causes to this issue:

1.    Error with EBS Standard Functionality: Make sure the Patch 27949145:R12.OWF.C is applied in the instance

2.    Standard ISG Configuration files are created or updated properly

 

Solution:

Step 1: Apply Patch 27949145:R12.OWF.C.

Step 2: If the issue is not resolved by the Patch, make sure to review and correct ISG Configuration files. Here are all the configuration files:

  • $INST_TOP/soa/isgagent.properties
  • $JAVA_TOP/oracle/apps/fnd/txk/util/isg_contextfile.properties
  • $RUN_BASE/EBSapps/comn/clone/jlib/java/oracle/apps/fnd/txk/util/isg_contextfile.properties
  • $RUN_BASE/EBSapps/comn/adopclone_<context>/jlib/java/oracle/apps/fnd/txk/util/isg_contextfile.properties

Review User Name, Password and Instance UI Links in these files. Probably they are not updated after cloned from Production.


Keywords:

Oracle EBS, SOAP, REST, SecurityException, ASADMIN, failed to be authenticated, Web Service, R12, R12.2.8, ISG, Integrated SOA Gateway, SOAP UI, WS

Saturday, April 21, 2018

EBS REST WS Error: java.lang.SecurityException: User: ASADMIN~~, failed to be authenticated.

 

Scenario:

Typically the error comes when accessing/deploying/undeploying a web service in a test instance after cloning.

We use R12.2.8. Error can happen in any version of R12 Integrated SOA Gateway (ISG) Web Services.

  

Cause:

The ASADMIN can not login to create/deploy web service

Solution:

Here are the possible causes:

  • Ø ASADMIN password is not reset after cloning from production instances

Check ASADMIN user can login with the previous password from instance front-end link

Make sure the ASADMIN user has required permissions and responsibilities based on business requirements

ADASMIN is associated with proper MOAC (Multi Org Access Control) defined with User or Responsibility

  • Ø ASADMIN user or responsibility is inactivated, locked or end dated
  • Ø ISG Setup files are not properly configured

o   isgagent.properties

o   isg_contextfile.properties

 

Keywords:

Oracle EBS, R12, R12.2.8, Oracle Applications, ASADMIN, ISG, Integrated SOA Gateway, Web Services, REST, RestFul

Wednesday, March 28, 2018

Basic SQLs – Oracle EBS ISG – SOAP, REST Web Services

 

Business Need:

Miscellaneous SQLs for analysis and troubleshooting of Oracle EBS module ISG (Integrated SOA Gateway) hosted SOAP and REST based web services.

 

Queries:

All WS/APIs/Services – Return both SOAP and REST

-- all SOA web services available in the system
SELECT *
FROM APPS.FND_SOA_SERVICES
--WHERE CREATION_DATE > SYSDATE - 1.6;
WHERE WSDL_URL LIKE '%_XXOCM_%';
 

All REST / RESTful Web Services

-- all RESTful web services deployed in an instance
SELECT SERVICE_ALIAS, WSDL_URL, CLASS_ID, TO_CHAR(CREATION_DATE,'YYYY-MON-DD') AS CREATED_DATE
FROM APPS.FND_SOA_SERVICES FSS
--WHERE CREATION_DATE > SYSDATE - 1.6;
WHERE WSDL_URL LIKE '%%'
--AND WSDL_URL LIKE '%/rest/%'   -- get only RESTful Web Services
ORDER BY SERVICE_ALIAS;
 

All Services, more details

-- web services, class, internal program, type - details
--SELECT FSS.*, TO_CHAR(FSS.CREATION_DATE,'YYYY-MON-DD') AS CREATED_DATE, ICL.*
SELECT FSS.SERVICE_ALIAS, FSS.WSDL_URL, FSS.CLASS_ID, TO_CHAR(FSS.CREATION_DATE,'YYYY-MON-DD') AS CREATED_DATE,
    ICL.CLASS_NAME, ICL.IREP_NAME, ICL.CLASS_TYPE, ICL.PRODUCT_CODE, ICL.SOURCE_FILE_PATH, ICL.SOURCE_FILE_NAME, ICL.DISPLAY_NAME
FROM APPS.FND_SOA_SERVICES FSS, FND_IREP_CLASSES_VL ICL
--WHERE CREATION_DATE > SYSDATE - 1.6;
WHERE FSS.WSDL_URL LIKE '%%'
AND FSS.CLASS_ID = ICL.CLASS_ID(+)
--AND WSDL_URL LIKE '%/rest/%'   -- get only RESTful Web Services
ORDER BY FSS.SERVICE_ALIAS;
 

All SQLs from a single DB Schema

-- all sqls from a single db user
SELECT  S.MODULE, SQL_TEXT , S.EXECUTIONS   
FROM SYS.V_$SQL S, SYS.ALL_USERS U
WHERE S.PARSING_USER_ID=U.USER_ID
AND (s.MODULE='agt:isg:oracle.apps.fnd.isg.common.util.IRepAcce')
--and s.serial = '40903'
ORDER BY S.LAST_LOAD_TIME;
 
 

Other Important ISG/SOA Related tables

FND_SOA_ATTACHMENT
FND_SOA_BODY_PIECE
FND_SOA_JMS_IN
FND_SOA_JMS_OUT
FND_SOA_LOG_CATEGORY
FND_SOA_LOG_SERVICE_DETAILS
FND_SOA_REQUEST
FND_SOA_RESPONSE
FND_SOA_RESPONSE_METHOD
FND_SOA_RUNTIME_ERROR
FND_SOA_SERVICES
FND_SOA_SERVICE_DT_ERRORS
FND_SOA_SERVICE_OPERATIONS
FND_SOA_SERVICE_POLICIES
 

 

 

Keywords:

Oracle EBS, R12, R12.2.8, ISG, Integrated SOA Gateway, APPLSYS, FND, SOAP, REST, XML, JSON, SOAPUI, WS, Web Services, API, Query, SQL, SQLPLUS