﻿<?xml version="1.0" encoding="utf-8" ?>
<xs:schema xmlns="http://schema.webpdf.de/1.0/configuration/server" elementFormDefault="qualified"
           targetNamespace="http://schema.webpdf.de/1.0/configuration/server"
           xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="server">
        <xs:annotation>
            <xs:documentation>
                <p>The server element defines settings for the server such as the ports, user sources or authorization
                    settings. Some of these changes might require a server restart to take effect.
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:all>
                <xs:element name="host" type="HostType">
                    <xs:annotation>
                        <xs:documentation>
                            <p>Defines the host name and context path of the server.</p>
                        </xs:documentation>
                    </xs:annotation>
                </xs:element>
                <xs:element name="shutdown" type="ShutdownType">
                    <xs:annotation>
                        <xs:documentation>
                            <p>Defines the port and command for server shutdown commands.</p>
                        </xs:documentation>
                    </xs:annotation>
                </xs:element>
                <xs:element name="connectors">
                    <xs:annotation>
                        <xs:documentation>
                            <p>Defines a series of connectors that the server listens to. These can provide encrypted or
                                unencrypted access to the server.
                            </p>
                        </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                        <xs:choice maxOccurs="unbounded">
                            <xs:element name="connector" type="ConnectorType">
                                <xs:annotation>
                                    <xs:documentation>
                                        <p>Defines a single connector on which the server listens to.
                                            This can be an encrypted or unencrypted connector.
                                        </p>
                                    </xs:documentation>
                                </xs:annotation>
                            </xs:element>
                        </xs:choice>
                    </xs:complexType>
                </xs:element>
                <xs:element name="user" type="UserStorageType">
                    <xs:annotation>
                        <xs:documentation>
                            <p>Sets the user store settings for the server. This source is used for user authentication
                                when the server issues authorization tokens.
                            </p>
                        </xs:documentation>
                    </xs:annotation>
                </xs:element>
                <xs:element name="apr" type="AprType" minOccurs="0">
                    <xs:annotation>
                        <xs:documentation>
                            <p>Configures an <a href="https://tomcat.apache.org/tomcat-10.0-doc/config/listeners.html">
                                APR Lifecycle Listener
                            </a> for the underlying tomcat server.
                            </p>
                        </xs:documentation>
                    </xs:annotation>
                </xs:element>
                <xs:element name="truststore" minOccurs="0">
                    <xs:annotation>
                        <xs:documentation>
                            <p>Defines the access information for the server's truststore, which contains all
                                third-party certificates that the server should trust.
                                This applies to connections that the server establishes to external servers, such as
                                HTTP SSL connections or LDAPS connections.
                            </p>
                        </xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                        <xs:attribute name="password" default="" type="xs:string">
                            <xs:annotation>
                                <xs:documentation>
                                    <p>The password required to access the truststore.</p>
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="file" default="" type="xs:string">
                            <xs:annotation>
                                <xs:documentation>
                                    <p>The name (without path) of the JKS keystore file (in the "keystore/" folder) that
                                        is to serve as the server's truststore.
                                    </p>
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>
                <xs:element name="localAuth" type="LocalAuthType" minOccurs="0">
                    <xs:annotation>
                        <xs:documentation>
                            <p>Defines the local authorization provider that authenticates users and provides
                                authorization tokens for API access.
                            </p>
                        </xs:documentation>
                    </xs:annotation>
                </xs:element>
                <xs:element name="oauth" type="OAuthType" minOccurs="0">
                    <xs:annotation>
                        <xs:documentation>
                            <p>Defines settings for external OAuth2 providers that issue authorization tokens to clients
                                required for API access. The settings are necessary to validate the validity of the
                                tokens by the server.
                            </p>
                        </xs:documentation>
                    </xs:annotation>
                </xs:element>
                <xs:element name="health" type="HealthType" minOccurs="0">
                    <xs:annotation>
                        <xs:documentation>
                            <p>Configures health endpoint management settings.</p>
                            <p>If this element is absent, all management operations on health
                                endpoints are disabled (fail-closed).
                            </p>
                        </xs:documentation>
                    </xs:annotation>
                </xs:element>
            </xs:all>
        </xs:complexType>
    </xs:element>
    <xs:complexType name="ConnectorType">
        <xs:annotation>
            <xs:documentation>
                <p>A <a href="https://tomcat.apache.org/tomcat-10.1-doc/config/http.html">connector</a> defines the
                    properties of a port the server can be accessed by.
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:all>
            <xs:element name="configuration" type="ConnectorConfigurationType" minOccurs="0"/>
            <xs:element name="proxy" type="ProxyType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines proxy configuration for the connector.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="ssl" type="SSLType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines the settings for a TLS connector.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:all>
        <xs:attribute name="enabled" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>When set to true this connector is active and may be used to connect to the server.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="address" default="">
            <xs:annotation>
                <xs:documentation>
                    <p>The IP address to which the connector should bind. If not defined, all IP addresses are used.</p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:string"/>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="port" default="8080">
            <xs:annotation>
                <xs:documentation>
                    <p>The port the connector is listening to.</p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:int">
                    <xs:minInclusive value="1"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="compression" default="on" type="CompressionModeType">
            <xs:annotation>
                <xs:documentation>
                    <p>Specifies whether to apply GZIP compression to the message to save bandwidth.
                        <ul>
                            <li>off = disable compression.</li>
                            <li>on = allow compression, which causes text data to be compressed.</li>
                            <li>force = forces compression in all cases.</li>
                        </ul>
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="compressionMinSize" default="2048" type="xs:int">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets the minimum number of bytes a message must reach before GZIP compression shall be applied.
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="compressibleMimeType"
                      default="text/html,text/xml,text/css,application/json,application/javascript" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Selects the MIME Types of message contents, that may be compressed via GZIP compression.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="protocol" default="HTTP/1.1" type="ConnectorProtocolType">
            <xs:annotation>
                <xs:documentation>
                    <p>The protocol to use for the connector.
                        <ul>
                            <li>HTTP/1.1 = Non blocking java NIO connector.</li>
                            <li>HTTP/2.0 = Non blocking java NIO2 connector.</li>
                            <li>AJP/1.3 = The APR/native connector.</li>
                        </ul>
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="SSLType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the settings for a TLS connector.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:all>
            <xs:element name="configuration" type="ConnectorConfigurationType" minOccurs="0"/>
            <xs:element name="keystore">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines the keystore with the private server key and the certificate used to encrypt the connection.
                            This keystore may only contain exactly one certificate or certificate chain with one private key.
                        </p>
                    </xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:complexContent>
                        <xs:extension base="KeystoreType">
                            <xs:attribute name="alias" default="" type="xs:string">
                                <xs:annotation>
                                    <xs:documentation>
                                        <p>The alias used for the private server key and certificate in the keystore. Can be empty if the keystore only contains a single certificate.</p>
                                    </xs:documentation>
                                </xs:annotation>
                            </xs:attribute>
                        </xs:extension>
                    </xs:complexContent>
                </xs:complexType>
            </xs:element>
            <xs:element name="truststore" type="KeystoreType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines the keystore containing the trusted certificates (truststore).</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="protocols">
                <xs:annotation>
                    <xs:documentation>
                        <p>Lists the protocols, that are accepted by the TLS connector.</p>
                    </xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="protocol" type="SSLProtocolType" maxOccurs="unbounded" default="TLSv1.2">
                            <xs:annotation>
                                <xs:documentation>
                                    <p>Selects the TLS protocols for the connector.</p>
                                </xs:documentation>
                            </xs:annotation>
                        </xs:element>
                    </xs:sequence>
                </xs:complexType>
                <xs:unique name="UniqueProtocol">
                    <xs:selector xpath="./*"/>
                    <xs:field xpath="."/>
                </xs:unique>
            </xs:element>
            <xs:element name="ciphers" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Selects encryption algorithms (ciphers) used by the TLS connector.</p>
                    </xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:sequence minOccurs="0" maxOccurs="unbounded">
                        <xs:element name="cipher" type="SSLCipherType" minOccurs="0" maxOccurs="unbounded" default="">
                            <xs:annotation>
                                <xs:documentation>
                                    <p>Selects a cipher that shall be supported.</p>
                                </xs:documentation>
                            </xs:annotation>
                        </xs:element>
                    </xs:sequence>
                    <xs:attribute name="forceOrder" default="false" type="xs:boolean">
                        <xs:annotation>
                            <xs:documentation>
                                <p>When set to true, this forces the client to honor the TLS connector's cipher preference
                                    order. Otherwise, the client can select any cipher from the list itself.
                                </p>
                            </xs:documentation>
                        </xs:annotation>
                    </xs:attribute>
                </xs:complexType>
                <xs:unique name="UniqueCiphers">
                    <xs:selector xpath="./*"/>
                    <xs:field xpath="."/>
                </xs:unique>
            </xs:element>
        </xs:all>
        <xs:attribute name="maxThreads" default="150">
            <xs:annotation>
                <xs:documentation>
                    <p>The maximum number of request processing threads created by this connector.</p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:int">
                    <xs:minInclusive value="1"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="scheme" default="https">
            <xs:annotation>
                <xs:documentation>
                    <p>The TLS connection scheme. (e.g. "https")</p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <xs:enumeration value="https"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="clientAuth" default="false" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>Whether a client must provide a valid certificate before being accepted by the connector.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="sessionTimeout" default="86400">
            <xs:annotation>
                <xs:documentation>
                    <p>The time in seconds before a session is encountering its timeout.</p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:int">
                    <xs:minInclusive value="0"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="sessionCacheSize" default="0">
            <xs:annotation>
                <xs:documentation>
                    <p>The number of SSL sessions to maintain in the session cache.</p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:int">
                    <xs:minInclusive value="0"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="HostType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the host name and context path of the server.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="valve" type="HostValveType" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                    <xs:documentation>
                        <p>A <code>valve</code> element represents a component to insert into the request processing pipeline of the underlying Tomcat server.
                            (See: https://tomcat.apache.org/tomcat-10.1-doc/config/valve.html for further information.)
                        </p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="filter" type="HostFilterType" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                    <xs:documentation>
                        <p>A <code>filter</code> element represents a component to insert into the request processing pipeline of the underlying Tomcat server.
                            (See: https://tomcat.apache.org/tomcat-10.1-doc/config/filter.html for further information.)
                        </p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="csp" type="HostCspType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>The <code>csp</code> element allows you to set a content security policy (https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) for the server portal page.
                        </p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="name" default="localhost" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets the host name part of the server address (e.g. http://localhost).</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="contextPath" default="webPDF" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets the context path of the server address for the portal and the web services (e.g.,
                        http://localhost/webPDF).
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="ShutdownType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the port and command for the server shutdown.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="port" default="8005" type="xs:int">
            <xs:annotation>
                <xs:documentation>
                    <p>The port that shall listen for shutdown commands.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="command" default="SHUTDOWN" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The command that shall be listened for.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="restart" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>When set to true, the server will restart upon the shutdown's completion. Otherwise, the server
                        will be stopped after the command.
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="KeystoreType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines a certificate keystore.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="type" default="JKS" type="SSLKeystoreFormatType">
            <xs:annotation>
                <xs:documentation>
                    <p>The format of the keystore file containing the certificate (or certificate chain) and private key (optionally encrypted) to be used for SSL encryption.
                        <ul>
                            <li>JKS = A Java keystore (file based with an extension like ".jks").</li>
                            <li>PKCS12 = A PKCS12 keystore (file based with the extensions like ".p12" or ".pfx").</li>
                            <li>PEM = A PEM-encoded keystore (file based with extensions like ".pem" or ".cabundle").</li>
                            <li>WINDOWS_MACHINE = The Windows certificate store of the machine on which the server is running.</li>
                            <li>WINDOWS_USER = The Windows certificate store of the user account under which the server is running.</li>
                        </ul>
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="password" default="webpdf" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The password required to access the keystore.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="file" default="ssl.jks" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The name of the keystore file to use.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:simpleType name="SSLKeystoreFormatType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="JKS"/>
            <xs:enumeration value="PKCS12"/>
            <xs:enumeration value="PEM"/>
            <xs:enumeration value="WINDOWS_MACHINE"/>
            <xs:enumeration value="WINDOWS_USER"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:complexType name="ProxyType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines proxy configuration for the connector.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="scheme" default="http" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The protocol scheme for the proxy (e.g. "http" or "https").</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="host" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The proxy host's name.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="port" default="0" type="xs:int">
            <xs:annotation>
                <xs:documentation>
                    <p>The port on which the proxy listens.".</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="UserStorageType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines settings for the server's user storage.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:choice>
            <xs:element name="db" type="UserDbType">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines a relational user database as a user source.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="ldap" type="UserLdapType">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines an LDAP dictionary or Active Directory as a user source.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="xml" type="UserXmlType">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines the local XML file "conf/users.xml" as the user source. The users are managed locally
                            via the portal administration area.
                        </p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="azureAd" type="UserAzureAdType">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines an Azure Active Directory as a user source.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:choice>
        <xs:attribute name="roleAdminGroup" default="admin" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets the name of the group that grants administrative rights to users. This allows replacing the
                        default value "admin" with a user-defined group name. A user must be a member of the group to be
                        granted administrative rights.
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="roleUserGroup" default="user" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets the name of the group that grants normal user rights to users. This allows replacing the
                        default "user" value with a custom group name. A user must be a member of the group to be
                        granted normal user rights.
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="UserDbType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines a relational user database as a user source.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="driverName" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The name of the driver (path of the java class) to use for database access. (e.g.
                        "com.mysql.jdbc.Driver".)
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="connectionURL" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The URL of the database. (e.g. "jdbc:mysql://localhost:3306/webpdf".)</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="userTable" default="users" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The name of the database table, that lists the server's users.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="userNameCol" default="user_name" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The name of the column containing the user's name.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="userCredCol" default="user_pass" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The name of the column containing the user's credentials.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="userRoleTable" default="user_roles" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The name of the table that defines the available user roles.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="roleNameCol" default="role_name" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The name of the column containing the user's role.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="connectionName" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The name of the database user to access the database for.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="connectionPassword" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The password of the database user to access the database with.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="digest">
            <xs:annotation>
                <xs:documentation>
                    <p>This field currently is unused.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="UserLdapType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines an LDAP dictionary or Active Directory as a user source.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:all>
            <xs:element name="userCertificates" type="UserCertificateLdapType" minOccurs="0"/>
            <xs:element name="userPKCS12" type="UserPKCS12Type" minOccurs="0"/>
            <xs:element name="keepAlive" type="UserKeepAliveLdapType" minOccurs="0"/>
        </xs:all>
        <xs:attribute name="connectionURL" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The URL used to connect to the LDAP server. (e.g. "ldap://server.example.com:389/".)</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="connectionName" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The name of the user used to access the LDAP server. (e.g.
                        "cn=ldapuser,cn=Users,dc=example,dc=local".)
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="connectionPassword" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The password used to access the LDAP server.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="userBase" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The Base for the LDAP user search. (e.g. "CN=Users,DC=example,DC=local".)</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="userSearch" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The LDAP request used to find the user's login name with. (e.g. "(sAMAccountName={0})".)</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="roleBase" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The Base for the LDAP user's role determination. (e.g. "CN=Users,DC=example,DC=local".)</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="roleSearch" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The LDAP request used to find the user's role with. (e.g. "(member={0})".)</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="roleField" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The field that indicates that a user is part of a group. (e.g. "cn".)</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="followReferral" default="false" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>When set to true, all LDAP requests that respond with references are followed. The same schema
                        and credentials are used for the referred request.
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="certificatesTrustMode" default="validate" type="UserLdapCertificatesTrustModeType"/>
    </xs:complexType>
    <xs:simpleType name="UserLdapCertificatesTrustModeType">
        <xs:annotation>
            <xs:documentation>
                <p>Specifies the mode for handling the certificates presented by the LDAP server when establishing a connection.
                </p>
                <ul>
                    <li>validate = Only certificates that can be verified as publicly valid are classified as trusted.
                        It may be necessary to place the certificate or the issuer's certificate in the server's
                        truststore. Self-signed certificates
                        (e.g., from an own certificate authority) are excluded if they cannot be verified via a
                        configured truststore.
                    </li>
                    <li>acceptAll = All certificates are classified as trusted, including expired, unverifiable, invalid
                        or self-signed certificates.
                    </li>
                </ul>
            </xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
            <xs:enumeration value="validate"/>
            <xs:enumeration value="acceptAll"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:complexType name="UserAzureAdType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines an Azure Active Directory as a user source.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="clientId" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>Defines the client (application) ID that is stored in the Azure AD in the application
                    registration.
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="authority" default="https://login.microsoftonline.com/organizations/" type="xs:string">
            <xs:annotation>
                <xs:documentation>Defines the URL to be used for logging in to Azure AD.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="scope" default="user.read" type="xs:string">
            <xs:annotation>
                <xs:documentation>Defines the scope to be used when logging in to Anzure AD.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="UserXmlType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the local XML file "conf/users.xml" as the user source. The users are managed locally via the
                    portal administration area.
                </p>
            </xs:documentation>
        </xs:annotation>
    </xs:complexType>
    <xs:complexType name="AprType">
        <xs:annotation>
            <xs:documentation>
                <p>Configures an <a href="https://tomcat.apache.org/tomcat-10.0-doc/config/listeners.html">APR Lifecycle
                    Listener
                </a> for the underlying tomcat server.
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="enabled" default="false" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>When set to true, the APR Lifecycle Listener shall be activated.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="useAprConnector" default="false" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>This field currently is unused.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="SSLEngine" default="on" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Selects the <a href="https://www.openssl.org/">SSL
                    </a> engine to use, possible values are "off" (do not use SSL) "on" (use SSL without specifying the
                        engine).
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="SSLRandomSeed" default="builtin" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>An entropy source to seed the SSL engine's random number generation with. To allow for quicker
                        start time, set this to "/dev/urandom".
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="FIPSMode" default="off" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Set this to "on" to request SSL to operate in FIPS (Federal Information Processing Standards)
                        mode.
                        <ul>
                            <li>"enter" to force OpenSSL to enter FIPS mode.</li>
                            <li>"require" to require that OpenSSL already operates in FIPS mode.</li>
                            <li>"off" to disable the FIPS mode.</li>
                        </ul>
                        <p>For this to take effect "useOpenSSL" must be set to true. (It is highly recommended to refer
                            to https://tomcat.apache.org/tomcat-10.0-doc/config/listeners.html)
                        </p>
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="useOpenSSL" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>When set to true this activates the usage of OpenSSL for NIO and NIO2 connectors.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:simpleType name="SSLProtocolType">
        <xs:annotation>
            <xs:documentation>
                <p>Sets the TLS protocol type for SSL connections.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
            <xs:enumeration value="TLSv1"/>
            <xs:enumeration value="TLSv1.1"/>
            <xs:enumeration value="TLSv1.2"/>
            <xs:enumeration value="TLSv1.3"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="SSLCipherType">
        <xs:annotation>
            <xs:documentation>
                <p>Specifies the encryption algorithm (cipher) for TLS (SSL) connections.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string"/>
    </xs:simpleType>
    <xs:simpleType name="CompressionModeType">
        <xs:annotation>
            <xs:documentation>
                <p>Specifies whether to apply GZIP compression to the message to save bandwidth.
                    <ul>
                        <li>off = disable compression.</li>
                        <li>on = allow compression, which causes text data to be compressed.</li>
                        <li>force = forces compression in all cases.</li>
                    </ul>
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
            <xs:enumeration value="on"/>
            <xs:enumeration value="off"/>
            <xs:enumeration value="force"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:complexType name="UserCertificateLdapType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the location of the user's certificate stored in the Active Directory.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="enabled" default="false" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>When set to true a user certificate can be found in the Active Directory.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="attributeName" default="userCertificate" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The name of the attribute selecting the user's certificate.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="UserPKCS12Type">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the location of the user's keystore stored in the active directory.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="enabled" default="false" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>When set to true a user keystore can be found in the Active Directory.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="attributeName" default="userPKCS12" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The name of the attribute selecting the user's keystore.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="UserKeepAliveLdapType">
        <xs:annotation>
            <xs:documentation>
                <p>When these settings are present, the server sends a ping to the configured LDAP server to keep the
                    connection alive.
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="enabled" default="false" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>When set to true the server sends a ping to the configured LDAP server to keep the
                        connection alive.
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="sendInterval" default="300" type="xs:int">
            <xs:annotation>
                <xs:documentation>
                    <p>The sending interval in seconds at which the ping is sent.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:simpleType name="ConnectorProtocolType">
        <xs:annotation>
            <xs:documentation>
                <p>The protocol to use for the connector.
                    <ul>
                        <li>HTTP/1.1 = Non blocking java NIO connector.</li>
                        <li>HTTP/2.0 = Non blocking java NIO2 connector.</li>
                        <li>AJP/1.3 = The APR/native connector.</li>
                    </ul>
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
            <xs:enumeration value="HTTP/1.1"/>
            <xs:enumeration value="HTTP/2.0"/>
            <xs:enumeration value="AJP/1.3"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:complexType name="OAuthType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines settings for external OAuth2 providers that issue authorization tokens to clients required
                    for API access. The settings are necessary to validate the validity of the tokens by the server.
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:all>
            <xs:element name="providers" type="OAuthProvidersType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines the external providers that should issue OAuth2 tokens and be verifiable by the
                            server.
                        </p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:all>
    </xs:complexType>
    <xs:simpleType name="OAuthProviderNameType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="generic"/>
            <xs:enumeration value="azureAd"/>
            <xs:enumeration value="auth0"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="OAuthProviderFlowType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="clientCredentials"/>
            <xs:enumeration value="authorizationCodeWithPkce"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:complexType name="OAuthProviderType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines an Oauth2 authorization provider.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:all>
            <xs:element name="logout" type="OAuthProviderLogoutType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Specifies the settings required to perform an OAuth2 logout.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:all>
        <xs:attribute name="name" default="generic" type="OAuthProviderNameType">
            <xs:annotation>
                <xs:documentation>
                    <p>Selects the OAuth2 provider or "generic" when not available in the list.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="displayName" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The displayed name for the provider (e.g., in the portal).</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="flow" default="clientCredentials" type="OAuthProviderFlowType">
            <xs:annotation>
                <xs:documentation>
                    <p>Selects the <a href="https://datatracker.ietf.org/doc/html/rfc6749#section-1.2">OAuth2 flow
                    </a> used. Depending on the flow, different settings are necessary for the provider.
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="id" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets a unique ID that uniquely identifies this provider configuration.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="clientId" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets the <a href="https://datatracker.ietf.org/doc/html/rfc6749#section-2.2">OAuth2 client
                        identifier</a>.
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="tenantId" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets a tenant identifier for the OAuth2 request. Not all providers require a tenant id.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="discoveryUrl" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets the <a href="https://datatracker.ietf.org/doc/html/rfc8414">discovery URL
                    </a> for the OAuth2 process, where the server can find, for example, the required public signature
                        keys for token validation.
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="applicationId" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets the application identifier that uniquely identifies the application (the API of this
                        server). This ID is also defined as the audience for the token to verify that the token was
                        issued for the API dServer.
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="scope" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Specifies the <a href="https://datatracker.ietf.org/doc/html/rfc6749#page-23">scope
                    </a> for the OAuth2 token. Each separated by a space.
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="claimRoles" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets the name of the claim (in most cases "roles") that contains the roles in the token.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="claimSessionId" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Specifies the name of the claim (in most cases "sub") that contains the session ID in the token.
                        This must be a unique identifier that uniquely identifies the authenticated client (or user).
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="claimClientId" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets the name of the claim (in most cases "azp") that contains the client ID in the token.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="roleNameAdmin" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets the name of the role that grants administrative rights. This allows changing the default
                        "admin" value to a custom role name. This must match the content of the claim defined via
                        "claimRoles".
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="roleNameUser" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets the name of the role that grants normal user rights. This allows changing the default "user"
                        value to a custom role name. This must match the content of the claim defined via "claimRoles".
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="maxTimeSkew" default="0" type="xs:int">
            <xs:annotation>
                <xs:documentation>
                    <p>The maximum time skew that may occur between the local time on the server and the local time of
                        the issuer of the token.
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="OAuthProviderLogoutType">
        <xs:annotation>
            <xs:documentation>
                <p>Specifies the settings required to perform an OAuth2 logout.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="url" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets the URL that will be called when an OAuth2 is executed. This URL can contain the variables
                        <code>{redirectUrl}</code>
                        and <code>{clientId}</code>, whose values are automatically inserted by the server.
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="OAuthProvidersType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the settings for an OAuth2 provider that are required to validate the provider's tokens.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element name="provider" type="OAuthProviderType">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines the settings for an OAuth2 provider that are required to validate the provider's
                            tokens.
                        </p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:choice>
    </xs:complexType>
    <xs:complexType name="LocalAuthType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the local authorization provider that authenticates users and provides authorization tokens
                    for API access.
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:all>
            <xs:element name="soap" type="LocalAuthSoapType">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines the settings for accessing the server's SOAP API (web services).</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="rest" type="LocalAuthRestType">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines the settings for accessing the server's REST API (web services).</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:all>
        <xs:attribute name="enabled" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If enabled, the local authorization provider is available to authenticate the user login and
                        provide tokens for accessing the server API. If disabled, only external (e.g., OAuth) access
                        tokens are allowed for API calls.
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="LocalAuthSoapType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the settings for accessing the server's SOAP API (web services).</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="enabled" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If enabled, then the SOAP API is available.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="allowAnonymous" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If enabled, then anonymous logins (without a username and password) are allowed.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="LocalAuthRestType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the settings for accessing the server's REST API (web services).</p>
            </xs:documentation>
        </xs:annotation>
        <xs:all>
            <xs:element name="accessToken" type="SessionAccessTokenType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines the setting for access tokens provided by the server.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="refreshToken" type="SessionRefreshTokenType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines the setting for refresh tokens provided by the server.</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="limits" type="SessionLimitsType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines the restrictions and limits that apply when using the REST API and user sessions on
                            the server.
                        </p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:all>
        <xs:attribute name="enabled" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If enabled, then the REST API is available.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="allowAnonymous" default="true" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>If enabled, then anonymous logins (without a username and password) are allowed.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="maxTimeSkew" default="0" type="xs:int">
            <xs:annotation>
                <xs:documentation>
                    <p>The maximum time skew that may occur between the local time of the client and the local time of
                        the token issuer (the local server).
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="SessionAccessTokenType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the setting for access tokens provided by the server.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="expiration" default="3600">
            <xs:annotation>
                <xs:documentation>
                    <p>Number of seconds, before the token expires.</p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:int">
                    <xs:minInclusive value="10"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="SessionRefreshTokenType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the setting for refresh tokens provided by the server.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="expiration" default="43200">
            <xs:annotation>
                <xs:documentation>
                    <p>Number of seconds, before the token expires.</p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:int">
                    <xs:minInclusive value="10"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="SessionLimitsType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the restrictions and limits that apply when using the REST API and user sessions on the
                    server.
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="uploadLimit" default="0">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets the maximum size (in bytes) a file uploaded to the server may have (set to 0 to disable this
                        limitation).
                    </p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:int">
                    <xs:minInclusive value="0"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="uploadLimitUser" default="0">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets the maximum size (in bytes) a file uploaded by a single user may have (set to 0 to disable
                        this limitation).
                    </p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:int">
                    <xs:minInclusive value="0"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="maxFiles" default="0">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets the maximum number of files that may be uploaded to the server (set to 0 to disable this
                        limitation).
                    </p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:int">
                    <xs:minInclusive value="0"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="maxFilesUser" default="0">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets the maximum number of files a single user may upload to the server (set to 0 to disable this
                        limitation).
                    </p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:int">
                    <xs:minInclusive value="0"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="diskSpaceLimit" default="0">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets the overall global disk space (in bytes) the server may use (set to 0 to disable this
                        limitation).
                    </p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:int">
                    <xs:minInclusive value="0"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="diskSpaceLimitUser" default="0">
            <xs:annotation>
                <xs:documentation>
                    <p>Sets the maximum disk space (in bytes) a single user may use (set to 0 to disable this
                        limitation).
                    </p>
                </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:int">
                    <xs:minInclusive value="0"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="ConnectorConfigurationType">
        <xs:annotation>
            <xs:documentation>
                <p>
                    Allows setting the configuration values for the "HTTP Connector" as described in the <a
                        href="https://tomcat.apache.org/tomcat-10.1-doc/config/http.html">Tomcat manual</a>.
                    <ul>
                        <li>
                            <a href="https://tomcat.apache.org/tomcat-10.1-doc/config/http.html#Attributes">Attributes
                            </a>
                        </li>
                        <li>
                            <a href="https://tomcat.apache.org/tomcat-10.1-doc/config/http.html#SSL_Support_-_SSLHostConfig">
                                SSL Support - SSLHostConfig
                            </a>
                        </li>
                    </ul>
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="attribute" type="ConnectorAttributeType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="ConnectorAttributeType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines a single configuration setting via a name-value pair.</p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="name" type="xs:string">
            <xs:annotation>
                <xs:documentation>Defines the name of the configuration setting</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="value" type="xs:string">
            <xs:annotation>
                <xs:documentation>Defines the value of the configuration setting</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="HostValveType">
        <xs:attribute name="className" default="">
            <xs:annotation>
                <xs:documentation>
                    <p>The Java class name of the valve implementation to use.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:anyAttribute processContents="skip">
            <xs:annotation>
                <xs:documentation>
                    <p>Further attributes to be set for the <a
                            href="https://tomcat.apache.org/tomcat-8.5-doc/config/valve.html">valve</a>.
                    </p>
                </xs:documentation>
            </xs:annotation>
        </xs:anyAttribute>
    </xs:complexType>
    <xs:complexType id="hostFilterId" name="HostFilterType">
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element name="parameter" type="HostFilterParameterType">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines a parameter for the filter that consists of a <code>name</code> and a
                            <code>value</code>
                        </p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="mapping" type="HostFilterMappingType">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines the URL pattern assignment for the filter (e.g. "/*" for all URLs)</p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:choice>
        <xs:attribute name="className" default="">
            <xs:annotation>
                <xs:documentation>
                    <p>The Java class name of the filter implementation to use.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="HostFilterParameterType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines a parameter for the filter that consists of a <code>name</code> and a
                    <code>value</code>
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="name" type="xs:string"/>
            <xs:element name="value" type="xs:string"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="HostFilterMappingType">
        <xs:annotation>
            <xs:documentation>
                <p>Defines the URL pattern assignment for the filter (e.g. "/*" for all URLs)</p>
            </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="pattern" type="xs:string"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="HealthType">
        <xs:annotation>
            <xs:documentation>
                <p>Configures health endpoint management settings.</p>
                <p>If this element is absent, all management operations on health
                    endpoints are disabled (fail-closed).
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:all>
            <xs:element name="shutdown" type="HealthShutdownType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Configures Bearer Token authentication for the
                            <code>POST /health/shutdown</code> management endpoint
                            (Two-Phase Shutdown Phase 1).
                        </p>
                        <p>The endpoint is only accessible when a token is configured.
                            If this element is absent or no token is set, the endpoint
                            returns <code>404 Not Found</code>.
                        </p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:all>
    </xs:complexType>
    <xs:complexType name="HealthShutdownType">
        <xs:annotation>
            <xs:documentation>
                <p>Configures Bearer Token authentication for the
                    <code>POST /health/shutdown</code> management endpoint
                    (Two-Phase Shutdown Phase 1).
                </p>
                <p>The endpoint is activated by setting a non-empty token.
                    If no token is configured, the endpoint returns <code>404 Not Found</code>.
                </p>
                <p>Primary token source: XML attribute <code>token</code>.</p>
                <p>Override via environment variable <code>WEBPDF_HEALTH_SHUTDOWN_TOKEN</code>
                    or system property <code>webpdf.health.shutdown.token</code>
                    (takes precedence over XML value).
                </p>
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="token" default="" type="xs:string">
            <xs:annotation>
                <xs:documentation>
                    <p>The Bearer token required to access the
                        <code>POST /health/shutdown</code> endpoint.
                    </p>
                    <p>Setting a non-empty token activates the endpoint.
                        Without a token the endpoint returns <code>404 Not Found</code>.
                    </p>
                    <p>Can be overridden via environment variable
                        <code>WEBPDF_HEALTH_SHUTDOWN_TOKEN</code>
                        or system property <code>webpdf.health.shutdown.token</code>.
                    </p>
                    <p>Use a strong random token (e.g., 32+ characters) in production environments.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="HostCspType">
        <xs:sequence minOccurs="0">
            <xs:element name="headerValue" type="xs:string" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        <p>Defines the value for the HTTP header <code>Content-Security-Policy</code>.
                            Use <code>${nonce}</code> to insert a nonce value from the server for the entry <code>'nonce-...'</code>.
                        </p>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="enabled" default="false" type="xs:boolean">
            <xs:annotation>
                <xs:documentation>
                    <p>When set to true, the CSP is activated. The HTTP header "Content-Security-Policy" is added, and a "nonce" is added to the required resources.</p>
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
</xs:schema>