
.diameter.diameter-core-docs-sources-asciidoc.1.7.0.137.source-code.Section-JDiameter-Validator-Configuration.adoc Maven / Gradle / Ivy
[[_jdiameter_validator_configuration]]
= Validator Configuration
The Validator is configured with a single XML file.
This file contains the structure definition for both messages and AVPs.
Upon creation of the Diameter Stack, the validator is initialized.
It performs the initialization by looking up the [path]_dictionary.xml_ file in classpath.
NOTE: The configuration file contains more data that `Validator` uses to build its data base.
This is because the `Dictionary` uses the same file to configure itself.
It reuses the AVP definitions, with some extra information like AVP type and flags.
The configuration file has the following structure:
[source,xml]
----
----
::
The root element that contains the child elements comprising the validator and dictionary components.
This element does not support any attributes.
::
Specifies whether message validation is activated for sent and received stack messages.
The element supports the following optional attributes:
enabled
Specifies whether the validator is activated or deactivated. If not specified, the validator is deactivated.
sendLevel
Determines the validation level for messages sent by the stack instance. Values determine if sent messages are not validated at all (OFF), only message level AVPs are checked (MESSAGE) or all AVPs are checked (ALL).
receiveLevel
Determines the validation level for messages received by the stack instance. Values determine if sent messages are not validated at all (OFF), only message level AVPs are checked (MESSAGE) or all AVPs are checked (ALL).
::
Optional element that specifies the mapping between the vendor name, vendor ID, and vendor code.
The element supports the following required attributes:
name
Specifies the vendor name. For example, "Hewlett Packard".
vendor-id
Specifies the unique ID associated with the vendor. For example, "HP".
code
Specifies the alpha-numeric code allocated to the vendor by IANA. For example, "11". The value must be unique for each declaration.
. XML Attributes
====
[source,xml]
----
...
----
====
::
Defines the simple Attribute Value Pair (AVP) types.
The element supports the following required attributes:
type-name
Specifies a type name in accordance with the acceptable base types defined in RFC 3588. For example; "Enumerated", "OctetString", "Integer32".
type-parent
Specifies the parent type name used to define the base characteristics of the type. The values are restricted to defined elements. For example; "OctetString", "UTF8String", "IPAddress".
. XML Attributes
====
[source,xml]
----
----
====
::
Defines the specific applications used within the dictionary.
Two child elements are supported by : and .
The element supports the following attributes:
id
Specifies the unique ID allocated to the application. The attribute is used in all messages and forms part of the message header.
name
Optional attribute that specifies the logical name of the application.
uri
Optional attribute that specifies a link to additional application information.
. XML Attributes
====
[source,xml]
----
----
====
::
Element containing information necessary to configure the Attribute Value Pairs. <<_table_avp_attributes>> contains the complete list of supported attributes, and their available values (if applicable).
The element supports a number of child elements that are used to set finer parameters for the individual AVP. The supported elements are , , and .
NOTE: Different sets of elements are supported by depending on its position in the dictionary.xml file.
. Child Elements and Attributes
====
[source,xml]
----
----
====
::
Child element of that is used to match the AVP with the AVP type as defined in the element.
The element supports the following mandatory attribute:
type-name
Specifies the type-name of the element. This is used to match the type-name value in the element.
NOTE: is ignored if the element contains the element.
::
Child element of that specifies the enumeration value for the specified AVP.
is used only when the type-name attribute of is specified.
The element supports the following mandatory attributes:
name
Specifies the name of a constant value that applies to the AVP.
code
Specifies the integer value associated with the name of the constant. The value is passed as a value of the AVP, and maps to the name attribute.
NOTE: is ignored if the element contains the element.
::
Child element of that specifies the AVP is a grouped type.
A grouped AVP is one that has no element present.
The element does not support any attributes, however the element is allowed as a child element.
The , which specifies a reference to a grouped AVP, supports one mandatory attribute:
name
Specifies the name of the grouped AVP member. The value must match the defined AVP name.
. Attributes
[cols="1,1,1", frame="all", options="header"]
|===
| Attribute Name (optional in brackets) | Explicit Values (default in brackets) | Description
| name | | Specifies the name of the AVP. This is used to match the AVP definition to any grouped AVP references. For further information about grouped AVPs, refer to the element description in this section.
| code | | Specifies the integer code of the AVP.
| (vendor-id) | (none) | Used to match the vendor ID reference to the value defined in the element.
| (multiplicity) | | Specifies the number of acceptable AVPs in a message using an explicit value.
| | 0 | An AVP must not be present in the message.
| | (0+) | Zero or more instances of the AVP must be present in the message.
| | 0-1 | Zero, or one instance of the AVP may be present in the message. An error occurs if the message contains more than one instance of the AVP.
| | 1 | One instance of the AVP must be present in the message.
| | 1+ | At least one instance of the AVP must be present in the message.
| may-encrypt | Yes \| (No) | Specifies whether the AVP can be encrypted.
| protected | may \| must \| mustnot | Determines actual state of AVP that is expected, if it MUST be encrypted , may or MUST NOT.
| vendor-bit | must \| mustnot | Specifies whether the Vendor ID should be set.
| mandatory | may \| must \| mustnot | Determines if support for this AVP is mandatory in order to consume/process message.
| vendor | | Specifies the defined vendor code, which is used by the child element
|===
. XML Attributes
====
[source,xml]
----
----
====
::
Specifies the command for the application.
The element supports the element, which specifies the structure of the command.
The element supports the following attributes:
name
Optional parameter that specifies the message name for descriptive purposes.
code
Mandatory parameter that specifies the integer code of the message.
request
Mandatory parameter that specifies whether the declared command is a request or answer. The available values are "true" (request) or "false" (answer).
NOTE: If the element is specified in , it does not support any child elements.
The element only refers to defined AVPs when used in this context.
. Elements and Attributes
====
[source,xml]
----
----
====
© 2015 - 2025 Weber Informatics LLC | Privacy Policy