SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Downloaden Sie, um offline zu lesen
Working with XSLT, XPATH and ECMAScript
in Novell Identity Manager Policies
                 ®



Made Simpler with Designer



David Wagstaff
Consulting Custom Development
Novell


Vivek Thakyal
IDM Software Engineer
Novell
Outline

    •   Overview w/Comparison Demonstrations

    •   ECMAScript w/Demonstration

    •   Common Traps to Avoid

    •   Questions/More Demonstrations




2   © Novell, Inc. All rights reserved.
Overview w/Comparison Demonstrations
Identity Manager Foundation

    event-driven object synchronization though marshalling
    to xml, xml transformations, and unmarshalling


    Whenever the Identity Vault (or a driver) detects an
    event like add User, it describes the event in an xml
    document that starts in the subscriber channel (or
    publisher channel). The xml document goes through a
    series of transformations before arriving at the end of the
    subscriber channel (or publisher channel) to add User
    on the other end.



4   © Novell, Inc. All rights reserved.
Transformations

    •   Policy (DirXMLScript)

    •   Stylesheet (XSLT)



    Identity Manager engine understands both. You can mix
    them within a policy set.



    How to choose?


5   © Novell, Inc. All rights reserved.
Extensions

    •   Java

    •   ECMAScript (Javascript via Rhino)

    •   JVM languages like Groovy



    How to choose?




6   © Novell, Inc. All rights reserved.
Common Tools

    •   Regular Expressions (regEx)

    •   XPath



    How to choose?




7   © Novell, Inc. All rights reserved.
Simple Demonstrations
    for Comparison
    The department name on a user in Identity Vault should
    start with an 'e', but on Active Directory should start with
    a 'j', e.g. enc127 vs jnc127
    •   policy without regEx
    •   policy with regEx
    •   policy extended with Java
    •   policy extended with ECMAScript
    •   stylesheet


    Hint: Where is more important than how.

8   © Novell, Inc. All rights reserved.
Quiz

    The department attribute is called Department Code in
    the Identity Vault and dept in the connected system.
    Which of the following would be good choice(s) to
    change the attribute name?
    •   XPath
    •   Regular Expressions
    •   Java
    •   ECMAScript
    •   Policy
    •   Stylesheet
9   © Novell, Inc. All rights reserved.
ECMAScript w/Demonstration
ECMAScript

     •   A standardized version of Javascript

     •   Java like syntax

     •   Dynamically typed

     •   Very good String library

     •   Good Math library

     •   Works great with regular expressions



11   © Novell, Inc. All rights reserved.
Strings in ECMAScript

     •   String Literal “text” or 'text'
          –   use either single or double quotes
     •   Important functions:
          –   substr (startIndex, numberOfChars)
          –   substring (startIndex, endIndex)
          –   charAt (indexOfChar)
          –   indexOf (charSequence)
          –   replace (regExp, replacement)
          –   match (regExp) : returns an array of matches
          –   search (regExp) : returns the index of the first match
          –   split (separator, limit) : returns an array of split up strings

12   © Novell, Inc. All rights reserved.
Regular Expressions in ECMAScript

     •   Regular expression literal in ECMAScript
         /[pattern]/[modifiers] e.g. /[a-z]+/gi
     •   Modifiers:
          –   g (Global)
          –   i (Case Insensitive)
          –   m (Multi-line)
     •   Important Functions:
          –   test (string) : returns true or false
          –   exec (string) : returns an array of matches
          –   compile (regExp, modifier) : compiles a regular expression
              object

13   © Novell, Inc. All rights reserved.
ECMAScript Demonstration

     •   Changing the Telephone Number format from
          –   (xxx) xxx-xxxx to a pure integer xxxxxxxxxx

          –   Pure integer xxxxxxxxxx to (xxx) xxx-xxxx

     •   Setting the correct area code (the first three digits)
         in a Telephone Number from a lookup table




