All Projects → chanzuckerberg → blessclient

chanzuckerberg / blessclient

Licence: MIT license
Go client to negotiate SSH certificates

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to blessclient

Routinator
An RPKI Validator written in Rust
Stars: ✭ 215 (+270.69%)
Mutual labels:  certificate, rsync
Sync
syncs your local folder with remote folder using scp
Stars: ✭ 293 (+405.17%)
Mutual labels:  rsync, scp
java6-to-java8
Guia para ajudar devs Java atualizarem sua certificação Java 6 para Java 8.
Stars: ✭ 42 (-27.59%)
Mutual labels:  certificate
proofable-image
Build trust into your image by creating a blockchain certificate for it
Stars: ✭ 17 (-70.69%)
Mutual labels:  certificate
win-gpg-agent
[DEPRECATED] Windows helpers for GnuPG tools suite
Stars: ✭ 214 (+268.97%)
Mutual labels:  ssh-agent
sync-deploy
🔄 shell toolkit for deploying script/command task on remote host, including up/download files, run script on remote
Stars: ✭ 20 (-65.52%)
Mutual labels:  scp
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 (-56.9%)
Mutual labels:  certificate
python-rsync-system-backup
Linux system backups powered by rsync
Stars: ✭ 45 (-22.41%)
Mutual labels:  rsync
allsafe
Intentionally vulnerable Android application.
Stars: ✭ 135 (+132.76%)
Mutual labels:  certificate
E-learning-Django-
edurekanet.herokuapp.com/
Stars: ✭ 68 (+17.24%)
Mutual labels:  certificate
remote
Work with remote hosts seamlessly. Code local, build / execute commands remotely
Stars: ✭ 24 (-58.62%)
Mutual labels:  rsync
iOS Development Certificates
📱🛠 iOS Development Certificates
Stars: ✭ 84 (+44.83%)
Mutual labels:  certificate
WeIdentity
基于区块链的符合W3C DID和Verifiable Credential规范的分布式身份解决方案
Stars: ✭ 1,063 (+1732.76%)
Mutual labels:  certificate
vaultssh
A Go based Vault client to support ssh sessions, remote commands and scp transfers all in memory
Stars: ✭ 25 (-56.9%)
Mutual labels:  scp
sigil
AWS SSM Session manager client
Stars: ✭ 67 (+15.52%)
Mutual labels:  scp
time-travel
An rsync based backup script which only transfers modified files. Smooth integration into OSX Notification Center.
Stars: ✭ 43 (-25.86%)
Mutual labels:  rsync
The-Learning-Documentation-Project
This documentation is about the new learning(s) and issue(s) resolvings on different aspects of academic, professional and personal thoughts. It includes(or/with links): Research topics(& resources), Programming(issues and code), Advanced Linux commands, Networking commands, bash script command utilization, Linux packages(& scripts), Machinine l…
Stars: ✭ 27 (-53.45%)
Mutual labels:  ssh-agent
pki-manager
IT Freelancers : Manage small PKI for multiple projects (or clients) with 2 bash scripts
Stars: ✭ 36 (-37.93%)
Mutual labels:  certificate
mowoli
Mowoli - A Modality Worklist with RESTful HTTP API
Stars: ✭ 17 (-70.69%)
Mutual labels:  scp
dired-rsync
Support for rsync from Emacs dired buffers
Stars: ✭ 93 (+60.34%)
Mutual labels:  rsync

blessclient

codecov Gitter chat

Please note: If you believe you have found a security issue, please responsibly disclose by contacting us at [email protected].


Inspiration for this project comes from lyft/python-blessclient. We decided to write in Go because it is much easier to distribute a statically linked binary to a large team than having to deal with python environments. Some features from lyft/python-blessclient are currently missing but will be added over time while others are purposefully excluded.

Versions

We are currently in the process of releasing a new major version of blessclient that will replace netflix/bless for a version that relies on federated identity.

v0.x.x - deprecation notice

