Skip to main content
Jump to: navigation, search

IdAS Registry and Configuration

IdAS is a service that enables consumers to access contexts (identity data stores) referenced by abstract identifiers called "contextRefs (URIs)" using a variety of data access methods.

Use Case #1

Description: opening ContextRef 'cref' when IdAS consumer doesn't specify a preferred IContextFactory. Notice that the configData returned by canConnect is ignored in this use case.

Iterable<IContextFactory> factories = idasregistry.getContextFactories((String) null); 
IContextFactory foundf = null; 
for (Iterator<IContextFactory> itr = factories.iterator(); itr.hasNext(); ) {
  IContextFactory f = itr.next();
  if (configData = f.canConnect(cref)) {
    foundf = f;
    break;
  }
}
if (foundf == null) return;
 
IContext c = f.connect(cref);

Policy p = c.getOpenPolicy();

...get a DI that satisfies policy p

c.open(DI);

Use Case #2

Description: The IdAS consumer creates a new Context. To do this, the consumer must choose an IContextFactory and is required to know how to configure a new context with this factory with factory-specific configuration data

...consumer enumerates available IContextFactories and selects one by
...inspecting the metadata of each and ultimately selects 'f'.
...or the consumer does f = idasregistry.getContextFactory(<some factory id>)
List propNames = f.getConfigPropNames();

Properties configData;
...set up configData

URI root = f.getRootURI();
URI cref;
...client uses 'root' (which may be null) to construct 'cref'--a presumably a globally unique URI

if (f.canCreate(cref, configData)) {
  IContext c = f.createContext(cref, configData); }

Proposed Changes to IdAS

interface IContextFactory {

  // Test to see if this factory can connect to the specified context
  // Returns discoverable metadata (e.g. if the URI is a WS-Addressing
  // EPR then it can return EPR metadata, or if the URI is believed to be
  // an OpenID URI it can attempt to GET XRDS mimetype service
  // description document)
  Properties canConnect(URI contextRef); // formerly called "canAttach" 

  // Connect to a pre-configured context
  IContext connect(URI contextRef);   // formerly called "attach"

  // Create a new context with given configuration data
  boolean canCreate(URI contextRef, Properties configData);
  IContext createContext(URI contextRef, Properties configData);

  // Destroy Context associated with contextRef. Unbinds contextRef.
  void destroyContext(URI contextRef);

  // Returns list of property's names required to create/configure new
  // context.
  List<String> getConfigPropNames();

  // This method is called when instance of context factory is
  // registered in IdASRegistry. 
  void onRegistration(File config); 

  // Returns a common root URI used by all URIs connectable by this
  // factory. May be null. May only contain a URI scheme. May contain more.
  URI getRootURI();

  // Returns a unique indentifier for this factory
  string getID();
  ...
}

class IdASRegistry {

  // Create IdAS registry with the specified path to configuration
  // area (path location where configuration files for context
  // factories are located)
  IdASRegistry(String configAreaPath);

  // Create IdAS registry with the default path to configuration
  // area (for example ${user.home}/.higgins/idas/)
  IdASRegistry();
 
  // Get persistent config file for a given factory
  // Note: the name of the file is taken from the factory's id
  File getConfigFile(IContextFactory factory); 

  // Find and return a factory whose ID matches 'id' (else null)
  IContextFactory getContextFactory(String id);
  ...
}

interface IContext {

  // Return this Context's authentication policy. Format is
  // identical to the "Higgins RP Security Policy" document
  Policy getOpenPolicy();
  ...
}

Back to the top