I have the below configuration for the target end point
<HTTPTargetConnection>
<LoadBalancer>
<Algorithm>RoundRobin</Algorithm>
<Server name="Target-EndPoint-1"/>
<Server name="Target-EndPoint-2"/>
</LoadBalancer>
<Path>/test/path</Path>
</HTTPTargetConnection>
The Target Server was created as
curl {magmt url}/v1/o/{org_name}/e/{env_name}/targetservers -H "Content-Type:text/xml" -X POST -d \ '<TargetServer name="Target-EndPoint-1"> <Host>{host-name}</Host> <Port>8443</Port> <IsEnabled>true</IsEnabled> <SSLInfo> <Enabled>true</Enabled> <ClientAuthEnabled>true</ClientAuthEnabled> <KeyStore>{KeystoreName}</KeyStore> <KeyAlias>{KeyAlias}</KeyAlias> </SSLInfo> </TargetServer>' -v
When I access the service, from proxy the target is called using "http" - how do I make it to call via "https"?
Thanks in advance for the help.
Regards,
Pramod
Solved! Go to Solution.
@Pramod Your target endpoint should have something like this:
<HTTPTargetConnection> <Properties/> <SSLInfo> <Enabled>true</Enabled> </SSLInfo> <LoadBalancer> <Server name="micro-service-server"/> </LoadBalancer> <Path>/xx/yy/zz</Path> </HTTPTargetConnection>
Thank you @Sunandita Dam. I tried that earlier, sorry that I missed to put in the post, but still it shows that it is using the http protocol.
Below is the trace o/p:
Request sent to target server
Thank you @Sai Saran Vaidyanathan for the details! Yes, I am getting response. So I assume it is only the issue in trace UI. Appreciate the quick responses!
So when is this planned to be fixed as we are seeing this in our Apigee trace on our production service?
@Pramod @Sai Saran Vaidyanathan
It's not UI issue. I came across similar issue and my target was responding differently over https than http. When apigee hits backend I do see in trace that It's using http and getting response same as how it should respond on http and not https. I am sure that It's not trace UI issue.
The solution for this is not to create target server using UI. Through UI apigee does not have all the option as we can create target server through maven. I used below configuration to create target server and It's making call to target as https. It's working fine.
{ "name" : "{target}", "host" : "{hostname}", "isEnabled" : {true | false}, "port" : {port_num}, "sSLInfo": { "enabled": "true | false", "clientAuthEnabled": "true | false", "keyStore": "{keystore_name}", "trustStore": "{truststore_name}", "keyAlias": "{key_alias}", "ignoreValidationErrors": "true | false", "ciphers": [ "{cipher_1}", "{cipher_2}", ... ], "protocols": [ "{protocol_1}", "{protocol_2}", ...] } }
Note: If I create target server through UI and give SSL info in the target endpoint, It's not working and making call as http.
@Chirag Patel - the trace UI shows http even though the call is https. It is a Trace UI bug. Please check if the SSL info is enabled in the target server you configured (via the Mgmt API) and hope the port is not pointing to 80
User | Count |
---|---|
7 | |
2 | |
2 | |
2 | |
1 |