Git Product home page Git Product logo

codex's Introduction

codex

Go Reference

SSH certificates distribution infrastructure

Warning: codex is still under development

Scope

Managing SSH permissions on multiple servers through the authorized_keys file can become tedious when you have a large set of users. A common solution is to use OpenSSH certificates, which lets you authorize users without having to contact the targeted servers. However, manually assigning certificates can become tiresome, especially if you define short expiration times.

The goal of this project is to simplify the management of users while automating the distribution of certificates.

If you want to know more about OpenSSH certificates, I recomend starting with this article by Meta engineers.

Architecture

codex implements a client-server infrastructure where the server stores a list of users and serves certificates to the clients.

User data is stored on disk using bbolt, an embedded key-value store. Users are represented as an SSH public key (their primary key) and the attached informations are their expiration, principals and the serial number of the last delivered certificate. User data can be managed from a command line utility named codexctl.

The codex server which is named codexd will listen for SSH connections on port 3646 by default. Clients will authenticate through their public key, the server will look for the corresponding user in its database and will return a new and signed OpenSSH certificate.

This procedure can either be done through the standard ssh client as shown below:

$ ssh codex.example.org -p 3646

  ___  _____  ____  ____  _  _
 / __)(  _  )(  _ \( ___)( \/ )
( (__  )(_)(  )(_) ))__)  )  (
 \___)(_____)(____/(____)(_/\_)
                         v0.0.0
Hello user,
Here is your new certificate:

[email protected] [...]

Certificate details:

    Serial number: 42
    Expiration date: 08 Sep 22 11:43 CEST

Connection to localhost closed.

or using the codex utility which will automate the process of saving the new certificate in the user's keychain.

$ codex refresh foobar
Sucessfully updated your certificate at ~/.ssh/foobar-cert.pub

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.