IBM WebSphere DataPower Community Forum IBM Webspere DataPower XI50
July 05, 2008, 02:32:17 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: IBM WebSphere DataPower SOA Appliance Forum - Just Launched come share your knowledge!!! These forums will be a great place to build a community. This site is not associated with IBM.
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: move from xml file to LDAP for authorization  (Read 699 times)
onno
Newbie
*
Offline Offline

Posts: 3

onno.fles@hotmail.com onno.fles@yahoo.com
View Profile Email
« on: November 22, 2007, 04:09:27 PM »

We have ws-proxy which exposes few operation of a service. For this,
we have authorization xml file currently which includes the operations
allowed.

Now , we want to move from xml file to LDAP for authorization. We are
fine authorizing but with the LDAP, we could not find a way to
restrict some of the operations. i.e. all operations are exposed.

the question is: How can we restrict some of the operations when
implementing the LDAP Authorization?

Thank you.
Logged

Onno Fles
Integration Consultant @ InterAccess
craven
Newbie
*
Offline Offline

Posts: 8


View Profile
« Reply #1 on: December 03, 2007, 12:11:34 PM »

We are restricting operations based on access using LDAP Authorization.

Here is a portion of the XSL that is using the result set from the LDAP query.

<xsl:variable name="authorizeServices">
         <xsl:copy-of select="$result/LDAP-search-results/result/attribute-value/text()"/>
      </xsl:variable>
      <!--     Authorize service    -->
      <xsl:variable name="serviceMatch">
         <xsl:for-each select="$result/LDAP-search-results/result/attribute-value">
            <xsl:variable name="authorizeServices">
               <xsl:value-of select="text()"/>
            </xsl:variable>
            <xsl:choose>
               <xsl:when test="$authorizeServices=$msgAuthorize">
                  <xsl:value-of select="true()"/>
               </xsl:when>
               <xsl:otherwise>
                  <!-- do what you like here -->
               </xsl:otherwise>
            </xsl:choose>
         </xsl:for-each>
      </xsl:variable>
      <xsl:choose>

As you can see we use the LDAP 'attribute-value' result, and match that to the operation name.  We use a 'for-each' as a user may have access to multiple operations.

If there is a match the user is authorized to utilize that service and operation, otherwise they will be denied access. 

Not sure your comfort level with DataPower, but some other users might not know how to implement the custom XSL.  To do so in the AAA policy go to the Authorize tab, for 'Method' select 'custom' from the drop down list.  Then in the 'Custom URL' box you would put the value of your XSL. e.g. 'local:///myAAA.xsl'.

I have omitted some details, but I think this should get you going in the right direction.  If you need more help let me know. 

I hope this helps.

Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  



Powered by SMF | SMF © 2006-2007, Simple Machines LLC
Seo4Smf © Webmaster's Talks
This Site is not associated with IBM