This guide will cover sections and options related to Project OpenPTK's XML configuration file. A complete Sample XML Configuration File (openptk.xml) is available for reference. Sections:
ContextsThis section defines the available Contexts and sets some global values used by the Framework. Syntax<Contexts default="Person-SPML-Sun" logger="UnixLogFile" debug="4" audit="false" timestamp="true"> <Context ...> </Context> ... </Contexts> Arguments
Parent Element<OpenPTK> Child Element(s)
Contexts.ContextA Context defines the association of a Subject and a Service with an optional Query. Syntax<Context id="Person-SPML" classname="org.openptk.provision.common.TimeoutContext"> <Subject .../> <Service ...> ... </Service> <Query .../> </Context> Arguments
Parent ElementChild Element(s)Contexts.Context.SubjectSyntax<Subject id="Person"/>
Arguments
Parent ElementChild Element(s)
Contexts.Context.ServiceSyntax<Service id="SPML"> <Properties> ... </Properties> </Service> Arguments
Parent ElementChild Element(s)
Contexts.Context.Service.PropertiesThe Properties defined within the Service of a Context, will be added to any Properties that already defined within the Service. If there is a Property with the same name, as defined in the Service, the Property will be replaced with the value defined in this Context. Syntax<Properties> <Property name="url" value="http://sample.openptk.org:80/idm/servlet/rpcrouter2"/> <Property name="objectclass" value="user"/> </Properties> Arguments
Parent ElementChild Element(s)
Contexts.Context.QueryThe Query Element is used to define scoping of the Context. The Query is not actually used by the Context, it is made available to the Service. The Context will create a PTK Query object and automatically add it to the Service's Operations. The Service implementation may or may not use the Query Element. Please refer to the Java Docs Syntax<!-- simple query --> <Query type="EQ" name="MemberObjectGroups" value="All People"/> <!-- complex query --> <Query type="AND"> <Query type="EQ" name="MemberObjectGroups" serviceName="MemberObjectGroups" value="All People"/> <Query type="EQ" name="objectclass" value="user"/> </Query> Arguments
Parent ElementChild Element(s)
SubjectsThis section defines the available Subjects A Subject is an abstract object. It can be used to model (represent) many actual objects (Person, Role, Group, Computer, etc.) Syntax<Subjects> <Subject id="Person" key="uniqueid" password="password" role="Roles" classname="org.openptk.provision.api.Person"> <Attributes> ... </Attributes> </Subject> ... </Subjects> Arguments
Parent Element<OpenPTK> Child Element(s)Subjects.Subject.AttributesThis section defines the available Attributes for a Subject Syntax<Attributes> <Attribute id="uniqueid" required="true" type="String"> ... </Attribute> ... </Attributes> Arguments
Parent ElementChild Element(s)
Subjects.Subject.Attributes.Attribute.TransformationsA collection of Transforms related to an Attribute. There is, at most, only two sub Transforms one for toService and toFramework. A Transform is used to automatically derive the Attribute. Attribute derivation can be processed differently for outbound (toService) and inbound (toFramework) Operations. There can be only one Transform for each type. The Transform will be activated under one or both of these two conditions:
Syntax<Transformations> <Transform type="toService" classname="org.openptk.provision.transform.ModifyAttributes"> <Operations> ... </Operations> <Arguments> ... </Arguments> </Transform> </Transformation> Arguments
Parent ElementChild ElementsSubjects.Subject.Attributes.Attribute.Transformations.Transform.OperationsOperations contain one or more Operation Elements that define when to apply a Transformation to an Attribute. Valid Operation types include:
Syntax<Operations> <Operation type="create"/> <Operation type="update"/> ... </Operations> Arguments
Parent ElementChild Element(s)
Subjects.Subject.Attributes.Attribute.Transformations.Transform.ArgumentsArguments are used by the Transform implementation. There are two types of Arguments:
Syntax<Arguments> <Argument name="first" arg="attribute" value="firstname"/> <Argument name="dot" arg="literal" value="."/> <Argument name="last" arg="attribute" value="lastname"/> <Argument name="at" arg="literal" value="@"/> <Argument name="domainname" arg="literal" value="openptk.org"/> </Arguments> Arguments
Parent ElementChild Element(s)
ServicesThis section defines the available Subjects A Service is an interface to a "back-end" user repository. A Service will be implemented via a class that supports the Service Interface. Defined Properties will be made available to the Service. The Operations declare what capabilities a given Service supports. The Attributes define what is available from the user repository. Syntax<Services> <Service id="SPML" classname="org.openptk.provision.spi.SpmlService" description="Sun Identity Manager SPML" sort="lastname,firstname"> <Properties> ... </Properties> <Operations> ... </Operations> <Attributes> ... </Attributes> </Service> </Services> Arguments
Parent Element<OpenPTK> Child Elements
Services.Service.PropertiesProperties that are specific to a Service. These Properties will be replaced by Properties in a Context if the y have the same name. Syntax<Properties> <Property name="url" value="http://sample.openptk.org:80/idm/servlet/rpcrouter2"/> </Properties> Arguments
Parent ElementChild Element(s)
Services.Service.OperationsDefines what Operations the Service supports. Valid Operation types include:
Syntax<Operations> <Operation type="create" timeout="8000"/> <Operation type="update"/> ... </Operations> Arguments
Parent ElementChild Element(s)
Services.Service.AttributesDefines what Attributes the Service supports. The id defines the Attributes name which is how Consumer Tier applications will reference the Attributes. The back-end Service name will use the same value as the id unless it is explicitly set using the servicename argument. The servicename argument allows a Framework Attribute to have a Consumer Tier name that is different then the Attributes name known by the Service. Syntax<Attributes> <Attribute id="uniqueid" servicename="uid"/> <Attribute id="firstname" servicename="gn" /> <Attribute id="lastname" servicename="sn" /> <Attribute id="manager"/> <Attribute id="email"/> ... </Attributes> Arguments
Parent ElementChild Elements(none) LoggersA Logger is used to capture INFO, WARNING, ERROR, and DEBUG messages. Syntax<Loggers> <Logger id="UnixLogFile" classname="org.openptk.provision.logging.AtomicLogger"> ... </Logger> ... </Loggers> Arguments
Parent Element<OpenPTK> Child Element(s)Loggers.Logger.PropertiesProperties that are used by the Logger. Syntax<Properties> <Property name="file" value="/var/tmp/openptk.log"/> </Properties> Arguments
Parent ElementChild Element(s)
|
Release 1.x >