Giter Club home page Giter Club logo

certificate-authority's Introduction

Initial Certificate Authority configuration

This repo contains a certificate authority that runs standalone in a Docker container. To build the container, run build-container.sh. This is configurable to select the version of the Smallstep CLI and CA tools to install. When you first start the container, an initial setup process will run to create the necessary root certificate and key material, and configure the provisioner for using G Suite for user authentication out of the box.

To set this up, before you run the container for the first time, check out the files in the secrets.example/folder, configure them for your domain's settings, and place the resulting configured files in a new folder named secrets/. Do not commit the material in the secrets/ folder to revision control!.

Once configured, you can start up the container using the included docker-compose configuration file by typing the following:

docker-compose up

This should start up, go through the initial CA configuration, and print the fingerprint of the root certificate to the screen. Save this, as you'll need it for all of the client and SSH host setup to follow.

For more information (and the source of most of the code here), please see this Smallstep tutorial.

SSH host configuration

On machines that wil be logged into remotely via SSH, use the init_ssh_host.sh script in the repository to provision them. This script must be run as root.

When running init_ssh_host.sh, you'll have to select a provisioner to use for the initial key provisioning. For the default provisioner, the password to use is the one provided at CA setup time via the secrets/rootcert_pass.txt configuration file. Production deployments will use their own provisioner setups, the details of which are site-specific and beyond the scope of this README.

User configuration

On user machines, install the ssh-agent binary and keychain package.

In the user's .bashrc or similar file, add the following:

# ssh-agent setup
eval $(keychain --systemd --quick --quiet)

Then, to get a user certificate for ssh login, just run the following command, replacing <username> with the G Suite e-mail address for the user.

step ssh login <username>

certificate-authority's People

Contributors

dicta avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.