14   © Novell, Inc. All rights reserved.
Common Traps to Avoid
Java Traps

     •   Namespace

     •   Constructor

     •   Instance Method

     •   Static Method



     •   Hint: Static method is easiest and less error prone.



16   © Novell, Inc. All rights reserved.
XPath Traps

     •   policy using absolute path

     •   // getting too much

     •   assuming order

     •   multiple attribute values

     •   string of XML




17   © Novell, Inc. All rights reserved.
XSLT Traps

     •   bad XPath, see XPath Traps

     •   doing it in text editor

     •   not using a variety of sample inputs

     •   forgetting <apply-templates ...>




18   © Novell, Inc. All rights reserved.
Regular Expression Traps

     •   globbing

     •   not escaping meta-characters

     •   groups within groups

     •   using non-Java dialects

     •   doing it in text editor




19   © Novell, Inc. All rights reserved.
ECMAScript Traps

     •   Plus operator overloading

     •   Semicolon insertion at line feed

     •   String replace only replaces first occurrence – use
         the /text/g global modifier

     •   ParseInt function – use parseInt(num, 10) instead of
         parseInt(num) to be safe




20   © Novell, Inc. All rights reserved.
Questions/More Demonstrations
Unpublished Work of Novell, Inc. All Rights Reserved.
This work is an unpublished work and contains confidential, proprietary, and trade secret information of Novell, Inc.
Access to this work is restricted to Novell employees who have a need to know to perform tasks within the scope
of their assignments. No part of this work may be practiced, performed, copied, distributed, revised, modified,
translated, abridged, condensed, expanded, collected, or adapted without the prior written consent of Novell, Inc.
Any use or exploitation of this work without authorization could subject the perpetrator to criminal and civil liability.


General Disclaimer
This document is not to be construed as a promise by any participating company to develop, deliver, or market a
product. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in
making purchasing decisions. Novell, Inc. makes no representations or warranties with respect to the contents
of this document, and specifically disclaims any express or implied warranties of merchantability or fitness for any
particular purpose. The development, release, and timing of features or functionality described for Novell products
remains at the sole discretion of Novell. Further, Novell, Inc. reserves the right to revise this document and to
make changes to its content, at any time, without obligation to notify any person or entity of such revisions or
changes. All Novell marks referenced in this presentation are trademarks or registered trademarks of Novell, Inc.
in the United States and other countries. All third-party trademarks are the property of their respective owners.

Weitere ähnliche Inhalte

Was ist angesagt?

Migrating P2V: SUSE Linux Enterprise Server with Xen
Migrating P2V: SUSE Linux Enterprise Server with XenMigrating P2V: SUSE Linux Enterprise Server with Xen
Migrating P2V: SUSE Linux Enterprise Server with XenNovell
 
My sql 5.6_replwebinar_may12
My sql 5.6_replwebinar_may12My sql 5.6_replwebinar_may12
My sql 5.6_replwebinar_may12Mat Keep
 
Conference tutorial: MySQL Cluster as NoSQL
Conference tutorial: MySQL Cluster as NoSQLConference tutorial: MySQL Cluster as NoSQL
Conference tutorial: MySQL Cluster as NoSQLSeveralnines
 
Virtualizing Mission-critical Workloads: The PlateSpin Story
Virtualizing Mission-critical Workloads: The PlateSpin StoryVirtualizing Mission-critical Workloads: The PlateSpin Story
Virtualizing Mission-critical Workloads: The PlateSpin StoryNovell
 
Whd master deck_final
Whd master deck_final Whd master deck_final
Whd master deck_final Juergen Domnik
 
Siebel Server Cloning available in 8.1.1.9 / 8.2.2.2
Siebel Server Cloning available in 8.1.1.9 / 8.2.2.2Siebel Server Cloning available in 8.1.1.9 / 8.2.2.2
Siebel Server Cloning available in 8.1.1.9 / 8.2.2.2Jeroen Burgers
 
