All Projects → Cloud-Foundations → keymaster

Cloud-Foundations / keymaster

Licence: Apache-2.0 License
Short term certificate based identity system (ssh/x509 ca + openidc)

Programming Languages

go
31211 projects - #10 most used programming language
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to keymaster

Mkchain
Open source tool to help you build a valid SSL certificate chain.
Stars: ✭ 307 (+420.34%)
Mutual labels:  certificates, ssl-certificates
Certify
SSL Certificate Manager UI for Windows, powered by Let's Encrypt. Download from certifytheweb.com
Stars: ✭ 1,075 (+1722.03%)
Mutual labels:  certificates, ssl-certificates
Getaltname
Extract subdomains from SSL certificates in HTTPS sites.
Stars: ✭ 320 (+442.37%)
Mutual labels:  certificates, ssl-certificates
Authelia
The Single Sign-On Multi-Factor portal for web apps
Stars: ✭ 11,094 (+18703.39%)
Mutual labels:  u2f, totp
acmed
ACME (RFC 8555) client daemon
Stars: ✭ 121 (+105.08%)
Mutual labels:  certificates, ssl-certificates
Ssl Proxy
🔒 Simple zero-config SSL reverse proxy with real autogenerated certificates (LetsEncrypt, self-signed, provided)
Stars: ✭ 427 (+623.73%)
Mutual labels:  certificates, ssl-certificates
jota-cert-checker
Check SSL certificate expiration date of a list of sites.
Stars: ✭ 45 (-23.73%)
Mutual labels:  certificates, ssl-certificates
Letscertbot
Let's Certbot is a tool builds automated scripts base on Certbot for obtaining, renewing, deploying SSL certificates.
Stars: ✭ 84 (+42.37%)
Mutual labels:  certificates, ssl-certificates
rx-otp
HMAC-based (HOTP) and Time-based (TOTP) One-Time Password manager. Works with Google Authenticator for Two-Factor Authentication.
Stars: ✭ 79 (+33.9%)
Mutual labels:  u2f, totp
2FAuth
A Web app to manage your Two-Factor Authentication (2FA) accounts and generate their security codes
Stars: ✭ 664 (+1025.42%)
Mutual labels:  totp, 2factor
Project03-A-TOTP
TOTP를 이용한 인증관리 Web/App 서비스, '다다익선'
Stars: ✭ 28 (-52.54%)
Mutual labels:  totp, 2factor
kagi
WebAuthn security keys and TOTP multi-factor authentication for Django
Stars: ✭ 17 (-71.19%)
Mutual labels:  u2f, totp
traefik-proxy
One-step (secure) configuration for Traefik edge router.
Stars: ✭ 20 (-66.1%)
Mutual labels:  u2f, totp
twothy
Two factor authenticator for CLI
Stars: ✭ 39 (-33.9%)
Mutual labels:  2factor
openssl-toolkit
This is an OpenSSL certificate toolkit, a simple cli utility leveraging OpenSSL's CLI for Linux.
Stars: ✭ 29 (-50.85%)
Mutual labels:  certificates
u2fdemo
U2F Demo and Debugger
Stars: ✭ 23 (-61.02%)
Mutual labels:  u2f
prathimacode-hub
Hello everyone, Welcome to my GitHub README profile. Glad to see you here! Check out this repository to view my work and learn more about me. Don't just star it, fork it as well.📢✌️
Stars: ✭ 53 (-10.17%)
Mutual labels:  certificates
letsencrypt-to-vault
Renew or get Let's Encrypt certificates and send it to Hashicorp Vault
Stars: ✭ 84 (+42.37%)
Mutual labels:  certificates
OneTime
iOS, watchOS, & macOS One-Time Password client
Stars: ✭ 14 (-76.27%)
Mutual labels:  totp
certificates
🎓 Generate event certificates easily
Stars: ✭ 50 (-15.25%)
Mutual labels:  certificates

Keymaster

Build Status Coverage Status Go Report Card

Keymaster is usable short-term certificate based identity system. With a primary goal to be a single-sign-on (with optional second factor with Symantec VIP, U2F tokens or TOTP compatible apps (FreeOTP/google authenticator ) ) for CLI operations (both SSHD and TLS).

As a secondary role keymaster is compliant openidc provider intended for easy use for internal web based applications.

