Giter VIP home page Giter VIP logo

icehack-certificates's Introduction

Icehack Certificates

Collection of TLS certificates to secure production instances of the Icehack virtual environment.

Overview

  • Let's Encrypt is used to generate short-lived, free, TLS certificates.
  • Multiple certificates are used, with 4 hostnames registered within each (except for 1-5 which has 5)

Requirements

  • Control of the icehack.bas.ac.uk sub-domain
  • An account (private) key for Let's Encrypt

Setup

  1. Create a virtual machine accessible on the public internet
  2. Download the ACME Tiny script to the VM
  3. Register the relevant series of subdomains to point to the VM (e.g. node1.icehack.bas.ac.uk)
  4. Upload account key to VM
  5. Create private key for certificate [1]
  6. Create a CSR for certificate [2]
  7. Create challenges directory [3]
  8. Install Nginx
  9. Replace default site [4]
  10. Register certificates [5]
  11. Download certificate, CSR and private key to localhost
  12. Build certificate trust chain [6]

[1]

openssl genrsa 4096 > nodes-01-05.icehack.bas.ac.uk.key

[2]

openssl req -new -sha256 -key nodes-01-05.icehack.bas.ac.uk.key -subj "/" -reqexts SAN -config <(cat /etc/ssl/openssl.cnf <(printf "[SAN]\nsubjectAltName=DNS:node1.icehack.bas.ac.uk,DNS:node2.icehack.bas.ac.uk,node3.icehack.bas.ac.uk,DNS:node4.icehack.bas.ac.uk,node5.icehack.bas.ac.uk")) > nodes-01-05.icehack.bas.ac.uk.csr

[3]

sudo mkdir -p /var/www/challenges/
sudo chmod 777 /var/www/challenges/

[4]

server {
    listen 80;
    server_name _;

    location /.well-known/acme-challenge/ {
        alias /var/www/challenges/;
        try_files $uri =404;
    }
}

[5]

python acme_tiny.py --account-key ./account.key --csr ./nodes-01-05.icehack.bas.ac.uk.csr --acme-dir /var/www/challenges/ > ./nodes-01-05.icehack.bas.ac.uk.crt

[6]

cat 01-05/nodes-01-05.icehack.bas.ac.uk.crt lets-encrypt-x1-cross-signed.pem > 01-05/nodes-01-05.icehack.bas.ac.uk-certificate-including-trust-chain.crt

Usage

Use certificates and private keys as normal.

Note: Ensure you suitably protect private key material.

Licence

Copyright 2016 NERC BAS.

Unless stated otherwise, all documentation is licensed under the Open Government License - version 3. All code is licensed under the MIT license.

Copies of these licenses are included within this project.

icehack-certificates's People

Contributors

felnne avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.