Skip to main content

Oracle SOA LDAP Adapter End to End Configuration

What is LDAP Adapter:

The Oracle LDAP adapter provides bi-directional connectivity with LDAP V3- compliant directory servers. The chapter provides information on how to model the LDAP adapter as a reference to perform CRUD (Create, Read, Update and Delete) operations and how to model the LDAP adapter as an inbound publication service on a directory server. Information describing various users, applications, files, printers, and other resources accessible from a network is often collected into a special database called an LDAP directory. Access to LDAP directories is a basic requirement of enterprise workflows. The LDAP Adapter Configuration Wizard provides a graphical and intuitive interface to model LDAP services to send requests to and receive responses from LDAP servers.

LDAP (Lightweight Directory Access Protocol), is an Internet protocol for accessing information directories. A directory service is a distributed database application designed to manage the entries and attributes in a directory. LDAP runs over TCP/IP. LDAP enables clients to access different directory services based on entries. It makes the entries, along with their attributes and values, available to users and other applications, on a controlled-access basis.
The Oracle Adapter for LDAP provides rich support for LDAPv3 defined operations in addition to support for extensions. It also supports DSMLv2 and can be used as a DSML gateway service. The adapter can be configured to listen and publish change events from a source directory server. In addition, the adapter guarantees once and only once message delivery, high-availability, policy-based retry and fault-handling, automatic fail-over and several other features.

Oracle SOA Project Setup for LDAP Adapter:

  • Create one SOA project.
  • Create LDAP connection factory in LdapAdapter deployment eg.eis/ldap/LDAPUAT
  • Save it and update Ldap Adapter.
  • Go Back to SOA Project.
  • Drag & Drop LDAP adapter in SOA Project.
  • Create LDAP server connection in JDEV with same details by which we created LDAP Connection factory.
  • In above image, you have to select all attributes which you need inside your SOA Service response.
  • There are two ways to select attributes:
    • Search attributes one by one in object from SOA LDAP browser (Last screen shot)
    • You can login into OID/OUD server and can search attributes where you will get attribute class and with help of object class you can select same into SOA LDAP adapter (lot of time saving), Screen shot is below.

  • Click Next & Finish
  • Save All.
Special Req: In our case we needed CreatedTimeStamp & ModifyTimeStamp in our response, You can find same attributes over OID/OUD but can't find these attributes in LDAP Adapter.

To involve both attributes you have to modify your ****LDAP***.JCA and ****LDAP****.XSD file and need to add manually.
  • Go Back to BPEL and drag invoke component, create LDAP variable.
  • Invoke it and see result.

  • SOA LDAP Adapter Advance Search:
    • In few cases you will be having req to search for a particular value based on some value or you will be needed some data after a particular date.
    • I am going to see how we can select all users which are created/updated after a date.
    • I created a X-query which assign BASE DN value where search will be executed.
    • In same X-query custom search parameters are defined.
    • Same X-query, Accept a date with Format "2018-09-19T00:37:04.475-04:00".
Xquery Code:


 <get:searchRequest>
        <baseDN>{'cn=Users,dc=OID,dc=com'}</baseDN>
        <searchFilter>{fn:concat('(&amp;(objectclass=person)(|(modifytimestamp&gt;=',fn:replace(fn:substring-before($inputVariable.part1,'T'),'-',''),fn:replace(fn:substring-before(fn:substring-after($inputVariable.part1,'T'),'.'),':',''),'Z)(createTimestamp&gt;=',fn:replace(fn:substring-before($inputVariable.part1,'T'),'-',''),fn:replace(fn:substring-before(fn:substring-after($inputVariable.part1,'T'),'.'),':',''),'Z',')))')}</searchFilter>
      </get:searchRequest>

Xquery Response:

<get:searchRequest xmlns:get="http://platform.integration.oracle/blocks/adapter/fw/metadata/GetLdapUser">
<baseDN>cn=Users,dc=OID,dc=com</baseDN>
<searchFilter>(&amp;(objectclass=person)(|(modifytimestamp&gt;=20180919003704Z)(createTimestamp&gt;=20180919003704Z)))</searchFilter>
</get:searchRequest>
  • 20180919003704Z, It's converted date format which is needed for LDAP Adapter.
  • Object Class person is where search will be executed.
  • As we need modify & create date in search so both are added with | (OR).


Sample response:

Comments

Post a Comment

Popular posts from this blog

Solution for BPM standard dashboard & activity guide not working in Oracle SOA 12.2.1.0 C

As earlier i publish a post about different issue of Oracle BPM, After some oracle support i got to fixed them. Issue Blog Here... Issue 3:BPM 12.2.1 process workspace activity guide not working. if you have a normal BPM Process, then this is the issue. In order to have data populated in "Activity Guide" firstly you should create a BPMN Guided Business Process. Below you can find the documentation about activity guide and how to create a Guided Business Process: https://docs.oracle.com/middleware/1221/bpm/bpm-develop/GUID-F765955D-90A5-48D4-8D2A-2F01FBB539E3.htm#BPMPD901 And here is specified: " A Guided Business Process is modeled as an activity guide that is based on a business process. The Activity Guide includes a set of Milestones. A milestone is a contained set of tasks that the end user has to complete. A milestone is complete when the user successfully runs a specific set of tasks in the milestone. " And in the below chapters you will find the ...

Oracle SOA 12C rest adapter with Custom HTTP headers

Most existing web applications are connected through web services, which are commonly known as SOAP services. More and more users are relying on mobile devices for communication, and they’re looking for lighter ways to access enterprise information on the go. REST services are the answer for the mobile device platform, because they get rapid responses and fast access to data. Oracle SOA Suite 12 c  provides a complete set of service infrastructure components for designing, deploying, and managing composite applications. Oracle SOA Suite 12 c  enables services to be created, managed, and orchestrated into composite applications and business processes. Some time we have need to send HTTP headers in REST service, In OSB we use header component and add what ever is needed but in oracle SOA 12C it's little bit different. Let see how we can do it. Create one SOA Application. Create one SOA Sample project inside SOA Application. Go to composite and drag drop REST ...

Swagger API document from Any WADL & Schema in Oracle SOA

Hi everyone, Hope everyone is doing well these days, Recently i started a project work over how to generate swagger API document for your any REST API, In case if you don't know what is swagger please go and check " https://swagger.io/tools/swagger-editor/ ". It's a great and easy to use tool which will help to create user friendly, human readable form API documentation with extension for generating API client in different languages with capability of testing your API from same. What is swagger editor, Design, describe, and document your API on the first open source editor fully dedicated to OpenAPI-based APIs. The Swagger Editor is great for quickly getting started with the OpenAPI (formerly known as the Swagger Specification) specification, with support for Swagger 2.0 and OpenAPI 3.0.  What benefits you will get by using swagger, Runs Anywhere, The Editor works in any development environment, be it locally or in the web. Smart Feedback, Validate you...