This version will soon be deprecated. For the time-being brew install blessclient will still point to v0.x.x

You can use homebrew to install with

brew tap chanzuckerberg/tap
brew install blessclient@1

We will keep a v0 branch around for high priority fixes until migrated fully to v1.x.x.

v1.x.x - in active development

More to come.

Install

Linux + macOS

We recommend using homebrew:

brew tap chanzuckerberg/tap
brew install blessclient@1

WSL

We have tested on WSL Ubuntu-18. A couple extra steps are required:

sudo apt update && sudo apt install xdg-utils
brew tap chanzuckerberg/tap
brew install blessclient@1

Usage

At a high level:

  1. Install blessclient
  2. If you don't have an SSH key, generate one with ssh-keygen -t rsa -b 4096
  3. Import or generate a blessclient config. You can find an example config here.
  4. Run blessclient run and make sure there are no errors
  5. Modify your ssh config to be bless compatible
  6. ssh, scp, rsync as you normally would

Config

By default, blessclient looks for configs in ~/.blessclient/config.yml. You can always override this blessclient run -c /my/new/config.yml Some more information on the config can be found here.

There is a built-in method to facilitate the generation of blessclient configs:

Import-config

A few options here:

  • blessclient import-config [email protected]:/..../teamA/blessconfig.yml
  • blessclient import-config https://www.github.com/..../teamA/blessconfig.yml
  • blessclient import-config /home/user/.../teamA/blessconfig.yml
  • blessclient import-config s3::https://s3.amazonaws.com/bucket/teamA/blessconfig.yml

This command uses go-getter to fetch a config and thus supports any source that go-getter supports.

You can see an example config with dummy values here. Download the example, modify the values, and blessclient import-config <path> it to get started.

.ssh/config

This is the nice part about blessclient - in general, you can write an ssh config to transparently use blessclient. scp, rsync, etc should all be compatible!

Such an ssh config could look like:

Match OriginalHost bastion.foo.com exec "blessclient run"
  IdentityFile ~/.ssh/id_rsa

Host 10.0.*
  ProxyJump bastion.foo.com
  User admin

Host bastion.foo.com
  User admin

This ssh config does a couple of interesting things -

  • It transparently requests an ssh certificate if needed
  • It transparently does a ProxyJump through a bastion host (assuming 10.0.* is an ipblock for machines behind the bastion)

Common Errors

Unsafe RSA public key

Bless lambda is rejecting your key because because it is not cryptographically sound. You can generate a new key ssh-keygen -t rsa -b 4096 and use that instead.

SSH client 7.8 can't connect with certificates

There are a couple of outstanding bugs related to openSSH client 7.8

You can check your version with

ssh -V

Commands

run

run will run blessclient and attempt to fetch an SSH certificate from the CA. It requires blessclient to be properly configured beforehand.

import-config

import-config will import blessclient configuration from a remote location and configure your local blessclient.

token

token will print, json formatted, your oauth2/oidc id_token and access_token. This command requires blessclient to be properly configured beforehand. This command is not typically part of a common workflow.

The output will be written to stdout. The output is json formatted and looks like

{
  "version": 1,
  "id_token": "<string>",
  "access_token": "<string>",
  "expiry": "2020-07-20T12:18:02-04:00"
}

When running this command, no other output will be written to stdout.

version

version will print blessclient's version.

Other

Deploying BLESS

There are already several great guides on how to run a BLESS lambda. If you take a moment to skim through these, you'll notice that setting up a successful BLESS deployment requires thorough knowledge of AWS Lambda and IAM. Even then, you'll probably spend hours digging through CloudWatch logs (and who likes doing that).

To further simplify this process, we've put together a terraform provider and module to automate BLESS deployments.

Contributing

Contributions and ideas are welcome! Please don't hesitate to open an issue, join our gitter chat room, or send a pull request.

Go version >= 1.12 required.

This project is governed under the Contributor Covenant code of conduct.

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