Search code examples
wso2wso2-api-managerwso2-appm

WSO2 api manager and endpoint HTTPS


I am trying to connect to an endpoint with wso2 AM and I get the following error:

INFO - LogMediator STATUS = Executing default 'fault' sequence, ERROR_CODE = 303001, ERROR_MESSAGE = Currently , Address endpoint : [ Name : Proyecto2--v1.0.0_APIproductionEndpoint ] [ State : SUSPENDED ]

wso2am is on one server and the endpoint on another, this endpoint is done on node and is HTTPS with self-signed certificate.

I've also tried changing the endpoint to http://www.mocky.io/v2/5185415ba171ea3a00704eed and it works.

If I go directly to the endpoint by postman from my computer it works correctly.

  • both environments are development, so I do not have CA certificates
  • AM 3.1.0
  • the connection to the endpoint is not suspended by timeout, it is immediate (less than 2 second).

I have tried to get data from the wso2 server to the backend server with curl and it worked for me correctly adding "--insecure"


Solution

  • with self-signed certificate. I have uploaded the certificate through wso2 / publisher b

    I'm not sure where did you upload the certificate, but in the publisher it's usually the client keypair which is defined, not the endpoint server certificate (I'm not sure about the newest version)

    If the self-signed certificate is not trusted (in the client-truststore.jks) or the CN doesn't match the URL, the SSL connection will be denied.

    You may try

    #in deployment.toml file.
    [transport.passthru_https.sender.parameters]
    HostnameVerifier = "AllowAll"  
    

    In Axis2.xml https sender (if the configuration above is not reflected)

    <parameter name="HostnameVerifier">AllowAll</parameter>
    

    (that should ignore the SSL hostname validation, I do not recommend to do that for prod)