Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Context Discovery"

(XRIs/URIs resolving to XRDS documents need to be qualified to be used as ContextIds)
(Use Cases)
Line 11: Line 11:
  
 
===Use Cases===
 
===Use Cases===
The user is =paul.trevithick. He's using a Higgins service. In the first 4 use cases he is going to create an i-card in the i-card manager and want to view it.
+
The user is =paul.trevithick. He's using a Higgins service.  
 +
 
 +
====Use case #1====
 +
Paul has a friend who tells him his iname is '=drummond'. Paul is using Higgins 3.0 (the year is 2009). This version has an i-card manager that allows him to type in this iname whereupon it inspects the zillions of SEPs (SEPs: Service Endpoints: <Service> blocks in the XRDS document that =drummond resolves to) it looks at the type of each and looks in the Context Provider Registry to see what service types are supportable by Higgins and dynamically generates N i-cards for each service type that Higgins understands. For example, one of the service types that Higgins understands is OpenID, so a URI-i-card is created whose ContextId is '=drummond/+OPENID'. Paul can now click on his new URI-i-card and inspect its attributes.
 +
 
 +
When Paul click to view his new i-card the following steps happen:
 +
#The URI i-card splits off the +OPENID (for reasons of backward compatibility with existing XRDS documents that do not use the +OPENID tag alias) and invokes an XRI resolver in an IdAS.utils package: XRI.resolveByType("=drummond", "http://openid.net/server/2.0"). The 
 +
he first arg is the iname, the second is the target service <type>. We're telling the resolver to find the <Service> block that matches by matching on <Type> with the value provided. (See XRDS Files section below to see a description of the contents of xrds1).
 +
#IdAS  searches Context Provider Registry to find a IContextFactory class name for the http://openid.net/server/2.0 service type, it finds org.eclipse.higgins.cp.openid.
 +
#That factory initiates itself with the factory config elements (column 3 in Provider Registry table)
 +
#We do a <factory>.getInstance reading the “Other <Service> elements” from column 4 in XRDS Files table for the contextConfig data
 +
 
 +
====Use case #2 ====
 +
Paul wants to view an URI i-card whose ContextId is "=drummond/bizcard/+LDAP". This supposedly has Drummonds business card attributes. Sequence:
 +
#The i-card manager invokes IURICard.getContext() on this i-card
 +
#The i-card invokes an XRI resolver: XRI.resolveByType("=drummond", "bizcard/+LDAP")
 +
#This resolves to the file "xrds2" and within it the SEP whose <Type> element matches "bizcard/+ldap"
 +
#This SEP block contains the context-specific configuration elements that describe the context
 +
#We look up in the Context Provider Registry (by type "+LDAP) [''Hey Andy, there's a little switcheroo there...how did we get from "bizcard/+LDAP" to just "+LDAP"?'']
 +
 
 +
====Use case #5 details====
 +
This is an example of a ContextId that will be stored in the metadata of the endpoint reference of the token service in the RST. It will be received by the Token Service, passed to a Token Provider and used by that provider to open up an IContext using IdAS. Mike has verified that MSFT CardSpace preserves this EPR metadata so this same approach will work using Higgins or CardSpace Identity Agents.
 +
 
 
{| class="wikitable" style="text-align:left; border="1" cellpadding="5" cellspacing="0"
 
{| class="wikitable" style="text-align:left; border="1" cellpadding="5" cellspacing="0"
 
|-style="background:#d6dee9; color:black"
 
|-style="background:#d6dee9; color:black"
Line 24: Line 46:
 
|Higgins OpenID URI i-card
 
|Higgins OpenID URI i-card
 
|=drummond
 
|=drummond
|Drummond's i-name. His i-name provider has provisioned OpenID services for this i-name. This i-name partially identifies a Context holding the attributes provided by OpenID auth
+
|Paul isDrummond's i-name. His i-name provider has provisioned OpenID services for this i-name. This i-name partially identifies a Context holding the attributes provided by OpenID auth
 
|xrds1
 
|xrds1
 
|matching <Type> element's value of "http://openid.net/server/2.0"
 
|matching <Type> element's value of "http://openid.net/server/2.0"
Line 57: Line 79:
 
|}
 
|}
 
.
 
.
 
====Use case #1 details====
 
User has an existing OpenID, "=drummond". They wish to manage their OP using the Higgins Identity Agent, specifcally the Higgins i-card manager. They create an ''OpenID URI i-card'' using the i-card manager. Note that this is a new specialization of the generic Higgins URI i-card. During the process of creating the new i-card the user types in their OpenID, "=drummond". This is the ContextId of the OpenID URI i-card. The user wishes to see the values of their attributes (i.e. the attributes defined by OpenID authentication) in the i-card manager. Sequence:
 
