All Projects → codica2 → rails-puma-ssl

codica2 / rails-puma-ssl

Licence: other
🔐 Easy way to start using SSL in development

Projects that are alternatives of or similar to rails-puma-ssl

Letsencrypt Rails Heroku
Automatic LetsEncrypt SSL certificates in your Rails app on Heroku.
Stars: ✭ 223 (+486.84%)
Mutual labels:  ssl-certificate
SimpleSockets
Asynchronous TCP .NET library with reliable transmission and receipt of data, with an ssl implementation.
Stars: ✭ 74 (+94.74%)
Mutual labels:  ssl-support
SuperSimpleTcp
Simple wrapper for TCP client and server in C# with SSL support
Stars: ✭ 263 (+592.11%)
Mutual labels:  ssl-support
Vaser
Vaser is a powerful high performance event based network engine library for C# .Net. It’s possible to start multiple servers in one program and use the same network code for all servers. In the network communication are all strings are omitted, instead it is based on a unique binary identifier, which the CPU and memory relieves massively.
Stars: ✭ 23 (-39.47%)
Mutual labels:  ssl-support
MailDemon
Smtp server for mass emailing, managing email lists and more. Built on .NET Core. Linux, MAC and Windows compatible.
Stars: ✭ 113 (+197.37%)
Mutual labels:  ssl-certificate
dockerize-rails-projects
Different ways to use Docker with Rails Application.
Stars: ✭ 15 (-60.53%)
Mutual labels:  puma
Ssl exporter
Exports Prometheus metrics for SSL certificates
Stars: ✭ 211 (+455.26%)
Mutual labels:  ssl-certificate
dockerizing-django
🐳 Dockerize your Django application.
Stars: ✭ 27 (-28.95%)
Mutual labels:  ssl-certificate
puma-status
Command-line tool for puma to display information about running request/process... Fork of https://github.com/dimelo/puma-helper/ in ruby.
Stars: ✭ 108 (+184.21%)
Mutual labels:  puma
RRQMSocket
TouchSocket是.Net(包括 C# 、VB.Net、F#)的一个整合性的、超轻量级的网络通信框架。包含了 tcp、udp、ssl、http、websocket、rpc、jsonrpc、webapi、xmlrpc等一系列的通信模块。一键式解决 TCP 黏分包问题,udp大数据包分片组合问题等。使用协议模板,可快速实现「固定包头」、「固定长度」、「区间字符」等一系列的数据报文解析。
Stars: ✭ 286 (+652.63%)
Mutual labels:  ssl-support
Restbed
Corvusoft's Restbed framework brings asynchronous RESTful functionality to C++14 applications.
Stars: ✭ 1,551 (+3981.58%)
Mutual labels:  ssl-support
jpl-space-calendar
An app for parsing and publishing the JPL Space Calendar in JSON and ICalendar formats.
Stars: ✭ 13 (-65.79%)
Mutual labels:  puma
letsencrypt-fast
The fastest way to test/generate/renew Let's Encrypt SSL certificates!!! Requires root access and a live webserver to run the script at.
Stars: ✭ 25 (-34.21%)
Mutual labels:  ssl-certificate
Meterpreter paranoid mode Ssl
Meterpreter Paranoid Mode - SSL/TLS connections
Stars: ✭ 247 (+550%)
Mutual labels:  ssl-certificate
running-redmine-on-puma
running redmine on puma installation tutorial (Ubuntu/MySQL)
Stars: ✭ 20 (-47.37%)
Mutual labels:  puma
Gke Managed Certs
Managed Certificates for Kubernetes clusters using GCLB
Stars: ✭ 214 (+463.16%)
Mutual labels:  ssl-certificate
yabeda-puma-plugin
Collects Puma web-server metrics from puma control panel
Stars: ✭ 62 (+63.16%)
Mutual labels:  puma
sinator
Sinatra application generator
Stars: ✭ 19 (-50%)
Mutual labels:  puma
Intranet-Lets-Encrypt-Certification
Guide to setting up a Let's Encrypt SSL certificate for a non-public facing server.
Stars: ✭ 27 (-28.95%)
Mutual labels:  ssl-certificate
laravel-lets-encrypt
Let's Encrypt wrapper for Laravel
Stars: ✭ 112 (+194.74%)
Mutual labels:  ssl-certificate

How to use self-signed SSL certificate for local development on Rails

SSL (Secure Sockets Layer) is the standard security technology for establishing an encrypted link between a web server and a browser.

In short

$> openssl req -x509 -sha256 -nodes -newkey rsa:2048 -days 365 -keyout localhost.key -out localhost.crt
$> rails s -b 'ssl://localhost:3000?key=localhost.key&cert=localhost.crt'

Why you may need SSL in development?

Check this tweet to find the answer.

Short summary:

  • No mixed-content warnings
  • Using features / third-party integrations that require SSL
  • URL logic (routing, history, redirects)

Let's rock

Firstly, start the server and make sure that the HTTPS connection is not established.

$> rails s

=> Booting Puma
=> Rails 5.2.3 application starting in development
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.12.1 (ruby 2.5.1-p57), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:3000
Use Ctrl-C to stop

Browser:

Puma logs:

---
x: HTTP parse error, malformed request (): #<Puma::HttpParserError: Invalid HTTP format, parsing fails.>
---

Step one: generate the cert

$> openssl req -x509 -sha256 -nodes -newkey rsa:2048 -days 365 -keyout localhost.key -out localhost.crt

NOTE: you can change days parameter (365) for any number to affect the expiration date.

You will be provided with some information fields to fill in about country key, email, etc. However, you can skip this step. This command will create two new files localhost.key and localhost.crt in the current directory. You can move these files anywhere.

Step two: run a server with the certificate

$> rails s -b 'ssl://localhost:3000?key=localhost.key&cert=localhost.crt'

=> Booting Puma
=> Rails 5.2.3 application starting in development
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.12.1 (ruby 2.5.1-p57), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: development
* Listening on ssl://localhost:3000?key=localhost.key&cert=localhost.crt
Use Ctrl-C to stop

Browser:

NOTE: Firstly, click 'ADVANCED' (i) and then 'Proceed to localhost (unsafe)' (ii).

Puma logs:

...

Started GET "/" for ::1 at 2019-04-16 16:02:11 +0300
Processing by Rails::WelcomeController#index as HTML
  Rendering rails/templates/rails/welcome/index.html.erb
  Rendered rails/templates/rails/welcome/index.html.erb (2.6ms)
Completed 200 OK in 6ms (Views: 4.7ms | ActiveRecord: 0.0ms)

...

License

Copyright © 2015-2019 Codica. It is released under the MIT License.

About Codica

Codica logo

We love open source software! See our other projects or hire us to design, develop, and grow your product.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].