Schema
The schema definition for the attribute connector configuration is available below in XML, and JSON/YAML format.
- XML
- JSON/YAML
jdbc.config.xsd
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.axiomatics.com/jdbc.config" xmlns:tns="http://www.axiomatics.com/jdbc.config"
elementFormDefault="qualified">
<element name="configuration" type="tns:configurationType" />
<complexType name="configurationType">
<sequence>
<element name="connnection" type="tns:connectionType"
maxOccurs="1" minOccurs="1"/>
<element name="mapping" type="tns:mapping" maxOccurs="unbounded"
minOccurs="1"/>
</sequence>
</complexType>
<complexType name="keyType">
<sequence>
<element name="xacmlAttribute" type="tns:xacmlAttributeType"
minOccurs="1" maxOccurs="1">
</element>
</sequence>
<attribute name="allowMultiple" type="xs:boolean"
use="required">
<annotation>
<documentation>
allowMultiple is used to indicate whether multiple
values for a given attribute inside an incoming
Context object are allowed.
</documentation>
</annotation>
</attribute>
<attribute name="sqlType" type="int">
<annotation>
<documentation>sqlType is an int which corresponds to the jdbc supported SQL type as defined in java.sql.Types</documentation>
</annotation></attribute>
<attribute name="inputType" type="xs:string" default="IN">
<annotation>
<documentation>Must be mapped to IN or OUT or INOUT to specify the
type of the corresponding input argument being passed to the Stored
Procedure call
</documentation>
</annotation>
</attribute>
</complexType>
<complexType name="xacmlAttributeType">
<attribute name="Category" type="xs:string" use="required" />
<attribute name="AttributeId" type="xs:string" use="required" />
<attribute name="DataType" type="xs:string" use="required" />
<attribute name="Issuer" type="xs:string" use="required" />
</complexType>
<complexType name="connectionType">
<choice maxOccurs="1" minOccurs="1">
<element name="jdbcConnectionString" type="xs:string"
maxOccurs="1" minOccurs="1">
<annotation>
<documentation>This is the jndi name of a jdbc resource e.g.
jdbc/MyConnection. In this case, it is the container's (or
framework) responsibility to define such a resource and make it
visible to the PIP connector for the latter to be able to use it.
Typically such connections will be defined in the app server.
Their definition contain the URL, driver, username, and password
needed to connect to the JDBC-compliant database.</documentation>
</annotation>
</element>
<sequence>
<element name="url" type="xs:string" maxOccurs="1"
minOccurs="1">
<annotation>
<documentation>Example of a URL which includes username / password information
jdbc:postgresql://localhost/test?user=fred&password=secret&ssl=true</documentation>
</annotation>
</element>
<element name="driver" type="xs:string" maxOccurs="1"
minOccurs="1">
<annotation>
<documentation>
In the case of certain PIPs, drivers may be
needed
to connect to the back-end PIP (e.g. a
JDBC PIP). In the case one
needs to specify the
classpath of the jdbc driver to be used e.g.
org.postgresql.Driver.
</documentation>
</annotation>
</element>
</sequence>
</choice>
</complexType>
<complexType name="mapping">
<sequence>
<element name="xacmlAttribute" type="tns:xacmlAttributeType"
maxOccurs="1" minOccurs="1">
</element>
<element name="nativeAttribute" type="tns:nativeType"
maxOccurs="1" minOccurs="1">
</element>
<element name="uId" type="string" maxOccurs="1" minOccurs="0"/>
</sequence>
</complexType>
<complexType name="nativeType">
<sequence>
<element name="sqlType" type="int"/>
<element name="query" type="xs:string" maxOccurs="1"
minOccurs="1">
</element>
<element name="key" type="tns:keyType" maxOccurs="unbounded"
minOccurs="0">
</element>
</sequence>
<attribute name="outputIndex" type="int" default="0">
<annotation>
<documentation>
This outputIndex specifies the index of the
parameter being passed to
the SP that will be used as the OUTPUT to
this attribute query. Note that value zero means that the output
will be taken from the returned ResultSet
</documentation>
</annotation>
</attribute>
</complexType>
</schema>
jdbc.config.json
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"NamedAttribute" : {
"type" : "object",
"properties" : {
"attributeId" : {
"type" : "string"
},
"category" : {
"type" : "string"
},
"datatype" : {
"type" : "string"
},
"issuer" : {
"type" : "string"
}
}
}
},
"type" : "object",
"properties" : {
"connection" : {
"type" : "object",
"properties" : {
"driver" : {
"type" : "string",
"description" : "In the case of certain PIPs, drivers may be needed to connect to the back-end PIP (e.g. a JDBC PIP). In the case one needs to specify the classpath of the jdbc driver to be used e.g. org.postgresql.Driver."
},
"jdbcConnectionString" : {
"type" : "string",
"description" : "This is the jndi name of a jdbc resource e.g. jdbc/MyConnection. In this case, it is the container's (or framework) responsibility to define such a resource and make it visible to the PIP connector for the latter to be able to use it. Typically such connections will be defined in the app server. Their definition contain the URL, driver, username, and password needed to connect to the JDBC-compliant database."
},
"url" : {
"type" : "string",
"description" : "Example of a URL which includes username / password information jdbc:postgresql://localhost/test?user=fred&password=secret&ssl=true"
}
}
},
"mappings" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"attributeName" : {
"type" : "string",
"description" : "The name of the attribute to be mapped to the full attribute definition from the dictionary. This is the recommended way to to define an attribute. Alternatively, xacmlAttribute can be used"
},
"nativeAttribute" : {
"type" : "object",
"properties" : {
"keys" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"allowMultiple" : {
"type" : "boolean",
"description" : "allowMultiple is used to indicate whether multiple values for a given attribute inside an incoming Context object are allowed."
},
"attributeName" : {
"type" : "string",
"description" : "The name of the attribute to be mapped to the full attribute definition from the dictionary. This is the recommended way to to define an attribute. Alternatively, xacmlAttribute can be used"
},
"inputType" : {
"type" : "string",
"description" : "Must be mapped to IN or OUT or INOUT to specify the type of the corresponding input argument being passed to the Stored Procedure call"
},
"sqlType" : {
"type" : "integer",
"description" : "sqlType is an int which corresponds to the jdbc supported SQL type as defined in java.sql.Types"
},
"xacmlAttribute" : {
"$ref" : "#/$defs/NamedAttribute"
}
}
}
},
"outputIndex" : {
"type" : "integer",
"description" : "This outputIndex specifies the index of the parameter being passed to the SP that will be used as the OUTPUT to this attribute query. Note that value zero means that the output will be taken from the returned ResultSet"
},
"query" : {
"type" : "string"
},
"sqlType" : {
"type" : "integer"
}
}
},
"uid" : {
"type" : "string"
},
"xacmlAttribute" : {
"$ref" : "#/$defs/NamedAttribute"
}
}
}
}
},
"required" : [ "connection", "mappings" ]
}