HTTPS Request/Response processing via Apama - apama

What additional setup is required to perform HTTPS call using HTTPClient adapter in Apama. I have used the host and port as 443. But still it is giving host not found error with status 400. The same https endpoint is working in POSTMAN , Browser and Integration Server. Please help.

You need to set 'tls' to true in the config for HTTPClient (see http://www.apamacommunity.com/documents/10.3.1.1/apama_10.3.1.1_webhelp/apama-webhelp/#page/apama-webhelp%2Fco-ConApaAppToExtCom_httpclient_configuring_the_http_client_transport.html%23 )
Or, if you're using the Generic HTTP EPL API, it's HttpTransport.getOrCreateWithConfigurations(host, port, {HttpTransport.CONFIG_TLS:"true"})
There's also tlsAcceptUnrecognizedCertificates and tlsCertificateAuthorityFile if you have a service that's not using a recognisable certificate.

Related

redirect http request to https on ION webRTC server

I am using (https://pionion.github.io/) for my streaming server. To run the server I am using its docker service. And I am getting access over 'HTTP' only. Now I want my request to 'HTTPS' (ex. https://ip-address:5551)
Is there any configuration file to do so? I need help here.

AWS API Gateway HTTP Proxy for HTTPS connections

I cannot for the life of me get the AWS API Gateway HTTP Proxy to work, i.e. redirect http://<my-domain>.com to https://<my-domain>.com. Here is how I set it up:
Using the Test functionality on the ANY method inside the resource works. But if I simply do curl http://<my-domain>.com or run http://<my-domain>.com in Chrome, it fails to connect; https://<my-website>.com works just fine. I'm driving myself crazy trying to figure out what I'm missing here; it seems like it should just redirect http://<my-domain>.com to https://<my-domain>.com, but it doesn't (even on different devices).
So, it turns out that API Gateway's HTTP Proxy allows HTTPS traffic to go to an HTTP endpoint, but not the reverse. In fact, API Gateway won't even establish a connection on port 80; from the FAQ:
Q: Can I create HTTPS endpoints?
Yes, all of the APIs created with Amazon API Gateway expose HTTPS
endpoints only. Amazon API Gateway does not support unencrypted (HTTP)
endpoints.
API Gateway doesn't support unencrypted HTTP traffic. Here are the possible options you can do to secure your website:
If you have access to the server that hosts the website, install an SSL certificate to the webserver.
If the website is hosted on EC2, you can set up a load balancer and let it do the SSL termination.

Custom endpoint path for AWS API Gateway WebSocket

I have created an API Gateway with Websocket protocol.
After I deploy the API, I get a WebSocket URL and a connection URL.
e.g.
WebSocket URL: wss://xxxx.execute-api.us-west-2.amazonaws.com/test
Connection URL: https://xxxx.execute-api.us-west-2.amazonaws.com/test/#connections
Now everything is fine, I am able to connect to the API, and send and receive messages.
But when I try to access a different path, I get an HTTP 403 error.
e.g. If I try to connect to wss://xxxx.execute-api.us-west-2.amazonaws.com/test/some/path
, I get 403 error.
Is it possible to configure API gateway in such a way that it accepts connections to all paths and passes on the path, i.e. /some/path in my case, to the $connect route handler?
This is not yet supported by AWS. See the article and comments here https://medium.com/#lancers/using-parameter-mapping-in-websocket-api-67b414376d5e
There is a workaround with using an additional server, author of the article proposes the following:
you may put your own server that accepts an URI with path parameters, then return 302 to redirect the client to the WebSocket API endpoint with query string instead.

Keycloak API execute-actions-email sending http email

I'm running Keycloak and it works great. The only thing I'd like to change is when the execute-actions-email API is called it sends the email but the link uses HTTP. I'd like it to be HTTPS. How does KC determine it should use HTTP? Is it because I made the API call over HTTP to trigger the request? Doe it get it from the client config?
It uses whatever protocol was used to make the RESTfull call; just connect to KC on port 8443 (default SSL port) and it'll send the email with a link that uses HTTPS.

Connect HttpResolver to API using custom port

Hello: I'm creating an Appsync endpoint to gradually upgrade all of our old Rest API to GraphQL. In our API we aggregate data from some third party services (also REST).
One of those services has an endpoint running in a custom port (let's say 8050) and while our initial idea was to use Appsync HTTP Resolvers to connect to it we've been experiencing timeout problems. Our provider says there is nothing wrong with it's service but I've searched Amazon Appsync docs and there's nothing there about ports.
Has anyone else experienced this issue and knows how to solve it?
Thanks in advance.
When configuring your HTTP Data source, you can append the port to the HTTP Endpoint URL. See below.
As of May 2021, I tried to specify the port number in HTTP Endpoint URL in the Data Source configuration UI, it didn't work. I still received the timeout error.
Since I have control to the HTTP API server, I changed the server to listen on port 80, removed port number from the datasource HTTP endpoint config, and things start to work. It seems as of now, appsync does not support listening on ports other than 80 for http.