This system is easy to use, configure and administer. Keymaster has the following components:

  • keymasterd is the server-side daemon that runs the management interface, logs web interface and the functionality which generates the short term certificates.
  • keymaster is the agent used to obtain the short-term certificates from the server (keymasterd)
  • keymaster-eventmon is a daemon used to monitor a cluster of Keymaster clients. It uses GRPC to collects authentication and certificate issuing activity to a single log file that can be retrieved from a single place (combining Keymaster logs with system logs (syslog) to verify all certificates uses (for at least SSH) can be attributed back to a specific Keymaster session is on the roadmap.
  • keymaster-unlocker is use to ‘unseal’ the Keymaster when initialized with an encrypted CA. keymaster-unlocker requires a client side certificate that is signed by the adminCA.

From the user's perspective a single command is needed with no flags (after the first run). After running the client command successfully users get a 16h (or less) SSH and TLS certificates. On systems with a running ssh-agent the command also injects the certificate (with matching expiration time) so that no other interaction is needed to start using it with SSH.

For the service operators it requires adding the Keymaster certificates to the set of trusted certificates.

In general, the relationship between components is shown here:

keymaster-keymasterd interaction image

Please see the design document for more information.

Getting Started

Pre-build binaries (both RPM and DEB) can be found here: releases page or you can build it from source (please see instructions below). The RPM and DEB packages contain both server and client binaries. The tarballs only contain the client binaries.

Building from Source

Prerequisites

  • go >= 1.13
  • make
  • gcc

For Windows (both gcc and gnu-make) use: TDM-GCC (64 bit).

Building

  1. make get-deps
  2. make

The make process will build the four binaries (keymasterd, keymaster, keymaster-unlocker, and keymaster-eventmond) described above.

Running

Once you've installed (or compiled) the binaries follow the following instructions to setup a Keymaster environment

keymasterd (server)

The keymasterd service runs the following services:

  • Service Web Interface (default port 443): Access to the web interface running on port 443 (default) can be granted via LDAP or apache username/password files. For password backend Keymaster supports LDAP backends and apache password files.
  • Admin Management Interface (default port 6920): The service exposed on port 6920 allows administrators or log collection systems to collect logs generated by the keymasterd service.

To run keymasterd you will need to generate a config file. keymasterd facilitates this through the command-line arguments -generateConfig and -alsoLogToStderr. Running the keymasterd binary with these arguments will generate the following:

  • A configuration file. By default keymasterd will write this file to /etc/keymaster/config.yml.
  • The Keymaster CA key pair. The encrypted private key (masterkey.asc) is an armored PGP file. For development (or if your trust model permits it) you can decrypt the private-key and write it to the filesystem. To decrypt the key run gpg -ad $Filename. Once decrypted set the ssh_ca_filename field in the keymasterd config file to the path of the decrypted master key.
  • Server keys (for Testing Purposes only): the server.pem and server.key (self-signed for localhost)
  • Admin CA certificate and key: The admin CA certificate (adminCA.pem) and key (adminCA.key) are used to generate certificates that grant access to the control port of the keymasterd management interface (default port 443).

Notice: Keymaster has a bug where the directory locations are not written correctly to the config file. Depending on the platform you're running Keymaster on the following workaround will apply:

  • RPM (CentOS): Modify the following configuration items in your config.yml file:
    • data_directory: /var/lib/keymaster
    • shared_data_directory: /usr/share/keymasterd/.
  • DEB (Debian/Ubuntu): Modify the following configuration items in your config.yml file:
    • data_directory: /var/lib/keymaster
    • shared_data_directory: /usr/share/keymasterd/.
Supported backend authentication methods

Several authentication methods are supported by the keymasterd service. You can separately specify which authentication methods you accept for the web backend (allowed_auth_backends_for_webui) and for obtaining certificates (allowed_auth_backends_for_certs).

  • LDAP: For LDAP the bind_pattern is a printf string where %s is the place where the username will be substituted. For example for an 389ds/openldap string might be: "uid=%s,ou=People,dc=example,dc=com. To leverage LDAP authentication set the appropriate allowed_auth_* setting to ["ldap"].
  • Apache htpass: The passfile.htpass file contains the usernames and their passwords allowed to access the keymasterd web interface. New users can be added via the following command: htpasswd -B /etc/keymaster/passfile.htpass <username>. htpasswd is distributed via the httpd-tools package. Keymaster will only accept htpass files that store BCRYPT encrypted credentials. To use Apache password files to authenticate users to the web interface set the following configuration item: allowed_auth_* to ["password"]
  • U2F tokens: To enable U2F tokens set set the appropriate allowed_auth_* setting to `["U2F"]``
  • VIP Manager: To enable VIP Manager set set the appropriate allowed_auth_* setting to ["SymantecVIP"]
Credential and Token Storage

Keymaster supports SQLite and PostgreSQL to store u2f tokens or username and passwords. The storage_url field in config.yml contains the connection information for the database. If no storage_url is defined Keymaster will use an SQLite database located in the configured data directory for Keymaster. An example of a PostgreSQL url is: postgresql://dbusername:dbpassword.example.com/keymasterdbname

Openid Connect IDP

To use keymasterd as an openid connect IDP please consult the documents here

keymaster-unlocker

The keymaster-unlocker binary allows you to 'unseal' the Keymaster environment. This binary requires a client side certificate signed by the adminCA.

keymaster (client)

The first time you run the client it requires you to specify the Keymaster server with the option -configHost. The client will connect, retrieve and store the configuration from the server. Keymaster will always use TLS. For testing you can use the -rootCAFilename option to specify a (e.g self signed) certificate for testing. The Keymaster clients will use the running OS CA store by default.

Your certificate will be created in the home directory of the user that is running the keymaster command.

Note: Your username on your target (SSH) host and the username used to authenticate to the Keymaster server should be the same.

Contributions

All contributions must be unencumbered. It is the responsibility of the contributor to ensure compliance with all laws, copyrights, patents and contracts.

LICENSE

Copyright 2016-2019 Symantec Corporation.

Copyright 2019-2021 Cloud-Foundations.org

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License.

You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Versioning

Keymaster versions follow the Sementic Versioning guidelines.

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].