<?xml version="1.0" encoding="UTF-8"?>
<exp:Export Version="3.0"
    xmlns:L7p="http://www.layer7tech.com/ws/policy"
    xmlns:exp="http://www.layer7tech.com/ws/policy/export" xmlns:wsp="http://schemas.xmlsoap.org/ws/2002/12/policy">
    <exp:References/>
    <wsp:Policy xmlns:L7p="http://www.layer7tech.com/ws/policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2002/12/policy">
        <wsp:All wsp:Usage="Required">
            <L7p:CommentAssertion>
                <L7p:Comment stringValue="***********************************************************************************************************"/>
            </L7p:CommentAssertion>
            <L7p:CommentAssertion>
                <L7p:Comment stringValue="* Policy to retrieve password from the secure password store and return in response"/>
            </L7p:CommentAssertion>
            <L7p:CommentAssertion>
                <L7p:Comment stringValue="* "/>
            </L7p:CommentAssertion>
            <L7p:CommentAssertion>
                <L7p:Comment stringValue="* Fails with a closed connection on the following conditions:"/>
            </L7p:CommentAssertion>
            <L7p:CommentAssertion>
                <L7p:Comment stringValue="*   - Request not made over SSL"/>
            </L7p:CommentAssertion>
            <L7p:CommentAssertion>
                <L7p:Comment stringValue="*   - Request not from localhost"/>
            </L7p:CommentAssertion>
            <L7p:CommentAssertion>
                <L7p:Comment stringValue="*   - Request password is not found in the Stored Passwords"/>
            </L7p:CommentAssertion>
            <L7p:CommentAssertion>
                <L7p:Comment stringValue="* "/>
            </L7p:CommentAssertion>
            <L7p:CommentAssertion>
                <L7p:Comment stringValue="* Jay MacDonald - 20220425"/>
            </L7p:CommentAssertion>
            <L7p:CommentAssertion>
                <L7p:Comment stringValue="***********************************************************************************************************"/>
            </L7p:CommentAssertion>
            <L7p:CustomizeErrorResponse>
                <L7p:AssertionComment assertionComment="included">
                    <L7p:Properties mapValue="included">
                        <L7p:entry>
                            <L7p:key stringValue="RIGHT.COMMENT"/>
                            <L7p:value stringValue="// Drop connection on failure - no error responses"/>
                        </L7p:entry>
                    </L7p:Properties>
                </L7p:AssertionComment>
                <L7p:ErrorLevel errorLevel="DROP_CONNECTION"/>
                <L7p:ExtraHeaders nameValuePairArray="included"/>
            </L7p:CustomizeErrorResponse>
            <L7p:SslAssertion>
                <L7p:AssertionComment assertionComment="included">
                    <L7p:Properties mapValue="included">
                        <L7p:entry>
                            <L7p:key stringValue="RIGHT.COMMENT"/>
                            <L7p:value stringValue="// Request MUST be over SSL"/>
                        </L7p:entry>
                    </L7p:Properties>
                </L7p:AssertionComment>
            </L7p:SslAssertion>
            <wsp:OneOrMore wsp:Usage="Required">
                <L7p:RemoteIpAddressRange>
                    <L7p:AssertionComment assertionComment="included">
                        <L7p:Properties mapValue="included">
                            <L7p:entry>
                                <L7p:key stringValue="RIGHT.COMMENT"/>
                                <L7p:value stringValue="// ipv6"/>
                            </L7p:entry>
                        </L7p:Properties>
                    </L7p:AssertionComment>
                    <L7p:NetworkMask stringValue="128"/>
                    <L7p:StartIp stringValue="::1"/>
                </L7p:RemoteIpAddressRange>
                <L7p:RemoteIpAddressRange>
                    <L7p:AssertionComment assertionComment="included">
                        <L7p:Properties mapValue="included">
                            <L7p:entry>
                                <L7p:key stringValue="RIGHT.COMMENT"/>
                                <L7p:value stringValue="// ipv4"/>
                            </L7p:entry>
                        </L7p:Properties>
                    </L7p:AssertionComment>
                    <L7p:NetworkMask stringValue="8"/>
                    <L7p:StartIp stringValue="127.0.0.0"/>
                </L7p:RemoteIpAddressRange>
                <L7p:assertionComment>
                    <L7p:Properties mapValue="included">
                        <L7p:entry>
                            <L7p:key stringValue="RIGHT.COMMENT"/>
                            <L7p:value stringValue="// Limit to localhost access"/>
                        </L7p:entry>
                    </L7p:Properties>
                </L7p:assertionComment>
            </wsp:OneOrMore>
            <wsp:OneOrMore wsp:Usage="Required">
                <wsp:All wsp:Usage="Required">
                    <L7p:ComparisonAssertion>
                        <L7p:CaseSensitive booleanValue="false"/>
                        <L7p:Expression1 stringValue="${request.http.parameter.p}"/>
                        <L7p:Operator operatorNull="null"/>
                        <L7p:Predicates predicates="included">
                            <L7p:item dataType="included">
                                <L7p:Type variableDataType="string"/>
                            </L7p:item>
                            <L7p:item binary="included">
                                <L7p:RightValue stringValue="dbadminpwd"/>
                            </L7p:item>
                        </L7p:Predicates>
                    </L7p:ComparisonAssertion>
                    <L7p:SetVariable>
                        <L7p:Base64Expression stringValue="JHtzZWNwYXNzLmRiYWRtaW5wd2QucGxhaW50ZXh0fQ=="/>
                        <L7p:VariableToSet stringValue="pwd"/>
                    </L7p:SetVariable>
                    <L7p:assertionComment>
                        <L7p:Properties mapValue="included">
                            <L7p:entry>
                                <L7p:key stringValue="RIGHT.COMMENT"/>
                                <L7p:value stringValue="// ${request.http.parameter.p} == 'dbadminpwd'"/>
                            </L7p:entry>
                        </L7p:Properties>
                    </L7p:assertionComment>
                </wsp:All>
                <wsp:All wsp:Usage="Required">
                    <L7p:ComparisonAssertion>
                        <L7p:CaseSensitive booleanValue="false"/>
                        <L7p:Expression1 stringValue="${request.http.parameter.p}"/>
                        <L7p:Operator operatorNull="null"/>
                        <L7p:Predicates predicates="included">
                            <L7p:item dataType="included">
                                <L7p:Type variableDataType="string"/>
                            </L7p:item>
                            <L7p:item binary="included">
                                <L7p:RightValue stringValue="dbreplpwd"/>
                            </L7p:item>
                        </L7p:Predicates>
                    </L7p:ComparisonAssertion>
                    <L7p:SetVariable>
                        <L7p:Base64Expression stringValue="JHtzZWNwYXNzLmRicmVwbHB3ZC5wbGFpbnRleHR9"/>
                        <L7p:VariableToSet stringValue="pwd"/>
                    </L7p:SetVariable>
                    <L7p:assertionComment>
                        <L7p:Properties mapValue="included">
                            <L7p:entry>
                                <L7p:key stringValue="RIGHT.COMMENT"/>
                                <L7p:value stringValue="// ${request.http.parameter.p} == 'dbreplpwd'"/>
                            </L7p:entry>
                        </L7p:Properties>
                    </L7p:assertionComment>
                </wsp:All>
                <L7p:assertionComment>
                    <L7p:Properties mapValue="included">
                        <L7p:entry>
                            <L7p:key stringValue="RIGHT.COMMENT"/>
                            <L7p:value stringValue="// Retrieve password for name set in ${request.http.parameter.p}, fail if not found"/>
                        </L7p:entry>
                    </L7p:Properties>
                </L7p:assertionComment>
            </wsp:OneOrMore>
            <L7p:HardcodedResponse>
                <L7p:AssertionComment assertionComment="included">
                    <L7p:Properties mapValue="included">
                        <L7p:entry>
                            <L7p:key stringValue="RIGHT.COMMENT"/>
                            <L7p:value stringValue="// 200 text/plain"/>
                        </L7p:entry>
                    </L7p:Properties>
                </L7p:AssertionComment>
                <L7p:Base64ResponseBody stringValue="JHtwd2R9"/>
                <L7p:ResponseContentType stringValue="text/plain; charset=UTF-8"/>
            </L7p:HardcodedResponse>
        </wsp:All>
    </wsp:Policy>
</exp:Export>
