xalan.jar (2.7.1), xercesImpl.jar, xml-apis.jar, opensaml-1.1.jar, xmlsec-20050514.jar, log4j-1.2.5.jar, commons-logging-1.03.jar, commons-codec-1.3.jarHere's the Java Source:
import org.opensaml.SAMLAssertion;
import org.opensaml.SAMLException;
import org.opensaml.*;
import java.util.Date;
import java.util.HashSet;
public class AMUserAssertion {
private static String strIssuer = "Example:FrontEnd";
private static String strNameID = "testUserID";
private static String strNameQualifier = "Example:FrontEnd";
// private static String strNamespace = "urn:oasis:names:tc:SAML:1.0:assertion";
private static String strNamespace = "urn:bea:security:saml:groups";
private static String strAttrName = "Groups";
private static String strAuthMethod = "SunAccessManager";
public static void main(String args[]) {
try {
// Crate the assertion
SAMLAssertion assertion = new SAMLAssertion(strIssuer, null, null, null, null, null);
// Create the subject
SAMLSubject subject = new SAMLSubject(new SAMLNameIdentifier(strNameID, strNameQualifier, SAMLNameIdentifier.FORMAT_UNSPECIFIED), null, null, null);
subject.addConfirmationMethod(SAMLSubject.CONF_SENDER_VOUCHES);
// Create the authentication statement
Date date = new Date();
SAMLAuthenticationStatement authStatement = new SAMLAuthenticationStatement(subject, strAuthMethod, date, null, null, null);
assertion.addStatement(authStatement);
// Create the attribute statement
SAMLAttribute attrGroups = new SAMLAttribute(strAttrName, strNamespace, null, 0, null);
// Here some hardcoded values for the groups attributes
attrGroups.addValue("AssetManager");
attrGroups.addValue("Employee");
HashSet set = new HashSet();
set.add(attrGroups);
SAMLSubject subject2 = (SAMLSubject) subject.clone();
SAMLAttributeStatement attrStatement = new SAMLAttributeStatement(subject2, set);
assertion.addStatement(attrStatement);
SAMLDoNotCacheCondition condition = new SAMLDoNotCacheCondition();
assertion.addCondition(condition);
System.out.println("AMUserAssertion 1:\n"+assertion.toString());
}
catch (Exception e) {
e.printStackTrace();
}
}
}
The output looks like:
<Assertion xmlns="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" AssertionID="_4e138dee03e2e826b58b9310e2d8a1e5" IssueInstant="2009-07-01T10:03:06.103Z" Issuer="PND:FrontEnd" MajorVersion="1" MinorVersion="1">
<Conditions>
<DoNotCacheCondition></DoNotCacheCondition>
</Conditions>
<AuthenticationStatement AuthenticationInstant="2009-07-01T10:03:07.078Z" AuthenticationMethod="SunAccessManager">
<Subject>
<NameIdentifier Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified" NameQualifier="PND:FrontEnd">testUserID</NameIdentifier>
<SubjectConfirmation>
<ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:sender-vouches</ConfirmationMethod>
</SubjectConfirmation>
</Subject>
</AuthenticationStatement>
<AttributeStatement>
<Subject>
<NameIdentifier Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified" NameQualifier="PND:FrontEnd">testUserID</NameIdentifier>
<SubjectConfirmation>
<ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:sender-vouches</ConfirmationMethod>
</SubjectConfirmation>
</Subject>
<Attribute AttributeName="Groups" AttributeNamespace="urn:bea:security:saml:groups">
<AttributeValue>AssetManager</AttributeValue>
<AttributeValue>Employee</AttributeValue>
</Attribute>
</AttributeStatement>
</Assertion>"

