User profiles are one of the most important parts of IBM Connections and your social business.
IBM Connections features a set of scripts that will enable you to create basic profiles based on your corporate LDAP Directory. As IBM is leveraging the power of the Tivoli Directory Integrator for this task, you can customize it and grab data from almost any system. HR data from SAP, photos from a Relational database, skillsets from a Domino database and much more.
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Making your user happy – how to create a perfect profile
1. Making your user happy –
how to create a perfect profile
Andreas Artner
Fritz & Macziol
2. That's me….
Andreas Artner
• IBM Software Consultant
• Working with Fritz & Macziol www.fum.de
• Focusing on Integration, Interfaces, SSO and
other fun stuff
• Tivoli Directory Integrator (TDI) enthusiast
aartner@fum.de
@AnderlArtner
http://tdiblog.anderls.com
4. What we will cover today…
• Some TDI basics
• Building custom TDI AssemblyLines for IBM
Connections
• Best practices and Tips
• Real world examples
5. What is TDI ?
• (Tivoli) IBM Security Directory Integrator
• Don’t get fooled by the name
• Incredible powerful and flexible
• The most valuable add-on that IBM gives to
you
• To make your Users happy you just need to
identify the data sources and push the info to
their profiles !
6. TDI Terms
• Solution Directory
• TDI‘s working Directory
• Workspace
• Here you store your projects
• Project
• One or more AssemblyLines and related resources
• A single XML-File
• AssemblyLine
• The Interface logic
• Connector
• Connection to a Data source or target
7. Customizing TDI for IBM Connections
• Many choices:
• Configure Standard TDI Solution
• Simple Attribute mapping
• Custom Functions
• Extension Attributes
• Custom AssemblyLines
• that work in combination with the standard
AssemblyLines
• that are independent
• What is the right approach ?
8. Customizing TDI for IBM Connections
• Keep it simple and easy to maintain
• Can it be done with standard functionality ? Do it.
• Don’t mess up with the standard AssemblyLines –
rather create your own project.
• Know what you are doing, make your changes
error proven
9. Example - profiles_function.js
• TDI Sync fails with every run
• "exception": java.lang.NullPointerException“
Small difference – great impact
10. TDI Development environment
• Install TDI
• Use exactly the same Version as in your Connections
installation – but don’t do it on the same box !
• You can run multiple TDI Versions on the same
machine
• Setup your Directory Structure
• <TDI Development>
• <Version>
• Release
• TDISOL
• Workspace
11. TDI Development environment
• Grab the TDISOL directory from your
Connections installation – the easy way.
• Or extract it from the install sources and
adjust the properties / xml files.
• Create a .bat /.sh to launch your TDI
Development instance
13. TDI Development environment
• CTGDKD004E Could not create RMI custom socket
factories. Exception occurred: {0} : Keystore was
tampered with, or password was incorrect.
19. How to connect to IBM Connections
• Available TDI Connectors:
• ProfileConnector
• PhotoConnector
• PronunciationConnector
• CodesConnector
• API
• Profiles Administration API
• openntf: TDI Connectors for IBM Connections
20. Profile Connector & custom Attributes
• Custom extension Attributes are defined in
the data model
• tdi-profiles-config.xml & profiles-types.xml
• If you miss that part, your AssemblyLine will run
without any error but no Data will be updated.
• They have a defined format.
• Array of three string fields:
• ["name:" , "dataType:", "value:“]
21. Profile Connector & custom Attributes
• Use scripts to retrieve and manipulate these
values
• Accessing an existing Attribute value:
• Creating a new Attribute:
22. Profile Connector & custom Attributes
• TDI Debugger is a great tool to check and
manipulate your data – even during runtime
• Richtext Attributes are not “Update aware”,
you need to discover and trigger updates
based on some logic in your AssemblyLine.
23. Photo Connector
• This Connector is not “update aware“
• If you want to run your AssemblyLine on a
scheduled basis detect the necessary updates
in your logic.
• How to do that ?
• I’ll show you in a moment
• http://tdiblog.anderls.com/2015/01/handling-
photos-for-ibm-connections.html
24. Photo Connector
• As Link Criteria you can specify the profile uid
or key
• To update a user photo you need to feed in
the attributes:
• uid – Profile uid
• image – byte array containing the photo
25. Photo Connector
• How to get the byte array ?
• The good news - since TDI is Java based you can
do anything you want
• Based on your data source this can be easy or may
need some tweaking..
• LDAP or Web Service – easy just grab the attribute
• Domino Database – extract the file to a local disk
• SAP BAPI – a nightmare – let me know if you need that
27. How to deploy and run your solution
• Follow the same method IBM is using to run their standard
TDI Solutions
• Create a separate .bat or .sh to run your solution based on
a existing one.
• Modify the necessary parts:
• LOCK_FILE
• Remove the parts handling the Return code from TDI (RC) - unless you
use it in your solution
• Modify the code to launch the TDI AssemblyLine ${TDIPATH}/ibmdisrv
-s . -c <your project>.xml –r <your AssemblyLine>
• The command to clear the lockfile
• Create a .bat or .sh to remove your lockfile
• Add these files to your release folder
28. How to deploy and run your solution
• Copy the following files to your release folder:
• Your <TDI_Project>.xml
• Your <TDI_Project>.properties (only if you created your
own property store)
• both are available in your
TDI_workspace/Projectname/Runtime folder
• Copy all files in the release folder to your Connections
TDI Server Solution Directory
• Test the solution and schedule execution
29. Tips
• Understand the IBM Connections default
synchronization
• Avoid updating the same Info from different sources
• The TDI Connectors for Connections offer
different modes
• Have you ever thought about publishing Data from
Connections to other systems ?
• Define a synchronization Flow that fits your
needs
• Often I start with a ProfileConnector as Data Feed
30. Tips
• Use logging – task.logmsg()
• Write your own log files
• Define Error handling in the “on Error” Hooks
• Use try – catch blocks in your scripts
• Utilize a Property Store
31. Tips
• Define the Attributes you want to read / write
in the Connectors Attribute Mapping
• Or even better use external Attribute Mappings
• Use meaningful and unique names for your
Attributes that help you to identify the source
32. Thank you !
• Go and make your users happy !
• Questions, comments, ideas, … are always
welcome
• just right now
• or reach out to me….
33. THE SSL Challenge
• If any of the involved systems requires a SSL
connection per default TDI will run into an
error.
• TDI can handle SSL – you just need to
configure keystores and import the certificates
• To make it easy – you can have multiple
keystores in TDI.
34. THE SSL Challenge
• Create a new keystore using the IBM Key
Management utility – or use your existing one
35. THE SSL Challenge
• Import all required Server Certificates
including the complete certificate chain
• Add the following lines to your
solution.properties file
• As alternative you also can define multiple
independent keystores