#The OpenID URI i-card invokes an XRI resolver in an IdAS.utils package: XRI.resolveByType("=drummond", "http://openid.net/server/2.0"). The first arg is the ContextId, the second is new; it is the target service <type>. We're telling the resolver to find the <Service> block that matches by matching on <Type> with the value provided. (See XRDS Files section below to see a description of the contents of xrds1)
 
#IdAS.open searches IdASRegistry for an IContextFactoryClassName for the http://openid.net/server/2.0 service type, it finds org.eclipse.higgins.cp.openid.
 
#That factory initiates itself with the factory config elements (column 3 in IdASRegistry table)
 
#We do a <factory>.getInstance reading the “Other <Service> elements” from column 4 in XRDS Files table for the contextConfig data
 
 
====Use case #2 details====
 
User wants to view the IContext associated with a Higgins URI i-card whose ContextId is "=drummond/vcard/+ldap". Sequence:
 
#The i-card manager invokes IURICard.getContext() on this i-card
 
#The i-card invokes an XRI resolver: XRI.resolveByPath("=drummond/vcard/+ldap")
 
#This resolves to the file "xrds2" and within it the service block whose <Path> element matches "+ldap"
 
#We read <Type> value of the same service block and use it in IdASRegistry to look up an IContextFactory class name
 
#Use this factory to getInstance an IContext
 
 
====Use case #5 details====
 
This is an example of a ContextId that will be stored in the metadata of the endpoint reference of the token service in the RST. It will be received by the Token Service, passed to a Token Provider and used by that provider to open up an IContext using IdAS. Mike has verified that MSFT CardSpace preserves this EPR metadata so this same approach will work using Higgins or CardSpace Identity Agents.
 
  
 
===XRDS Files (examples)===
 
===XRDS Files (examples)===

Revision as of 17:33, 1 March 2007

WARNING: After much discussion today (3/1) with Andy Dale, this revision is now obsolete. A new rev will be forthcoming

Design Goals

In addition to all the previous design goals, here are some more that were behind this proposal

  • Higgins-ism free. Higgins is not in the service/protocol definition business. So the intuition here is that there shouldn’t be any higgins-isms in the XRDS documents. And there should be nothing special about how ContextIds are resolved to XRDS Service blocks (service endpoints). For example, if there is an OpenID service out there Higgins should be able to learn about it and connect to it without modification.

XRIs/URIs resolving to XRDS documents need to be qualified to be used as ContextIds

A key issue that is finally resolved in this proposal is that in Higgins a ContextId uniquely identifies a Context whereas an XRI (or URI) that resolves to a single XRDS document can, when looked at as "a provider of attribute sets" provide more than one set of attributes (effectively more than on Context) and thus does not uniquely identify a Context in the Higgins sense of the word.

For example the XRI '=drummond' may delegate to an OpenID service and simultaneously to a contact service. The set of attributes (and their values!) provided by each of these two services may be different (and usually are). Thus simply having an XRI does not by itself provide enough information to uniquely specify which possible attribute set (which Context) we're talking about. [It is also true that this same XRI may have other services unassociated with providing attributes at all (e.g. messaging services), thus underscoring the need to further qualify the XRI from a Higgins perspective]

Use Cases

The user is =paul.trevithick. He's using a Higgins service.

Use case #1

Paul has a friend who tells him his iname is '=drummond'. Paul is using Higgins 3.0 (the year is 2009). This version has an i-card manager that allows him to type in this iname whereupon it inspects the zillions of SEPs (SEPs: Service Endpoints: <Service> blocks in the XRDS document that =drummond resolves to) it looks at the type of each and looks in the Context Provider Registry to see what service types are supportable by Higgins and dynamically generates N i-cards for each service type that Higgins understands. For example, one of the service types that Higgins understands is OpenID, so a URI-i-card is created whose ContextId is '=drummond/+OPENID'. Paul can now click on his new URI-i-card and inspect its attributes.

When Paul click to view his new i-card the following steps happen:

  1. The URI i-card splits off the +OPENID (for reasons of backward compatibility with existing XRDS documents that do not use the +OPENID tag alias) and invokes an XRI resolver in an IdAS.utils package: XRI.resolveByType("=drummond", "http://openid.net/server/2.0"). The

he first arg is the iname, the second is the target service <type>. We're telling the resolver to find the <Service> block that matches by matching on <Type> with the value provided. (See XRDS Files section below to see a description of the contents of xrds1).

  1. IdAS searches Context Provider Registry to find a IContextFactory class name for the http://openid.net/server/2.0 service type, it finds org.eclipse.higgins.cp.openid.
  2. That factory initiates itself with the factory config elements (column 3 in Provider Registry table)
  3. We do a <factory>.getInstance reading the “Other <Service> elements” from column 4 in XRDS Files table for the contextConfig data