Securing Your Endpoints Using Novell ZENworks Endpoint Security Management
Securing Your Endpoints Using Novell ZENworks Endpoint Security ManagementSecuring Your Endpoints Using Novell ZENworks Endpoint Security Management
Securing Your Endpoints Using Novell ZENworks Endpoint Security ManagementNovell
 
Status Quo on the automation support in SOA Suite OGhTech17
Status Quo on the automation support in SOA Suite OGhTech17Status Quo on the automation support in SOA Suite OGhTech17
Status Quo on the automation support in SOA Suite OGhTech17Jon Petter Hjulstad
 
50 migrations in 24 hours
50 migrations in 24 hours50 migrations in 24 hours
50 migrations in 24 hoursJason Dea
 
Dell PowerEdge Zero Touch Provisioning
Dell PowerEdge Zero Touch ProvisioningDell PowerEdge Zero Touch Provisioning
Dell PowerEdge Zero Touch ProvisioningDell World
 
Integrating Apple Macs Using Novell Technologies
Integrating Apple Macs Using Novell TechnologiesIntegrating Apple Macs Using Novell Technologies
Integrating Apple Macs Using Novell TechnologiesNovell
 
The Very Very Latest in Database Development - Oracle Open World 2012
The Very Very Latest in Database Development - Oracle Open World 2012The Very Very Latest in Database Development - Oracle Open World 2012
The Very Very Latest in Database Development - Oracle Open World 2012Lucas Jellema
 
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)jeckels
 
Hazelcast For Beginners (Paris JUG-1)
Hazelcast For Beginners (Paris JUG-1)Hazelcast For Beginners (Paris JUG-1)
Hazelcast For Beginners (Paris JUG-1)Emrah Kocaman
 
Hazelcast for Terracotta Users
Hazelcast for Terracotta UsersHazelcast for Terracotta Users
Hazelcast for Terracotta UsersHazelcast
 
How LinkedIn uses memcached, a spoonful of SOA, and a sprinkle of SQL to scale
How LinkedIn uses memcached, a spoonful of SOA, and a sprinkle of SQL to scaleHow LinkedIn uses memcached, a spoonful of SOA, and a sprinkle of SQL to scale
How LinkedIn uses memcached, a spoonful of SOA, and a sprinkle of SQL to scaleLinkedIn
 
Simplifying systems management with Dell OpenManage on 13G Dell PowerEdge ser...
Simplifying systems management with Dell OpenManage on 13G Dell PowerEdge ser...Simplifying systems management with Dell OpenManage on 13G Dell PowerEdge ser...
Simplifying systems management with Dell OpenManage on 13G Dell PowerEdge ser...Principled Technologies
 

Was ist angesagt? (20)

Migrating P2V: SUSE Linux Enterprise Server with Xen
Migrating P2V: SUSE Linux Enterprise Server with XenMigrating P2V: SUSE Linux Enterprise Server with Xen
Migrating P2V: SUSE Linux Enterprise Server with Xen
 
My sql 5.6_replwebinar_may12
My sql 5.6_replwebinar_may12My sql 5.6_replwebinar_may12
My sql 5.6_replwebinar_may12
 
Conference tutorial: MySQL Cluster as NoSQL
Conference tutorial: MySQL Cluster as NoSQLConference tutorial: MySQL Cluster as NoSQL
Conference tutorial: MySQL Cluster as NoSQL
 
Virtualizing Mission-critical Workloads: The PlateSpin Story
Virtualizing Mission-critical Workloads: The PlateSpin StoryVirtualizing Mission-critical Workloads: The PlateSpin Story
Virtualizing Mission-critical Workloads: The PlateSpin Story
 
Whd master deck_final
Whd master deck_final Whd master deck_final
Whd master deck_final
 
Siebel Server Cloning available in 8.1.1.9 / 8.2.2.2
Siebel Server Cloning available in 8.1.1.9 / 8.2.2.2Siebel Server Cloning available in 8.1.1.9 / 8.2.2.2
Siebel Server Cloning available in 8.1.1.9 / 8.2.2.2
 
