<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rbcs:server xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
             xmlns:rbcs="urn:net.woggioni.rbcs.server"
             xs:schemaLocation="urn:net.woggioni.rbcs.server jpms://net.woggioni.rbcs.server/net/woggioni/rbcs/server/schema/rbcs-server.xsd">
    <bind host="127.0.0.1" port="11443" incoming-connections-backlog-size="180"/>
    <connection
            read-idle-timeout="PT10M"
            write-idle-timeout="PT11M"
            idle-timeout="PT30M"
            max-request-size="4096"
            chunk-size="0xa91f"/>
    <event-executor use-virtual-threads="false"/>
    <cache xs:type="rbcs:inMemoryCacheType" max-age="P7D"/>
    <authorization>
        <users>
            <user name="user1" password="password1">
                <quota calls="3600" period="PT1H"/>
            </user>
            <user name="user2" password="password2"/>
            <user name="user3" password="password3"/>
            <anonymous>
                <quota calls="10" period="PT1M"/>
            </anonymous>
        </users>
        <groups>
            <group name="readers">
                <users>
                    <user ref="user1"/>
                    <anonymous/>
                </users>
                <roles>
                    <reader/>
                </roles>
                <user-quota calls="30" period="PT1M"/>
                <group-quota calls="10" period="PT1S"/>
            </group>
            <group name="writers">
                <users>
                    <user ref="user2"/>
                </users>
                <roles>
                    <writer/>
                </roles>
            </group>
            <group name="readers-writers">
                <users>
                    <user ref="user3"/>
                </users>
                <roles>
                    <reader/>
                    <writer/>
                </roles>
                <group-quota calls="1000" period="P1D"/>
            </group>
        </groups>
    </authorization>
    <authentication>
        <client-certificate>
            <group-extractor pattern="group-pattern" attribute-name="O"/>
            <user-extractor pattern="user-pattern" attribute-name="CN"/>
        </client-certificate>
    </authentication>
    <tls>
        <keystore file="keystore.pfx" key-alias="key1" password="password" key-password="key-password"/>
        <truststore file="truststore.pfx" password="password" check-certificate-status="true" require-client-certificate="true"/>
    </tls>
</rbcs:server>