Use case #2

Paul wants to view an URI i-card whose ContextId is "=drummond/bizcard/+LDAP". This supposedly has Drummonds business card attributes. Sequence:

  1. The i-card manager invokes IURICard.getContext() on this i-card
  2. The i-card invokes an XRI resolver: XRI.resolveByType("=drummond", "bizcard/+LDAP")
  3. This resolves to the file "xrds2" and within it the SEP whose <Type> element matches "bizcard/+ldap"
  4. This SEP block contains the context-specific configuration elements that describe the context
  5. We look up in the Context Provider Registry (by type "+LDAP) [Hey Andy, there's a little switcheroo there...how did we get from "bizcard/+LDAP" to just "+LDAP"?]

Use case #5 details

This is an example of a ContextId that will be stored in the metadata of the endpoint reference of the token service in the RST. It will be received by the Token Service, passed to a Token Provider and used by that provider to open up an IContext using IdAS. Mike has verified that MSFT CardSpace preserves this EPR metadata so this same approach will work using Higgins or CardSpace Identity Agents.

Use Case Kind of i-card ContextId Context Description Resolves to ...within which we find the <Service> block by
1 Higgins OpenID URI i-card =drummond Paul isDrummond's i-name. His i-name provider has provisioned OpenID services for this i-name. This i-name partially identifies a Context holding the attributes provided by OpenID auth xrds1 matching <Type> element's value of "http://openid.net/server/2.0"
2 Higgins URI i-card =drummond/bizcard/+ldap Drummond has a (single-DS) Context that holds vcard attributes. xrds2 matching <Path> element's value of "+ldap"
3 Higgins URI i-card =drummond/webSurfer/+sql Drummond uses HBX in his browser and in the Higgins i-card manager he has defined a single-DS Context with the set of attributes he's happy to share with run of the mill websites. It contains only non-identifying information. xrds3 matching <Path> element's value of "+sql"
4 Higgins URI i-card @cordance/Accounting/+ldap Cordance (Drummond's employer) maintains a directory of all employees. A multi-DS Context. xrds4 matching <Path> element's value of "+sql"
5 Higgins CardSpace managed i-card localhost/attstore/2386/+ldap This is the Context behind some card that the Higgins Token Service issued. xrds5 matching <Path> element's value of "+ldap"

.

XRDS Files (examples)

Note: the combination of XRI resolution (if needed on a ContextId) plus the set of XRDS files constitutes a kind of "registry", but we're no longer referring to it that way here.

Each file provides the metadata for the ContextId to which it resolves so that a Higgins Context Provider might be found and that could be told enough about the endpoint to present it as an IContext instance.

The following table shows the elements within the matched <Service> block:

XRDS File <Type> element's value <Path> element's value <Schema> element's value Other elements
xrds1 http://openid.net/server/2.0 (not present) (not present) <URI>url-of-OP</URI>
xrds2 xri-for-ldap "+ldap" url-of-schema-for-this-vcard <SSL>True/False</SSL>,<port/>, and other LDAP-specific elements that identify the context dataset
xrds3 xri-for-sql "+sql" (not present)
xrds4 xri-for-ldap "+ldap" url-of-schema-for-this-departments-employee-directory <SSL>True/False</SSL>,<port/>, and other LDAP-specific elements that identify the context dataset
xrds5 xrd-for-ldap "+ldap" <SSL>True/False</SSL>,<port/>, and other LDAP-specific elements that identify the context dataset

.

Here is what the service block looks like in xrds2:

<Service>
   <Type>xri-for-ldap-type</Type>  
   <Path select="true">+ldap</Path>
   <URI append="none">ldap-server-URL</URI> 
   ...other ContextConfig elements...
</Service>

See http://iss.xdi.org/moin.cgi/IserviceEndpointDefinitions for more examples of I-Service Endpoint definitions.

IdASRegistry

Maps an XRDS service type to an IContextFactory along with any factoryConfig metadata needed (if any)

Service Type IContextFactory Class Name other IContextFactory config data
http://openid.net/server/2.0 org.eclipse.higgins.cp.openid ??
xri-for-ldap org.eclipse.higgins.cp.jndi ??
xri-for-sql org.eclipse.higgins.cp.slq ??

.

Note: "xri-for-ldap" and "xri-for-sql" as used above will be defined by the OASIS XRI TC (they will probably look like say "+i-service*(+ldap)*($v*1.0)" and "+i-service*(+sql)*($v*1.0)"

Back to the top