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"

 
m (Added tag for left menu)
 
(120 intermediate revisions by 3 users not shown)
Line 1: Line 1:
===Design Goals===
+
{{#eclipseproject:technology.higgins}}
* '''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
+
== Intro ==
* '''Simple things are simple.''' We want an approach where a OpenID XRI (or URI) can be referred to by a Higgins i-card using a ContextId of the same value as this XRI (or XRI) and presented as an IContext without any modification of the XRDS to which the OpenID XRI resolves. In other words, armed only with an OpenID XRI/URI, the Higgins Identity Agent should be able to present its attributes to the user (read-only) in the i-card manager. OpenID servers don’t need any contextConfig or factoryConfig to use them.
+
This page explains the process for [[Context]] discovery in the [[Identity Attribute Service]]. Note that this page only provides a general descripion and examples of the process. For specific implementation details, see:
* '''Complex things are possible.''' Beyond the simple OpenID case, we also want to support LDAP, SQL, etc. backed Context which do need contextConfig and probably factoryConfig metadata in order to be presented as an IContext.
+
  
===Use Cases===
+
* [[Context Discovery Components]] for a description of the components that have been implemented for context discovery.
{| class="wikitable" style="text-align:left; border="1" cellpadding="5" cellspacing="0"
+
* [[ContextId]] --the formal ABNF definition
|-style="background:#d6dee9; color:black"
+
 
! width="5%" border="1" align="left" valign="top" |
+
== General Process ==
! width="10%" border="1" align="left" valign="top" | Use Case
+
Context discovery in Higgins consists of the following four general steps:
! width="10%" border="1" align="left" valign="top" | ContextId
+
 
! width="10%" border="1" align="left" valign="top" | Resolves to
+
# The process starts with passing the [[ContextId]] for which context discovery is needed to IdASRegistry.
! width="20%" border="1" align="left" valign="top" | Finding the <Service> block by
+
# IdASRegistry uses the [[ContextId]] to obtains a context descriptor (typically an XRDS file) that contains at least one context type, zero or more URIs, and an optional configuration map.
|-
+
# From the context type, IdASRegistry finds a context factory that can instantiate a context for the given [[ContextId]].
|1
+
# IdASRegistry returns a context factory that has been configured.
|Higgins OpenID URI i-card
+
 
|=drummond
+
== Examples ==
|xrds1
+
 
|matching <Type> value of "http://openid.net/server/2.0"
+
=== Example #1: Typing in an I-Name ===
|-
+
Paul is using a version of Higgins Identity Agent that allows him to type the i-name of a friend, '''=drummond''' into his i-card manager. His i-card manager then calls IdASRegistry which performs the following steps:
|2
+
# Resolves the i-name into an XRDS document to discover the service endpoints (SEPs - the <Service> blocks in the XRDS document). From a Higgins standpoint, each SEP corresponds to a Higgins context descriptor.
|Higgins URI i-card
+
# Looks at the <Type> element of each SEP to discover its context type.
|=drummond/vcard/+ldap
+
# Looks in the Context Provider Registry for that Higgins installation to see what service types are supported by this installation.
|xrds2
+
# Dynamically generates N i-cards -- one for each service type that Higgins understands. For example, one of the service types that this installation of Higgins understands is OpenID, and since =drummond has provisioned an OpenID service, Higgins will create a r-card is whose ContextId in ContextXRI format is '''=drummond/$context+openid'''.
|matching <Path> value of "+ldap"
+
 
|-
+
=== Example #2: Clicking on an R-Card ===
|3
+
Paul wants to view an r-card whose ContextId is '''=drummond/$context+bizcard'''. This supposedly has Drummond's business card attributes. The sequence is:
|Higgins URI i-card
+
# The i-card manager invokes IURICard.getContext() on this i-card.
|=drummond/webSurfingPersona/+sql
+
# The i-card object calls IdASRegistry.getContextFactory(contextId) to find an IContextFactory that can instantiate an IContext for the r-card's IContextId.
|xrds3
+
# IdASRegistry obtains the context descriptor (in this case, an XRDS document retrieved via XRI resolution of '''=drummond/$context+bizcard''').
|matching <Path> value of "+sql"
+
# The context descriptor contains one or more context types, which are used by IdASRegistry to look up a suitable context factory.
|-
+
# The IContextFactory is returned to the i-card object, which then calls the factory's createContext(contextId) method in order to get back an IContext object for the i-card's IContextId.
|4
+
 
|Higgins URI i-card
+
=== Example #3: Token Received by Token Service ===
|@parityinc.net/AccountingDept/+ldap
+
A ContextId, '''localhost/attstore/2386''' is stored in the metadata of the endpoint reference of the token service in the RST. It is received by the Token Service, passed to a Token Provider and used by that provider to open up an IContext using IdASRegistry. (Mike has verified that MSFT CardSpace preserves this EPR metadata so this same approach will work using Higgins or CardSpace Identity Agents.)
|xrds4
+
 
|matching <Path> value of "+sql"
+
== Example XRDS Files ==
|-
+
See [[ContextDiscoveryComponents]] for example XRDS files.
|5
+
|Higgins URI i-card
+
|localhost/icardstore/236-86/+ldap
+
|xrds5
+
|matching <Path> value of "+sql"
+
|}
+
.
+

Latest revision as of 08:39, 15 March 2008

{{#eclipseproject:technology.higgins}}

Intro

This page explains the process for Context discovery in the Identity Attribute Service. Note that this page only provides a general descripion and examples of the process. For specific implementation details, see:

General Process

Context discovery in Higgins consists of the following four general steps:

  1. The process starts with passing the ContextId for which context discovery is needed to IdASRegistry.
  2. IdASRegistry uses the ContextId to obtains a context descriptor (typically an XRDS file) that contains at least one context type, zero or more URIs, and an optional configuration map.
  3. From the context type, IdASRegistry finds a context factory that can instantiate a context for the given ContextId.
  4. IdASRegistry returns a context factory that has been configured.

Examples

Example #1: Typing in an I-Name

Paul is using a version of Higgins Identity Agent that allows him to type the i-name of a friend, =drummond into his i-card manager. His i-card manager then calls IdASRegistry which performs the following steps:

  1. Resolves the i-name into an XRDS document to discover the service endpoints (SEPs - the <Service> blocks in the XRDS document). From a Higgins standpoint, each SEP corresponds to a Higgins context descriptor.
  2. Looks at the <Type> element of each SEP to discover its context type.
  3. Looks in the Context Provider Registry for that Higgins installation to see what service types are supported by this installation.
  4. Dynamically generates N i-cards -- one for each service type that Higgins understands. For example, one of the service types that this installation of Higgins understands is OpenID, and since =drummond has provisioned an OpenID service, Higgins will create a r-card is whose ContextId in ContextXRI format is =drummond/$context+openid.

Example #2: Clicking on an R-Card

Paul wants to view an r-card whose ContextId is =drummond/$context+bizcard. This supposedly has Drummond's business card attributes. The sequence is:

  1. The i-card manager invokes IURICard.getContext() on this i-card.
  2. The i-card object calls IdASRegistry.getContextFactory(contextId) to find an IContextFactory that can instantiate an IContext for the r-card's IContextId.
  3. IdASRegistry obtains the context descriptor (in this case, an XRDS document retrieved via XRI resolution of =drummond/$context+bizcard).
  4. The context descriptor contains one or more context types, which are used by IdASRegistry to look up a suitable context factory.
  5. The IContextFactory is returned to the i-card object, which then calls the factory's createContext(contextId) method in order to get back an IContext object for the i-card's IContextId.

Example #3: Token Received by Token Service

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

Example XRDS Files

See ContextDiscoveryComponents for example XRDS files.

Back to the top