Login providers can be used by OGSA-DAI data resources to map information held in security contexts to database user names and passwords. OGSA-DAI does not force the use of login providers - how such mappings are done and, more generally, how other data resource authorization is executed is specific only to the implementations of data resources used - no other parts of the OGSA-DAI framework have knowledge of these.
Login providers implement the:
uk.org.ogsadai.authorization.LoginProvider
interface. This supports the following operations:
Login providers are based around the notion of a security context. Unlike the rest of the OGSA-DAI framework, login providers can make assumptions as to the nature of information within a security context. This is since login providers used by an OGSA-DAI server are specified as part of the server configuration (see for example Section 18.8, “Login provider”) and so login providers consistent with application specific or presentation layer requirements can be deployed.
OGSA-DAI, by default, distributes the following class that implements the
LoginProvider interface:
uk.org.ogsadai.authorization.file.SimpleFileLoginProvider
which provides mappings from the caller's distinguished name (DN) to database
user names and passwords for 0 or more data resources. This class expects
the security context to implement the
DistinguishedNameProvider interface so that
the caller's DN can be obtained. If the security context does not implement
this interface then a null DN is used that
can only match with wildcard entries in the mappings. The mappings are held in
a text file on the OGSA-DAI server. For more information see
Section 16.1.3, “Configuring database logins” and Section 17.2.3, “Logins File”.
To write an OGSA-DAI login provider you need to provide an implementation of the interface:
uk.org.ogsadai.authorization.LoginProvider
You will need to make the following decisions:
Once a login provider has been written an OGSA-DAI server can be configured to make this available to its components. Section 18.8, “Login provider” contains information on how this can be done.
How to configure data resources to use your login provider will depend upon the configuration expected by the implementations of those data resources. If using the OGSA-DAI JDBC or XMLDB data resources then configuring these to use your login provider basically involves specifying the ID used to deploy your login provider onto the server as part of the data resource configuration. Data resource configuration is described in Section 17.2.8, “Data resource configuration properties and classes”.