0

我必须使用 nginx 作为使用安全 SSL 连接的 API 管理器安装的代理。关于如何配置所有以使其工作的任何提示?

谢谢

卢卡

4

2 回答 2

0

Current version of API manager doesnt support "https" endpoints...We have that in our roadmap and will fix that in future release. But you can use ESB between APIManager and your backend service to route the request

于 2012-11-14T11:53:12.780 回答
0

从 WSO2 API Manager 版本 1.3.0 开始,添加了对调用安全后端服务的支持。请参阅下面调用安全后端服务的示例 API 的突触配置。目前支持仅适用于通过基本身份验证保护的服务。

<api xmlns="http://ws.apache.org/ns/synapse" name="admin--SecuredAPI" context="/secure" version="1.0.0" version-type="url"> 
    <resource methods="POST GET OPTIONS DELETE PUT" url-mapping="/*"> 
        <inSequence> 
            <property name="Authorization" expression="fn:concat('Basic ', base64Encode('username:password'))" scope="transport"/> 
            <property name="POST_TO_URI" value="true" scope="axis2"/> 
            <filter source="$ctx:AM_KEY_TYPE" regex="PRODUCTION"> 
                <then> 
                    <send> 
                        <endpoint name="admin--SecuredAPI_APIEndpoint_0"> 
                            <address uri="https://securebackend.com/search"> 
                                <timeout> 
                                    <duration>30000</duration> 
                                    <responseAction>fault</responseAction> 
                                </timeout> 
                                <suspendOnFailure> 
                                    <errorCodes>-1</errorCodes> 
                                    <initialDuration>0</initialDuration> 
                                    <progressionFactor>1.0</progressionFactor> 
                                    <maximumDuration>0</maximumDuration> 
                                </suspendOnFailure> 
                                <markForSuspension> 
                                    <errorCodes>-1</errorCodes> 
                                </markForSuspension> 
                            </address> 
                        </endpoint> 
                    </send> 
                </then> 
                <else> 
                    <sequence key="_sandbox_key_error_"/> 
                </else> 
            </filter> 
        </inSequence> 
        <outSequence> 
            <send/> 
        </outSequence> 
    </resource> 
    <handlers> 
        <handler class="org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler"/> 
        <handler class="org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageHandler"/> 
        <handler class="org.wso2.carbon.apimgt.usage.publisher.APIMgtGoogleAnalyticsTrackingHandler"/> 
        <handler class="org.wso2.carbon.apimgt.gateway.handlers.throttling.APIThrottleHandler"> 
            <property name="id" value="A"/> 
            <property name="policyKey" value="gov:/apimgt/applicationdata/tiers.xml"/> 
        </handler> 
        <handler class="org.wso2.carbon.apimgt.gateway.handlers.ext.APIManagerExtensionHandler"/> 
    </handlers> 
</api> 

谢谢,努万。

于 2013-03-05T03:09:51.317 回答