Securing Your Endpoints Using Novell ZENworks Endpoint Security Management
Securing Your Endpoints Using Novell ZENworks Endpoint Security ManagementSecuring Your Endpoints Using Novell ZENworks Endpoint Security Management
Securing Your Endpoints Using Novell ZENworks Endpoint Security Management
 
Status Quo on the automation support in SOA Suite OGhTech17
Status Quo on the automation support in SOA Suite OGhTech17Status Quo on the automation support in SOA Suite OGhTech17
Status Quo on the automation support in SOA Suite OGhTech17
 
50 migrations in 24 hours
50 migrations in 24 hours50 migrations in 24 hours
50 migrations in 24 hours
 
Virtualization and Containers
Virtualization and ContainersVirtualization and Containers
Virtualization and Containers
 
dbaas-clone
dbaas-clonedbaas-clone
dbaas-clone
 
Dell PowerEdge Zero Touch Provisioning
Dell PowerEdge Zero Touch ProvisioningDell PowerEdge Zero Touch Provisioning
Dell PowerEdge Zero Touch Provisioning
 
Integrating Apple Macs Using Novell Technologies
Integrating Apple Macs Using Novell TechnologiesIntegrating Apple Macs Using Novell Technologies
Integrating Apple Macs Using Novell Technologies
 
The Very Very Latest in Database Development - Oracle Open World 2012
The Very Very Latest in Database Development - Oracle Open World 2012The Very Very Latest in Database Development - Oracle Open World 2012
The Very Very Latest in Database Development - Oracle Open World 2012
 
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
 
Hazelcast For Beginners (Paris JUG-1)
Hazelcast For Beginners (Paris JUG-1)Hazelcast For Beginners (Paris JUG-1)
Hazelcast For Beginners (Paris JUG-1)
 
Copy Data Management for the DBA
Copy Data Management for the DBACopy Data Management for the DBA
Copy Data Management for the DBA
 
Hazelcast for Terracotta Users
Hazelcast for Terracotta UsersHazelcast for Terracotta Users
Hazelcast for Terracotta Users
 
How LinkedIn uses memcached, a spoonful of SOA, and a sprinkle of SQL to scale
How LinkedIn uses memcached, a spoonful of SOA, and a sprinkle of SQL to scaleHow LinkedIn uses memcached, a spoonful of SOA, and a sprinkle of SQL to scale
How LinkedIn uses memcached, a spoonful of SOA, and a sprinkle of SQL to scale
 
Simplifying systems management with Dell OpenManage on 13G Dell PowerEdge ser...
Simplifying systems management with Dell OpenManage on 13G Dell PowerEdge ser...Simplifying systems management with Dell OpenManage on 13G Dell PowerEdge ser...
Simplifying systems management with Dell OpenManage on 13G Dell PowerEdge ser...
 

Ähnlich wie Working with XSLT, XPath and ECMA Scripts: Make It Simpler with Novell Identity Manager Designer

Distributed Model Validation with Epsilon
Distributed Model Validation with EpsilonDistributed Model Validation with Epsilon
Distributed Model Validation with EpsilonSina Madani
 
Graal Tutorial at CGO 2015 by Christian Wimmer
Graal Tutorial at CGO 2015 by Christian WimmerGraal Tutorial at CGO 2015 by Christian Wimmer
Graal Tutorial at CGO 2015 by Christian WimmerThomas Wuerthinger
 
Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011Agora Group
 
Nimbuzz march2012
Nimbuzz march2012Nimbuzz march2012
Nimbuzz march2012nlwebperf
 
Improved Developer Productivity In JDK8
Improved Developer Productivity In JDK8Improved Developer Productivity In JDK8
Improved Developer Productivity In JDK8Simon Ritter
 
Nashorn in the future (English)
Nashorn in the future (English)Nashorn in the future (English)
Nashorn in the future (English)Logico
 
Lambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon Ritter
Lambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon RitterLambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon Ritter
Lambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon RitterJAXLondon2014
 
Lambdas And Streams in JDK8
Lambdas And Streams in JDK8Lambdas And Streams in JDK8
Lambdas And Streams in JDK8Simon Ritter
 
What's New in IBM Java 8 SE?
What's New in IBM Java 8 SE?What's New in IBM Java 8 SE?
What's New in IBM Java 8 SE?Tim Ellison
 
Going to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific LanguagesGoing to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific LanguagesGuillaume Laforge
 
Angular JS in 2017
Angular JS in 2017Angular JS in 2017
Angular JS in 2017Ayush Sharma
 
Apache Big Data Europe 2016
Apache Big Data Europe 2016Apache Big Data Europe 2016
Apache Big Data Europe 2016Tim Ellison
 
CLEAN CODING AND DEVOPS Final.pptx
CLEAN CODING AND DEVOPS Final.pptxCLEAN CODING AND DEVOPS Final.pptx
CLEAN CODING AND DEVOPS Final.pptxJEEVANANTHAMG6
 
Object- Relational Persistence in Smalltalk
Object- Relational Persistence in SmalltalkObject- Relational Persistence in Smalltalk
Object- Relational Persistence in SmalltalkESUG
 
Web technologies-course 07.pptx
Web technologies-course 07.pptxWeb technologies-course 07.pptx
Web technologies-course 07.pptxStefan Oprea
 
Modern java script features
Modern java script featuresModern java script features
Modern java script featuresKunal Kursija
 

Ähnlich wie Working with XSLT, XPath and ECMA Scripts: Make It Simpler with Novell Identity Manager Designer (20)

Distributed Model Validation with Epsilon
Distributed Model Validation with EpsilonDistributed Model Validation with Epsilon
Distributed Model Validation with Epsilon
 
Scala-Ls1
Scala-Ls1Scala-Ls1
Scala-Ls1
 
Graal Tutorial at CGO 2015 by Christian Wimmer
Graal Tutorial at CGO 2015 by Christian WimmerGraal Tutorial at CGO 2015 by Christian Wimmer
Graal Tutorial at CGO 2015 by Christian Wimmer
 
Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011
 
Nimbuzz march2012
Nimbuzz march2012Nimbuzz march2012
Nimbuzz march2012
 
Improved Developer Productivity In JDK8
Improved Developer Productivity In JDK8Improved Developer Productivity In JDK8
Improved Developer Productivity In JDK8
 
Nashorn in the future (English)
Nashorn in the future (English)Nashorn in the future (English)
Nashorn in the future (English)
 
Core java
Core javaCore java
Core java
 
Lambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon Ritter
Lambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon RitterLambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon Ritter
Lambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon Ritter
 
Lambdas And Streams in JDK8
Lambdas And Streams in JDK8Lambdas And Streams in JDK8
Lambdas And Streams in JDK8
 
What's New in IBM Java 8 SE?
What's New in IBM Java 8 SE?What's New in IBM Java 8 SE?
What's New in IBM Java 8 SE?
 
Going to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific LanguagesGoing to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific Languages
 
Angular JS in 2017
Angular JS in 2017Angular JS in 2017
Angular JS in 2017
 
Apache Big Data Europe 2016
Apache Big Data Europe 2016Apache Big Data Europe 2016
Apache Big Data Europe 2016
 
CLEAN CODING AND DEVOPS Final.pptx
CLEAN CODING AND DEVOPS Final.pptxCLEAN CODING AND DEVOPS Final.pptx
CLEAN CODING AND DEVOPS Final.pptx
 
Object- Relational Persistence in Smalltalk
Object- Relational Persistence in SmalltalkObject- Relational Persistence in Smalltalk
Object- Relational Persistence in Smalltalk
 
