<?xml version="1.0" encoding="UTF-8"?>
<!--
 ~ Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com).
 ~
 ~ WSO2 LLC. licenses this file to you under the Apache License,
 ~ Version 2.0 (the "License"); you may not use this file except
 ~ in compliance with the License.
 ~ You may obtain a copy of the License at
 ~
 ~     http://www.apache.org/licenses/LICENSE-2.0
 ~
 ~ Unless required by applicable law or agreed to in writing,
 ~ software distributed under the License is distributed on an
 ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 ~ KIND, either express or implied. See the License for the
 ~ specific language governing permissions and limitations
 ~ under the License.
 -->

<Server xmlns="http://wso2.org/projects/carbon/open-banking.xml" xmlns:svns="http://org.wso2.securevault/configuration">
    <Gateway>
        <RequestRouter>com.wso2.openbanking.accelerator.gateway.executor.core.DefaultRequestRouter</RequestRouter>
        <!-- Custom Throttle Data publisher -->
        <CustomThrottleDataPublisher>com.wso2.openbanking.sample.throttling.publisher.SampleThrottlingDataPublisher</CustomThrottleDataPublisher>
        <OpenBankingGatewayExecutors>

        </OpenBankingGatewayExecutors>
        <ConsentValidationEndpoint>https://localhost:9446/api/openbanking/consent/validate</ConsentValidationEndpoint>
        <Cache>
            <GatewayCache>
                <CacheAccessExpiry>60</CacheAccessExpiry>
                <CacheModifiedExpiry>60</CacheModifiedExpiry>
            </GatewayCache>
        </Cache>
    </Gateway>
    <PublisherURL>https://localhost:9443</PublisherURL>
    <APIMAnalytics>
        <Enabled>false</Enabled>
    </APIMAnalytics>
    <DataPublishing>
        <Enabled>true</Enabled>
        <Username>admin</Username>
        <Password>admin</Password>
        <ServerURL>{tcp://localhost:7612}</ServerURL>
        <AuthURL></AuthURL>
        <!-- Allowed values: Thrift -->
        <Protocol>Thrift</Protocol>
        <PoolSize>10</PoolSize>
        <QueueSize>32768</QueueSize>
        <WorkerThreadCount>10</WorkerThreadCount>
        <PoolWaitTimeMs>60000</PoolWaitTimeMs>
        <OpenBankingDataPublisher>com.wso2.openbanking.accelerator.data.publisher.common.OBThriftDataPublisher</OpenBankingDataPublisher>
        <Thrift>
            <PublishingTimeout>2000</PublishingTimeout>
            <Streams>
                <APIInputStream>
                    <Attribute name="consentId" priority="1"/>
                    <Attribute name="consumerId" priority="2"/>
                    <Attribute name="clientId" priority="3"/>
                    <Attribute name="userAgent" priority="4"/>
                    <Attribute name="statusCode" priority="5"/>
                    <Attribute name="httpMethod" priority="6"/>
                    <Attribute name="responsePayloadSize" priority="7"/>
                    <Attribute name="electedResource" priority="8"/>
                    <Attribute name="apiName" priority="9"/>
                    <Attribute name="apiSpecVersion" priority="10"/>
                    <Attribute name="timestamp" priority="11"/>
                    <Attribute name="messageId" priority="12"/>
                </APIInputStream>
                <AuthenticationInputStream>
                    <Attribute name="userId" priority="1"/>
                    <Attribute name="authenticationStep" priority="2"/>
                    <Attribute name="authenticationStatus" priority="3"/>
                    <Attribute name="authenticationApproach" priority="4"/>
                    <Attribute name="psuChannel" priority="5"/>
                    <Attribute name="timestamp" priority="6"/>
                </AuthenticationInputStream>
            </Streams>
        </Thrift>
    </DataPublishing>
    <DCR>
        <APIMRESTEndPoints>
            <AppCreation>api/am/devportal/v2/applications</AppCreation>
            <KeyGeneration>api/am/devportal/v2/applications/application-id/map-keys</KeyGeneration>
            <RetrieveAPIS>api/am/devportal/v2/apis</RetrieveAPIS>
            <SubscribeAPIs>api/am/devportal/v2/subscriptions/multiple</SubscribeAPIs>
        </APIMRESTEndPoints>
        <TokenEndpoint>https://localhost:9446/oauth2/token</TokenEndpoint>
        <RegulatoryAPINames>
            <API></API>
        </RegulatoryAPINames>
        <JWKSEndpointName>jwks_uri</JWKSEndpointName>
        <JWKS-Retriever>
            <ConnectionTimeout>0</ConnectionTimeout>
            <ReadTimeout>0</ReadTimeout>
        </JWKS-Retriever>
    </DCR>
    <HTTPConnectionPool>
        <MaxConnections>2000</MaxConnections>
        <MaxConnectionsPerRoute>1500</MaxConnectionsPerRoute>
    </HTTPConnectionPool>
</Server>
