OpenSSO Client SDK: Service Configuration Sample
By docteger on Dec 06, 2007
UPDATED: 12/11/07 - answers to questions below In preparation for writing the Client SDK chapter of the FAM8 Developer's Guide, I am running the Client SDK samples. I did not find a lot of information concerning what these samples are actually doing so I figured I'd tell you what I've done and if you have questions (or answers), comment me. NOTE:
AMConfig.propertieshas been deprecated for OpenSSO. The server configuration data is now stored in an OpenDS server when you freshly install the soon-to-be-latest release. The Client SDK, however, still uses
AMConfig.propertiesto store its configuration data as it is remote to the installed OpenSSO server. This Service Configuration Sample Servlet executes the
ServiceConfigServlet.javawhich retrieves and displays attributes from the service name input; in the sample, DAI.
- Deploy and launch the
fam-client-jdk15.warIn the the
samplesdirectory of the inflated
opensso.zip, you find
fam-client.zip. Unzip this and see the
wardirectory contains the Client SDK and web-based samples. The
sdkdirectory contains command line based samples (compile the source code before using it). In the
wardirectory, you will find
fam-client-jdk15.war. Deploying the appropriate WAR, depending on the version of Java on your machine, installs the Client SDK. Launching the deployed WAR via the Glassfish console displays the Configurator page.
- Configure the Client SDK by pointing it to your local instance of OpenSSO. NOTE: Be sure to use an opening forward slash (/) in the Service Deployment URI.
- After configuration, click the link to proceed to the samples and, from the resulting page, click Access Management Samples. The following page is displayed.
- Click Service Configuration Sample Servlet, enter values on the resulting page and submit.
You only have to enter the password; admin123, by default. I got an error the first time around and had to change the value of two properties in the Client SDK
AMConfig.properties(which, after configuration, I found in the top-level root directory of my machine - not a very organized place for it to land).
com.sun.identity.agents.app.usernameshould have a value of
com.iplanet.am.service.passwordshould have a value of
- SUCCESS!! You can see the Client SDK retrieved the attributes of the DAI Service. Also the SSOToken of the questioning user. Questioning?\*
- What is the DAI Service? Many moons ago, it referred to the
ums.xml. Is DAI just a hold over that is now only used for this sample? Or is it something more? ANSWER: The service is still used for an existing directory information tree (DIT) and legacy installs.
- What is the difference between the Configuration Type options, schema and config? The output for schema you see above. The output for config looks like an LDAP blob. In either case, the output is not very pretty and I can't make heads or tails of it. ANSWER: schema refers to the data structure, the template for the data. Default values may be defined dependent on the service. config is the actual data. The output is defined as key/value pairs, one right after t'other. (sic)
- What happens if I used another OpenSSO Service Name? Would this still work? Or is it, as the name says, just a sample.
ANSWER: You can use any OpenSSO service as input as long as you use the value defined as the
nameattribute of the
serviceelement in the particular service's XML service file.
- Now that Amy Winehouse has received six Grammy nominations for her album, Back to Black, will she clean herself up in time to perform? ANSWER: With any luck. Even though she cancelled the concert I had tickets for nine months ago, I'm still in Amy's corner. I am, though, getting tired of reading stories that begin, "Troubled singer Amy Winehouse..." In this picture video, Amy covers the Teddy Bears' classic To Know Him Is To Love Him (which, ironically enough, was written by troubled record producer Phil Spector).