Web technologies-course 07.pptx
Web technologies-course 07.pptxWeb technologies-course 07.pptx
Web technologies-course 07.pptx
 
Modern java script features
Modern java script featuresModern java script features
Modern java script features
 
Devoxx
DevoxxDevoxx
Devoxx
 
Sql optimize
Sql optimizeSql optimize
Sql optimize
 

Mehr von Novell

Filr white paper
Filr white paperFilr white paper
Filr white paperNovell
 
Social media class 4 v2
Social media class 4 v2Social media class 4 v2
Social media class 4 v2Novell
 
Social media class 3
Social media class 3Social media class 3
Social media class 3Novell
 
Social media class 2
Social media class 2Social media class 2
Social media class 2Novell
 
Social media class 1
Social media class 1Social media class 1
Social media class 1Novell
 
Social media class 2 v2
Social media class 2 v2Social media class 2 v2
Social media class 2 v2Novell
 
LinkedIn training presentation
LinkedIn training presentationLinkedIn training presentation
LinkedIn training presentationNovell
 
Twitter training presentation
Twitter training presentationTwitter training presentation
Twitter training presentationNovell
 
Getting started with social media
Getting started with social mediaGetting started with social media
Getting started with social mediaNovell
 
Strategies for sharing and commenting in social media
Strategies for sharing and commenting in social mediaStrategies for sharing and commenting in social media
Strategies for sharing and commenting in social mediaNovell
 
Information Security & Compliance in Healthcare: Beyond HIPAA and HITECH
Information Security & Compliance in Healthcare: Beyond HIPAA and HITECHInformation Security & Compliance in Healthcare: Beyond HIPAA and HITECH
Information Security & Compliance in Healthcare: Beyond HIPAA and HITECHNovell
 
Workload iq final
Workload iq   finalWorkload iq   final
Workload iq finalNovell
 
The Identity-infused Enterprise
The Identity-infused EnterpriseThe Identity-infused Enterprise
The Identity-infused EnterpriseNovell
 
Shining the Enterprise Light on Shades of Social
Shining the Enterprise Light on Shades of SocialShining the Enterprise Light on Shades of Social
Shining the Enterprise Light on Shades of SocialNovell
 
Accelerate to the Cloud
Accelerate to the CloudAccelerate to the Cloud
Accelerate to the CloudNovell
 
The New Business Value of Today’s Collaboration Trends
The New Business Value of Today’s Collaboration TrendsThe New Business Value of Today’s Collaboration Trends
The New Business Value of Today’s Collaboration TrendsNovell
 
Preventing The Next Data Breach Through Log Management
Preventing The Next Data Breach Through Log ManagementPreventing The Next Data Breach Through Log Management
Preventing The Next Data Breach Through Log ManagementNovell
 
Iaas for a demanding business
Iaas for a demanding businessIaas for a demanding business
Iaas for a demanding businessNovell
 
Workload IQ: A Differentiated Approach
Workload IQ: A Differentiated ApproachWorkload IQ: A Differentiated Approach
Workload IQ: A Differentiated ApproachNovell
 
Virtual Appliances: Simplifying Application Deployment and Accelerating Your ...
Virtual Appliances: Simplifying Application Deployment and Accelerating Your ...Virtual Appliances: Simplifying Application Deployment and Accelerating Your ...
Virtual Appliances: Simplifying Application Deployment and Accelerating Your ...Novell
 

Mehr von Novell (20)

Filr white paper
Filr white paperFilr white paper
Filr white paper
 
Social media class 4 v2
Social media class 4 v2Social media class 4 v2
Social media class 4 v2
 
Social media class 3
Social media class 3Social media class 3
Social media class 3
 
Social media class 2
Social media class 2Social media class 2
Social media class 2
 
Social media class 1
Social media class 1Social media class 1
Social media class 1
 
Social media class 2 v2
Social media class 2 v2Social media class 2 v2
Social media class 2 v2
 
LinkedIn training presentation
LinkedIn training presentationLinkedIn training presentation
LinkedIn training presentation
 