IF Environment_Name=value THEN Authentication_Type=[realm:]Authentication_ProcessIF Environment_Name=value THEN realm=realm_nameIF Environment_Name=value THEN redirectURL=redirect_URLredirectURL parameter.You can use ssoadm CLI to automate the OpenSSO service configuration. In the next few blog entries I am planning to give some examples on how to perform certain configuration changes using the ssoadm CLI. In this article I am going to show you how to create an Authentication Chain. You should have configured the CLI as a prerequisite.
Here is the scenario:
Add the ldap server configuration details to the newly created auth module 'MyLDAP'
When you create the auth chain there will be no modules added to it, you need add it later
Create the Auth Chain named 'myauthcfg'
Add the MyLDAP as the required module to the auth chain 'myauthcfg'
You can list the available authentication configurations in a realm using the list-auth-cfgs sub command.
You can also list the available authentication instances in a realm using the list-auth-instances sub command
Authentication Instances:
WSSAuthModule, [type=WSSAuthModule]
MyLDAP, [type=LDAP]
Federation, [type=Federation]
LDAP, [type=LDAP]
HOTP, [type=HOTP]
DataStore, [type=DataStore]
SAE, [type=SAE]
As I blogged the other day, I'm in Brazil this week, speaking at the Javali and FISL conferences in Porto Alegre. I'm all done with my sessions now, and, as promised, here are the slides:
The Javali presentation is a fairly deep dive into OpenSSO's brand new OAuth implementation, while the FISL slides are a higher level overview of identity services in OpenSSO. Grab one or both and mix yourself a caipirinha for the full Brazilian experience
|
The 10th FISL starts this week. Like previous years, it looks like a lot of fun: the Program is full of good content, and there is also Porto Alegre... FISL starts on the 24th and it is preceded by Javali, an event focused on Java, on the 23rd (Agenda).
I did a quick pass through the FISL program to highlight some sessions, including those related to GlassFish Projects and friends:
• Arun on
GF, MySQL and NetBeans (S205)
(Arun's note)
• Mauricio on
OSGi in GFv3 (S736)
• Ludo will talk about
OpenDS (S473)
(Ludo's note)
• Fabiane on
Hudson (S733)
• Pat on
OpenSSO (S360)
(Pat's note)
• Fabio Veloso on
Jersey (S282)
Other talks related to GlassFish include
• On OpenJDK,
Bruno (S734)
and
Charlie (S226)
• On OpenSolaris
Rafael (S600)
and
Brian (S749)
• On NetBeans et al,
Geertjan (S735), and
• On OSS,
Simon (S757),
I wish I was there! If you attend FISL or Javali, please report back.
I just got confirmation that I'm on the bill at the Javali event next Tuesday, June 23, in Porto Alegre, Brazil. Javali, organized by SouJava and RSJUG, focuses on Java and free software, and is held immediately prior to FISL (on which more below). I'll be doing quite a deep dive on the secure RESTful web services (via OAuth) work we have going on right now, which was first seen in public a few weeks ago at CommunityOne West and JavaOne. Javali will be at the Porto Alegre Serpro offices, Av. Augusto de Carvalho, 1133, from 09:00 to 20:00. I'm on at 18:30 in the Bill Joy Room, just before the pizza, assuming I make my 1 hour layover in Buenos Aires!
As I mentioned above, Javali precedes FISL, now in its 10th year, South America's biggest open source conference with, according to the FISL home page, over 6000 attendees registered. I spoke at FISL 9.0 last April, and, I have to say, had a GREAT time. I saw an incredible display of energy and enthusiasm for all things open source, from kernel hacking to Ruby on Rails via every application of Java, although I think our evening expeditions in search of churrasco and caipirinhas probably also contributed to my positive recollections
My session this year, 'Open Source Identity Services with OpenSSO', on Friday June 26 at 09:00 in room 40T, looks at the three different approaches we take to identity services in OpenSSO - insulating applications from identity via container plugins, support for standards such as SAML, and lightweight SOAP and REST for interacting directly with OpenSSO. I'll be covering the secure RESTful web services demo again, but it will be a much higher level view than the Javali presentation.
So - probably not enough notice for anyone to book a trip to Brazil, but, if you're going to be there anyway, drop in one one or both sessions and say "Hi"! And bring the cachaça!
UPDATE - slides posted.

NOTE: In order to communicate the one time password securely between parties, a hashed message authentication code (HMAC) is used to encode the data. When a one time password is requested, the HOTP authentication module stores the OTP in memory, appends an authentication tag to it that is computed as a function of the one-time password and the HMAC, and sends it to the user. When the user returns the one time password, the HOTP authentication module will compare the one received with the one it stores in memory and authentication succeeds only if the values match. The use of the HMAC algorithm is standardized in HOTP: An HMAC-Based One-Time Password Algorithm.You can configure the user profile to receive the one time password via email or text message.
14085551212@txt.att.net or 14085551212@messaging.sprintpcs.com. If the phone number is provided without a provider domain, the default domain txt.att.net will be appended to the phone number.SMSGateway.java. The default implementation is com.sun.identity.authentication.modules.hotp.DefaultSMSGatewayImpl. This class sends the one time password to an email address or to a mobile device, depending on the configuration.http://server:port/opensso/UI/Login?service=configured-auth-chainforceAuth=true parameter can be used to force user authentication for purposes of session upgrades. When this parameter is appended to the end of the authentication URL, the existing session token will be updated on successful authentication.
And now to the music: in 2004 the Beautiful South released Golddiggas, Headnodders and Pholk Songs, an album of covers. The first cut was the Olivia Newton-John/John Travolta hit from Grease, You're The One That I want. Here's a live version from the Jools Holland TV show. You've never heard it like this.
I miss the Beautiful South!
There are lot of resources available on the internet to install and configure the OID, I would suggest this article for the beginners on OID, found it very useful. For simplicity I have assumed OID is installed and configured with default settings with a root suffix dc=opensso,dc=java,dc=net. If your suffix is different from this you should change the suffix values appropriately in the respective files.
This section includes two parts one describing on how to extend the OID schema to accommodate OpenSSO specific user attributes the other details about the special users and privileges required to manage the user store from OpenSSO perspective.
This is the critical part of the process with out this schema some of the user management features of OpenSSO cannot be achieved like the OpenSSO provided password reset feature or the user account lockout.
To extend the schema just download the schema file from here.
ldapmodify -h OID_HOST -p PORT -D "cn=orcladmin" -w PASSWD -f am_remote_oid_schema.ldif
Since the OID schema is extended to include the OpenSSO attribute certain attributes of OpenSSO are critical from security point of view, normal users should not be able modify those attribute such as inetuserstatus, to prevent this self modification an ACI needs to be included in the OID configuration.
OID can be used as a profile,authentication and policy store, for
authentication and policy subjects read only permissions are enough.
For profile read and write permissions are required.
There will be a user created under the root suffix
dn: ou=opensso adminusers,dc=opensso,dc=java,dc=net
changetype:add
objectClass: top
objectClass: organizationalUnit
dn: cn=openssouser,ou=opensso adminusers,dc=opensso,dc=java,dc=net
changetype:add
objectclass: inetuser
objectclass: organizationalperson
objectclass: person
objectclass: top
cn: openssouser
sn: openssouser
userPassword: amsecret12
dn: cn=RealmAdministrators, cn=Groups, cn=OracleContext,dc=opensso,dc=java,dc=net
changetype:modify
add:uniquemember
uniquemember:cn=openssouser,ou=opensso adminusers,dc=opensso,dc=java,dc=net
In addition to the above you need to add appropriate ACI to prevent the self modification of certain security user attributes. This is not part of this procedure because adding this requires quite a bit of testing which I could not do it.
You should be able to download the above LDIF from here
Run the following command to load the LDIF
ldapmodify -h OID_HOST -p PORT -D "cn=orcladmin" -w PASSWD -f add_opensso_config_oid.ldif
Now your Oracle Internet Directory is ready to be used as a userstore for OpenSSO.
Once the steps 1 through 2 are accomplished successfully you can go ahead
and create a new LDAPv3 type datastore pointing to the OID you have
just configured. I am going to show you the less error prone method to
create the user store that point to OID. I am assuming the ssoadm
command line tool is already confgured with your OpenSSO server.
You just need to run the following command
make sure you have replaced the OID server's name and port in the
datastore_oid_attrs.txt. Now you can start creating and managing
users that are stored in the OID server.
If you want to use this server as LDAP authentication source, you
configure the LDAP auth instance with the bind user cn=ldapuser, like
wise for the policy configuration service.
At some point if you want to remove the schema and the adminstrative entries along with the privileges added by the section 2.2, you can simply run the following command
This will remove the OpenSSO user schema.
This will remove the ACIs and the administrative users like cn=openssouser from the Oracle Internet Directory.
Password polcies, extensive group management yet to be validated, however the static groups seems to be working fine in my testing
If you're in the Chicago area next week you might be interested in attending the Chicago Java Users Group (CJUG) meeting on Tuesday (June 16 2009) - Kiran Ramineni, Principal at Ramp Info, will be presenting on OpenSSO and Identity Federation. The event starts at 6pm in the Lewis Towers Ballroom, Beane Hall at Loyola University of Chicago, and is free to CJUG members and first time guests. Sounds like a bargain to me, so get yourself down there next Tuesday night and then leave a comment here to let us know how it went!
日本大学は、Google Apps Education Edition の導入を決定してから稼動まで約 2.5 ヶ月で実現した。要求仕様として個人情報保護の観点から必要以上の情報を Google 社に提供しないという機密性、そしてアカウント情報を学内各種情報システムと連携という利便性、機密性と利便性というありがちではあるものの相反する要求を実現する必要があったが Google 社が提供する Provisioning API とでは、SAMLを使って、Google Apps とシングルサインオン連携をしたい場合には、どうすればいいのでしょうか。そんなときの強い味方がOpenSSOです。 SAMLにはもちろん対応していますし、Google Apps との連携設定が簡単に可能なウィザードも提供されています。SAML ベースの Single Sign-On (SSO) API の利用によって実現への確証を得た。Provisioning API を用いると Google Apps のシンプルな管理機能を大学組織に合致した運用形態に作り替えることができる。SSO を用いればキャンパス内の全ての IT サービスへの展開をも可能とする。 いっけん Google 社の既製品をそのまま使っただけのように思われがちだが Web 2.0 時代のオープンな API を用いることで日大色の Google Apps Education Edition に仕立てた。
Google Apps Education Edition の導入事例: 日本大学
Among the OpenSSO-related news items that popped up while I had my head down over the past few weeks, I noticed the Google Blog entry and Valeo press release concerning the global industrial group's Google Apps deployment - 30,000 Valeo employees now have access to a new communication and collaborative working platform based on Google Apps Premier Edition and supported by Capgemini, one of the largest enterprise deployments of Google Apps to date.
It's not mentioned in either story, but, if you a regular reader of Superpatterns, you'll already know that Capgemini deployed OpenSSO at Valeo to handle single sign-on, allowing Valeo employees to access their email at Google via their Valeo credentials, without having to manage a separate Google username/password.
If you're looking at Google Apps, click here to download the 'starter kit' we recently produced, which explains exactly how to set up single sign-on to Google Apps using OpenSSO.
Wow - is it really over a month since my last blog entry? I guess that's what happens when you get your head down into a project - in this case, building a demo for CommunityOne West and JavaOne 2009 to show off the latest OpenSSO features.
The demo brought together a number of existing Java technologies - the Java Persistence API (JPA), the Jersey implementation of JAX-RS (aka JSR 311) on both the client and server, and JavaFX - with some new aspects of OpenSSO - fine-grained authorization (aka entitlements), OAuth protocol support, and a JDBC data store. Briefly, the demo centered on a cellphone account management system delivered as a JavaFX rich Internet application (RIA) client and a (more or less) RESTful web service back-end, communication between them secured by OAuth.
I'll be uploading source code for the demo client and server apps to the OpenSSO project in the next few days, as well as documenting how to bring up the demo environment. Watch this space for updates!
control 2.16.840.1.113730.3.4.3 is implemented by many of the LDAP servers including
ldapsearch -p 389 -h ds_host -s base -b '' "objectclass=*" supportedControl | grep 2.16.840.1.113730.3.4.3
AD implements in a different form using the LDAP control 1.2.840.113556.1.4.528
ldapsearch -h AD_HOST -p PORT -D"CN=Administrator,CN=Users,dc=test,dc=com" -w secret12 -s base -b '' "objectclass=*" supportedControl | grep 1.2.840.113556.1.4.528
There was a question posted to our internal (Sun) alias, and I think I should share it out for the benefit of OpenSSO community. The question was “How to update OpenSSO configuration store password?”
There are two types of datastore in OpenSSO server, namely the configuration datastore and user datastore. As the name suggest, the former stores the configuration data that are required by OpenSSO server to operate properly. The latter stores users related information, such as role, group and user entries.
It can be done through Command Line Interface or Administration Console.
The Command Line Interface way.
The Administration Console Interface way.

We have recently modified our Java build target to 1.5. Hence, you need Java Runtime version 1.5 and above to run OpenSSO Client. The Java runtime version requirement for OpenSSO server remains unchanged i.e. 1.5.
This new client runtime requirement shall be in our next official release i.e. OpenSSO Express 8 which is scheduled to released in a couple of months from now.

OpenSSO at JavaOne/CommunityOne... tons of interesting stuff!
OpenSSO Community Day
Join us Sunday May 31st, for OpenSSO Community Day at the Moscone Center in San Francisco. It's our 'unconference' before the main
conference and discussions will include OpenDS and Identity Connectors. Just show up prepared to
talk about any topic related to Sun's open source identity projects. As
always attendance is free. Join our Meetup to participate in this discussion.
CommunityOne West Conference
Whether you're a developer, technologist, or student, join us Monday, June 1- Wednesday,
June 3 at the Moscone
Center
for technical education, OpenSSO talks,
and a Hands On Lab at CommunityOne West.
Monday, June 1
Wednesday, June 3
JavaOne Conference
Continue the fun with more OpenSSO related talks, a BOF, and a Hands On
Lab at JavaOne Tuesday, June 2- Friday, June 5. Stop by
our pod (#462) to talk with identity experts and get a free t-shirt and
open source CD! And, don't miss the following identity-related presentations:
Tuesday, June 2
Wednesday, June 3
Thursday, June 4
|
A reminder that tomorrow, Sunday May 31st, is our GlassFish and OpenSSO Unconference and also the Party at The Thirsty Bear. The Thirsty Bear is a popular hangout during JavaOne; they have great food and drinks and it is very close to The Moscone (see Google, Live). An RSVP is appreciated to assess food needs. PS. I have not been able to post news recently because of J1/C1 preparations - plus this year's extra distraction - but this year my commitments are early in the week and I will try to catch up afterwards. |
OpenSSO team has a busy week ahead.

Open discussions on all OpenSSO related features.
Hands On Lab. Web Application Security with OpenSSO.
Monday June 1, 1:40 – 3:30 PM by Himanshu Vijay and Baby Sunil.Pragmatic Identity 2.0: Invoking Identity Services with a Simplified REST/ROA Architecture.
Monday June 1, 11:50 AM – 12:40 PM by Daniel Raskin,Deep Dives. Identity Management with OpenSSO: Deploy an Identity Management Solution in 4 hours Learn how to build an identity management solution based on OpenSolaris, Open DS, and Sun OpenSSO Express 7.
Wednesday, June 3, Morning Session. by Mrudul Uchil and David Goldsmith.
BOF-5275 – Using and Participating in the OpenSSO Project
Tuesday night, June 02, 9:30 PM – 10:20 PM hosted by Sean Brydon, Pat Patterson and Aravindan Ranganathan.TS-5295 Designing and Building Security into REST Applications
Wednesday, June 03, 2:50 PM – 3:50 PM by Sean Brydon, Aravindan Ranganathan, Paul Bryan.TS-4012 – Pragmatic Identity 2.0: Simple, Open, Identity Services Using REST
Thursday, June 04, 10:50 AM – 11:50 AM by – Pat Patterson and Ron Ten-Hove.LAB-6727 – Web Application Security with OpenSSO: From Simple Log-In to Single Sign-On to Federation
Thursday, June 4, 1:30 – 3:00 pm by Pat Patterson, Himanshu Vijay and Baby Sunil.BOF-4903 – A RESTful approach to identity-based web services
Thursday, June 04, 7:30 PM – 8:20 PM by Hubert Le Van Gong and Marc Hadley.

Ian Glazer from the Burton Group wrote a nice blog on having a meaningful conversation around the definition of entitlement management. Ian was responding to a blog by Ian Yip and basically states we need more specificity around entitlements in the context of access controls. I agree with Ian's sentiment and thought I'd take some time to discuss how Sun thinks about entitlement management when it comes to access controls.
First, as Ian points out in his blog we agree that entitlement management is to vague a term and cuts across many facets of identity management including roles, provisioning, access controls and reporting. When it comes to access controls we've decided to refer to it as "entitlement enforcement" so that it's clear that we are talking about the run-time enforcement of access entitlements.
Second, when we refer to entitlement enforcement we believe that we are discussing the fine-grained access controls around resources. That is, rather than protecting "doorways" or coarse-grained access we provide authorization decisions around all the "objects" within an application or resource (often referred to as fine-grained authorization). For example, a common scenario we see is in the financial services area and the need to provide entitlement enforcement around specific fields within a banking portal. For instance, a banking portal may want to provide access controls that limit the amount of money that subjects such as individuals, roles or groups can transfer. I may have the ability to transfer $1 million dollars and Ian may have the ability to transfer $5. Note that the access controls I'm talking about are not only specific to urls, but also other resources such as fields, calendars, etc.
Third, entitlement enforcement requires policy enforcement points that are easy to deploy and scalable. Sun is approaching this in two ways. 1) OpenSSO can be deployed as a policy enforcement point or 2) we will be offering a Fedlet policy enforcement point, a lightweight method for embedding policy enforcement points within applications. The key to this effort is making it lightweight and performant at the same time. Basic jist is if you have all the capabilities to implement entitlement enforcement but it isn't repeatable and scalable in terms of deployment then it won't be practical to implement and could hinder adoption.
Four, Sun believes that all aspects of an entitlement enforcement solution imply scale. Your policy store needs to scale. The user interface needs to scale to allow people to manage lots o' policies and the entitlement enforcement solution needs to be performant to ensure it can handle lots and lots of authorization transactions.
Five, auditability and simulation of policies is important as well. Entitlement enforcement needs to fit in to the development process so that administrators and developers can work together to define applications, develop policies and test policies throughout development, QA, staging and production. Providing tools to do this and ensuring that admins can export policies from the entitlement solution so that they can develop error free scripts as they move from environment to environment is critical.
Six, identity services are key to entitlement enforcement. The fine-grained nature of entitlements means there is a much larger burden on developers to tie policy to a centralized system. There needs to be several options that developers can use to handle embedding entitlements in the application or container. This includes lightweight identity web services such as OAUTH/REST, standard protocols such as SAML/XACML and complete abstraction via agents. Depending on the customer, we believe you need to support multiple options. Whereas a Web 2.0 company may be very excited about REST a financial services company may be more focused on agents and completely abstracting authorization from the developer. As Gerry points out, there are many ways to do this whether it be using XACML, WS*, OAUTH, etc, etc, etc.
Finally, Sun has a unique belief that entitlement enforcement should be part of your web access management solution. This is not specific to the definition of entitlement enforcement, but rather our belief around how to pragmatically implement it. Deploying separate WAM solution and entitlement enforcement solution adds unnecessary complexity to your identity infrastructure and vastly increases the TCO. It means that organizations have multiple products to maintain and upgrade. It also means that customers will likely have multiple policy stores within their organization. From our perspective, WAM solutions were built to handle entitlement enforcement and it is a natural extension of web access management that is more likely to lead to customer adoption rather then requiring someone to license and deploy a separate component in their environment.
Our entitlement solution is currently under construction at OpenSSO.org. It will be 100% XACML based and is focused on delivering everything I've described above. You can currently view it via the OpenSSO source code, but we will be providing more details shortly for you to test it out. We will also be showing the new capabilities at OpenSSO Community Day 3.0 in San Francisco this weekend. Make sure to attend so you can see it and provide feedback.
I wanted to pass along a quick note about an upcomming webinar on Directory Services which will be held Wednesday, May 20. The webinar will cover how to reduce cost and improve the speed and performance of your enterprise using directory services. The conversation will go over the following:

If you are interested, please sign-up here. Even if you are not able to attend, registering will give you access to the replay.
Oh, and that is not Craig MacDonald in the picture in the top-right. I got this from a very talented photographer in the Creative Commons here.
If you attend and want to see what I look like, the picture to the left was captured at the European Identity Conference by the very serious people at the Daily Mail the bastion of great journalism in the UK.