How to install Cloudflare Origin CA certificate on server Node.js - node.js

I am developing an application with Node.js to consume apis. I want to use Cloudflare protection services with my server, one of the services is SSL / TLS.
Is it possible to implement the "end to end" certificate that cloudflare gives in an application with Node.js?
I have the private key and origin key files that Cloudflare gives me for this.
Thx.

Related

Install AWS SSL Certificate to home server

I have a domain name bought from AWS, and can get SSl certificate from AWS ACM.
I could install the certificates to Load Balancer for EC2.
Now I am hosting a server at home, either a NodeJS app or Python Flask app.
How can I get the website to use https protocol?
How can I get the website to use https protocol?
Yes, you can, but not from AWS ACM. The SSL certificates from ACM can only be used on:
Elastic Load Balancing
Amazon CloudFront
Amazon API Gateway
For home server, you have to get a SSL certificate from a third party. A popular choice is https://letsencrypt.org/ which offers free public SSL certificates. But to register an SSL cert, you will need a DNS domain for your home server.

SSL integration for Node.js app behind AWS ELB

I have AWS instances (behind a load balancer) serving a Node.js / Express app for mobile clients. I would like to enable SSL for the API calls on this app. There are multiple tutorials on how to enhance my Express app to use SSL, but can can folks advise please what should be the ELB configuration in such a scenario?
Should I have the ELB listeners (both load-balancer side as well as instance-side) to be http (not https)? And then make the Node.js app use a certificate from say LetsEncrypt?
Or should I instead have the load balancer be https based (and thus have its own associated certificate from AWS Certificate Manager)? In that case, what happens to the LetsEncrypt certificate - do I still integrate that with the Node.js app?
Many thanks!
You would enable SSL on the load balancer and use an ACM certificate. You wouldn't need a SSL certificate on the NodeJS server unless you just want the communication between the ELB and the server to also be encrypted.

Hosting Nodejs RESTful web service using ssl certificate

I have developed a RESTful web service using Node.js. I want to host this service on my home PC which is having static IP(which can be access from internet). But I want to host this service using SSL. Note that my home PC is not associated with any internet domain. So I want to know how to host my Webservice using ssl on my home PC. Also I want to know where to buy ssl certificate and what type of certificate? Because most of the certificate authorities who sells certificate talking about ssl for website only.

Deploy https node express server to host website on AWS EC2

I'm quite new to this. I have a node-express https server that currently runs locally on my machine. My simple website runs on this https sever and make xmlhttp requests to consume some APIs (as these APIs only accept requests from https endpoint). At the moment I'm using a self signed SSL certificate.
I'd like to deploy the server with html, js files to EC2 and make it accessible to the public. My questions are
Can I use AWS Certificate Manager to generate a SSL certificate, and how to use it with node-express server? Can node-express use this SSL certificate on EC2? or do I need to use this SSL certificate with Elastic Beanstalk and ELB?
I did some research but the ACM documentation said an email will be sent to the registered domain owner for each domain name in the certificate request. I don't have a domain as I plan to have users access my site using IP address. What do I do in this case?
Many thanks for your help!
You can't use an ACM certificate directly with NodeJS. You have to place a load balancer in front of your server and install the ACM certificate on the load balancer.
The ACM service does not support SSL certificates for IP addresses, only domain names. I recommend obtaining a domain name.

SSL Client Authentication in Openshift with Custom SSL Certificate

Is it possible to use SSL Client Authentication in a Node.js application in OpenShift?
Now that OpenShift supports Custom SSL Certificates (SNI based) from 0$ in its bronze plan, it could be attractive to switch to the bronze plan. However it seems like the client certificate could not be accessed from the application (i.e. node.js). Or is there some hidden flag I'm missing?
The SSL certificate is actually hosted on an apache reverse proxy on the node, and is not accessible from your gear. You can look for the x-forwarded-proto header to see if the request is an https request or not.

Resources