Twitter training presentation
Twitter training presentationTwitter training presentation
Twitter training presentation
 
Getting started with social media
Getting started with social mediaGetting started with social media
Getting started with social media
 
Strategies for sharing and commenting in social media
Strategies for sharing and commenting in social mediaStrategies for sharing and commenting in social media
Strategies for sharing and commenting in social media
 
Information Security & Compliance in Healthcare: Beyond HIPAA and HITECH
Information Security & Compliance in Healthcare: Beyond HIPAA and HITECHInformation Security & Compliance in Healthcare: Beyond HIPAA and HITECH
Information Security & Compliance in Healthcare: Beyond HIPAA and HITECH
 
Workload iq final
Workload iq   finalWorkload iq   final
Workload iq final
 
The Identity-infused Enterprise
The Identity-infused EnterpriseThe Identity-infused Enterprise
The Identity-infused Enterprise
 
Shining the Enterprise Light on Shades of Social
Shining the Enterprise Light on Shades of SocialShining the Enterprise Light on Shades of Social
Shining the Enterprise Light on Shades of Social
 
Accelerate to the Cloud
Accelerate to the CloudAccelerate to the Cloud
Accelerate to the Cloud
 
The New Business Value of Today’s Collaboration Trends
The New Business Value of Today’s Collaboration TrendsThe New Business Value of Today’s Collaboration Trends
The New Business Value of Today’s Collaboration Trends
 
Preventing The Next Data Breach Through Log Management
Preventing The Next Data Breach Through Log ManagementPreventing The Next Data Breach Through Log Management
Preventing The Next Data Breach Through Log Management
 
Iaas for a demanding business
Iaas for a demanding businessIaas for a demanding business
Iaas for a demanding business
 
Workload IQ: A Differentiated Approach
Workload IQ: A Differentiated ApproachWorkload IQ: A Differentiated Approach
Workload IQ: A Differentiated Approach
 
Virtual Appliances: Simplifying Application Deployment and Accelerating Your ...
Virtual Appliances: Simplifying Application Deployment and Accelerating Your ...Virtual Appliances: Simplifying Application Deployment and Accelerating Your ...
Virtual Appliances: Simplifying Application Deployment and Accelerating Your ...
 

