I can set my backend endpoint dynamically within my API Proxy logic by setting variables such as target.url. This is great. But what if my dynamic endpoint change requires me to change my SSL settings as well? Specifically, I need to switch to mutual auth for certain endpoints, and thus need to change the SSLInfo settings (Keystore, Trustore, KeyAlias, ClientAuthEnabled). Is this possible?
Dear @WILLIT51,
You can set the SSL settings dynamically through variables with the help of a new feature introduced in the latest version of Edge for Cloud. Refer to more details about this in the section âSSLInfo variables in TargetEndpoint configurationsâ in the Releases Notes
Regards,
Amar
The docs will also be updated with the new info this week.
Wow! Was that question well timed or what? ![]()
I might be missing something, but it isnât working for me. (Yes, I am using Edge for Cloud).
I have my Target Endpoint defined as follows:
<HTTPTargetConnection>
<URL>https://default.com</URL>
<SSLInfo>
<Enabled>{myvars.ssl.enabled}</Enabled>
<ClientAuthEnabled>{myvars.ssl.client.auth.enabled}</ClientAuthEnabled>
<KeyStore>{myvars.ssl.keystore}</KeyStore>
<KeyAlias>{myvars.ssl.keyAlias}</KeyAlias>
<TrustStore>{myvars.ssl.trustStore}</TrustStore>
</SSLInfo>
</HTTPTargetConnection>
âŚand I have an AssignMessage policy that sets these variables, along with the target url:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AssignMessage async="false" continueOnError="false" enabled="true" name="Set-Target">
...
<AssignVariable>
<Name>target.url</Name>
<Value>https://apigwrouter.acme.com/apigwRouter</Value>
</AssignVariable>
<AssignVariable>
<Name>myvars.ssl.enabled</Name>
<Value>true</Value>
</AssignVariable>
<AssignVariable>
<Name>myvars.ssl.client.auth.enabled</Name>
<Value>true</Value>
</AssignVariable>
<AssignVariable>
<Name>myvars.ssl.keystore</Name>
<Value>keystore-apigwrouter</Value>
</AssignVariable>
<AssignVariable>
<Name>myvars.ssl.keyAlias</Name>
<Value>apigwrouter</Value>
</AssignVariable>
<AssignVariable>
<Name>myvars.ssl.trustStore</Name>
<Value>truststore-apigwrouter</Value>
</AssignVariable>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
<AssignTo createNew="false" transport="http" type="request"/>
</AssignMessage>
âŚbut I canât even deploy it. I get this error:
Error in deployment for environment dev. The revision is deployed, but traffic cannot flow. Security store {myvars.ssl.trustStore} is not configured in environment dev
When I define these items statically, everything works, so the problem isnât my keystores.
What am I missing?
I think something is wrong with the setting. If I remove this line from SSLInfo, it at least deploys. Could you double-check that variable name â {myvars.ssl.trustStore}?
Dear @WILLIT51,
I tried in my Cloud org with your code as is and I was able to deploy the API Proxy without any issues. Can you please provide the org name, API bundle name where you are seeing this issue ? This will help me to investigate the problem that you are seeing.
Regards,
Amar
@Amar, take a look at proxy âIAM_2â within org ânwieâ. âIAM_1â and âIAM_2â are functionally equivalent, however âIAM_2â tries to set the SSLInfo variables dynamically.
Dear @WILLIT51,
I checked your proxy and everything seemed to be fine. Infact I tried this in my org and the deployment worked fine. Later I checked and found that the new release is not completely deployed in all the regions. My org has already got the new code and hence it is working fine. For your org, I have checked with our release team and understand that the new release will be made available by the end of this week. So you can try this early next week.
I will update you as soon as the new release is made available for your org.
Thanks,
Amar
Dear @WILLIT51,
The new release has been deployed now for your org. I checked in your org and confirmed that your proxy âIAM_2â was successfully deployed in test environment. Infact, I undeployed and deployed the proxy again to re-confirm. It got deployed successfully again without any errors. Please verify at your end and let me know if everythingâs fine.
Thanks,
Amar
This does appear to be working now. Thanks, Amar!
This does seem to work now. Thanks!
I have a follow up question. What if my initial Target Endpoint uses HTTP, but the dynamic Target Endpoint (determined later) needs HTTPS?
Iâm finding that if I start with an HTTP endpoint as my default Target Endpoint and set the SSLInfo.Enabled to {myvars.ssl.enabled}, then later change {target.url} to a HTTPS endpoint and set {myvars.ssl.enabled} to true, it doesnât work. However it does work if I start with an HTTPS endpoint as my default Target Endpoint. It seems that it can handle dynamically changing SSL setting changes, but not switching from HTTP to HTTPS.
Dear @WILLIT51,
I will check on this and get back to you. But for better question/answer management, can you please post this in a separate community thread/question ?
Thanks
Amar