Working with XSLT, XPath and ECMA Scripts: Make It Simpler with Novell Identity Manager Designer

  • 1. Working with XSLT, XPATH and ECMAScript in Novell Identity Manager Policies ® Made Simpler with Designer David Wagstaff Consulting Custom Development Novell Vivek Thakyal IDM Software Engineer Novell
  • 2. Outline • Overview w/Comparison Demonstrations • ECMAScript w/Demonstration • Common Traps to Avoid • Questions/More Demonstrations 2 © Novell, Inc. All rights reserved.
  • 4. Identity Manager Foundation event-driven object synchronization though marshalling to xml, xml transformations, and unmarshalling Whenever the Identity Vault (or a driver) detects an event like add User, it describes the event in an xml document that starts in the subscriber channel (or publisher channel). The xml document goes through a series of transformations before arriving at the end of the subscriber channel (or publisher channel) to add User on the other end. 4 © Novell, Inc. All rights reserved.
  • 5. Transformations • Policy (DirXMLScript) • Stylesheet (XSLT) Identity Manager engine understands both. You can mix them within a policy set. How to choose? 5 © Novell, Inc. All rights reserved.
  • 6. Extensions • Java • ECMAScript (Javascript via Rhino) • JVM languages like Groovy How to choose? 6 © Novell, Inc. All rights reserved.
  • 7. Common Tools • Regular Expressions (regEx) • XPath How to choose? 7 © Novell, Inc. All rights reserved.
  • 8. Simple Demonstrations for Comparison The department name on a user in Identity Vault should start with an 'e', but on Active Directory should start with a 'j', e.g. enc127 vs jnc127 • policy without regEx • policy with regEx • policy extended with Java • policy extended with ECMAScript • stylesheet Hint: Where is more important than how. 8 © Novell, Inc. All rights reserved.
  • 9. Quiz The department attribute is called Department Code in the Identity Vault and dept in the connected system. Which of the following would be good choice(s) to change the attribute name? • XPath • Regular Expressions • Java • ECMAScript • Policy • Stylesheet 9 © Novell, Inc. All rights reserved.
  • 11. ECMAScript • A standardized version of Javascript • Java like syntax • Dynamically typed • Very good String library • Good Math library • Works great with regular expressions 11 © Novell, Inc. All rights reserved.
  • 12. Strings in ECMAScript • String Literal “text” or 'text' – use either single or double quotes • Important functions: – substr (startIndex, numberOfChars) – substring (startIndex, endIndex) – charAt (indexOfChar) – indexOf (charSequence) – replace (regExp, replacement) – match (regExp) : returns an array of matches – search (regExp) : returns the index of the first match – split (separator, limit) : returns an array of split up strings 12 © Novell, Inc. All rights reserved.
  • 13. Regular Expressions in ECMAScript • Regular expression literal in ECMAScript /[pattern]/[modifiers] e.g. /[a-z]+/gi • Modifiers: – g (Global) – i (Case Insensitive) – m (Multi-line) • Important Functions: – test (string) : returns true or false – exec (string) : returns an array of matches – compile (regExp, modifier) : compiles a regular expression object 13 © Novell, Inc. All rights reserved.
  • 14. ECMAScript Demonstration • Changing the Telephone Number format from – (xxx) xxx-xxxx to a pure integer xxxxxxxxxx – Pure integer xxxxxxxxxx to (xxx) xxx-xxxx • Setting the correct area code (the first three digits) in a Telephone Number from a lookup table 14 © Novell, Inc. All rights reserved.
  • 16. Java Traps • Namespace • Constructor • Instance Method • Static Method • Hint: Static method is easiest and less error prone. 16 © Novell, Inc. All rights reserved.
  • 17. XPath Traps • policy using absolute path • // getting too much • assuming order • multiple attribute values • string of XML 17 © Novell, Inc. All rights reserved.
  • 18. XSLT Traps • bad XPath, see XPath Traps • doing it in text editor • not using a variety of sample inputs • forgetting <apply-templates ...> 18 © Novell, Inc. All rights reserved.
  • 19. Regular Expression Traps • globbing • not escaping meta-characters • groups within groups • using non-Java dialects • doing it in text editor 19 © Novell, Inc. All rights reserved.
  • 20. ECMAScript Traps • Plus operator overloading • Semicolon insertion at line feed • String replace only replaces first occurrence – use the /text/g global modifier • ParseInt function – use parseInt(num, 10) instead of parseInt(num) to be safe 20 © Novell, Inc. All rights reserved.
  • 22.
  • 23. Unpublished Work of Novell, Inc. All Rights Reserved. This work is an unpublished work and contains confidential, proprietary, and trade secret information of Novell, Inc. Access to this work is restricted to Novell employees who have a need to know to perform tasks within the scope of their assignments. No part of this work may be practiced, performed, copied, distributed, revised, modified, translated, abridged, condensed, expanded, collected, or adapted without the prior written consent of Novell, Inc. Any use or exploitation of this work without authorization could subject the perpetrator to criminal and civil liability. General Disclaimer This document is not to be construed as a promise by any participating company to develop, deliver, or market a product. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. Novell, Inc. makes no representations or warranties with respect to the contents of this document, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. The development, release, and timing of features or functionality described for Novell products remains at the sole discretion of Novell. Further, Novell, Inc. reserves the right to revise this document and to make changes to its content, at any time, without obligation to notify any person or entity of such revisions or changes. All Novell marks referenced in this presentation are trademarks or registered trademarks of Novell, Inc. in the United States and other countries. All third-party trademarks are the property of their respective owners.