All Projects → nbeguier → cassh

nbeguier / cassh

Licence: Apache-2.0 license
SSH CA administration via CLI and GUI

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
CSS
56736 projects
HTML
75241 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to cassh

Taro-sign
Taro 开发的 思政教育签到小程序
Stars: ✭ 27 (-59.09%)
Mutual labels:  sign
SmartTrafficIntersection
Another AI toy project, of a traffic intersection controlled by a Reinforcement Learning AI agent to optimize traffic flow in an intersection of vehicles or pedestrians
Stars: ✭ 30 (-54.55%)
Mutual labels:  sign
ControlledVocabularyManager
Rails application with Blazegraph for managing controlled vocabularies in RDF.
Stars: ✭ 20 (-69.7%)
Mutual labels:  authority-control
SchoolRegistrationUI-Android
Check out the new style for App Design aims for school or colleges...😉😀😁😎
Stars: ✭ 56 (-15.15%)
Mutual labels:  sign
ReSign
A burp extender that recalculate signature value automatically after you modified request parameter value.
Stars: ✭ 52 (-21.21%)
Mutual labels:  sign
SignTools-CI
Sign iOS apps on demand using CI. Part of: https://github.com/SignTools/SignTools
Stars: ✭ 145 (+119.7%)
Mutual labels:  sign
customer-ajax-login
Free magento 2 extension for Popup and AJAX based Login and Sign Up | Manish Joy
Stars: ✭ 14 (-78.79%)
Mutual labels:  sign
chaoxing
Make Github to help u for signing on Superstar Xuexitong every 5 minutes, base on github actions.
Stars: ✭ 58 (-12.12%)
Mutual labels:  sign
CalendarView
日历控件
Stars: ✭ 14 (-78.79%)
Mutual labels:  sign
FirebaseAuthExample
Example Sign In, Sign Up with Email, Facebook, Twitter using Firebase combine with BaseMVP (https://github.com/derohimat/android-base-mvp)
Stars: ✭ 20 (-69.7%)
Mutual labels:  sign
reactnative-android-production
Step by step guid for compiling and installing React Native Android app [ bundled release version ] to your test device.
Stars: ✭ 51 (-22.73%)
Mutual labels:  sign
ipa re sign
Re_sign an ipa using Apple Enterprise Certificate 使用企业证书 对 ipa 进行重签名.
Stars: ✭ 32 (-51.52%)
Mutual labels:  sign
crypto
Aplus Framework Crypto Library
Stars: ✭ 20 (-69.7%)
Mutual labels:  sign
flutter-openpgp
OpenPGP for flutter made with golang for fast performance with support for android, ios, macos, linux, windows, web and hover
Stars: ✭ 35 (-46.97%)
Mutual labels:  sign
HotSalesPOS
No description or website provided.
Stars: ✭ 14 (-78.79%)
Mutual labels:  sign
tangem-sdk-ios
The native Swift library for iOS platforms
Stars: ✭ 35 (-46.97%)
Mutual labels:  sign
react-signature-canvas
A React wrapper component around signature_pad (in < 150 LoC). Unopinionated and heavily updated fork of react-signature-pad
Stars: ✭ 420 (+536.36%)
Mutual labels:  sign
JNI RSA Sign
通过JNI实现验证App签名获取公钥
Stars: ✭ 86 (+30.3%)
Mutual labels:  sign
qd-templates
基于开源新版签到框架站发布的公共har模板库,整理自用 qiandao 框架可用的各种网站和App的 Har 模板,仅供学习参考。
Stars: ✭ 77 (+16.67%)
Mutual labels:  sign
flask-apiSign-demo
Api签名验证样例
Stars: ✭ 28 (-57.58%)
Mutual labels:  sign

CASSH

Build Status Python 3.5|3.9 License

OpenSSH features reach their limit when it comes to industrialization. We don’t want an administrator to sign every user’s public key by hand every day, so we need a service for that. That is exactly the purpose of CASSH: signing keys! Developped for @leboncoin

https://medium.com/leboncoin-engineering-blog/cassh-ssh-key-signing-tool-39fd3b8e4de7

Usage

Client CLI

Add new key to cassh-server :

cassh add

Sign pub key :

cassh sign [--display-only] [--force]

Get public key status :

cassh status

Get ca public key :

cassh ca

Get ca krl :

cassh krl

Admin CLI

usage: cassh admin [-h] [-s SET] [--add-principals ADD_PRINCIPALS]
                   [--remove-principals REMOVE_PRINCIPALS]
                   [--purge-principals]
                   [--update-principals UPDATE_PRINCIPALS]
                   [--principals-filter PRINCIPALS_FILTER]
                   username action

positional arguments:
  username              Username of client's key, if username is 'all' status
                        return all users
  action                Choice between : active, delete, revoke, set, search,
                        status keys

optional arguments:
  -h, --help            show this help message and exit
  -s SET, --set SET     CAUTION: Set value of a user.
  --add-principals ADD_PRINCIPALS
                        Add a list of principals to a user, should be
                        separated by comma without spaces.
  --remove-principals REMOVE_PRINCIPALS
                        Remove a list of principals to a user, should be
                        separated by comma without spaces.
  --purge-principals    Purge all principals to a user.
  --update-principals UPDATE_PRINCIPALS
                        Update all principals to a user by the given
                        principals, should be separated by comma without
                        spaces.
  --principals-filter PRINCIPALS_FILTER
                        Look for users by the given principals filter, should
                        be separated by comma without spaces.

Active Client username key :

cassh admin <username> active

Revoke Client username key :

cassh admin <username> revoke

Delete Client username key :

cassh admin <username> delete

Status Client username key :

cassh admin <username> status

Set Client username key :

# Set expiry to 7 days
cassh admin <username> set --set='expiry=7d'

# Add principals to existing ones
cassh admin <username> set --add-principals foo,bar

# Remove principals from existing ones
cassh admin <username> set --remove-principals foo,bar

# Update principals and erease existsing ones
cassh admin <username> set --update-principals foo,bar

# Purge principals
cassh admin <username> set --purge-principals

Search Principals among clients :

cassh admin all search --principals-filter foo,bar

Install

Server

INSTALL.md

Client

INSTALL.md

Cassh WebUI

INSTALL.md

Quick test

Server side

Install docker : https://docs.docker.com/engine/installation/

Prerequisites

# install utilities needed by tests/test.sh
sudo apt install pwgen jq

# Make a 'sudo' only if your user doesn't have docker rights, add your user into docker group
pip install -r tests/requirements.txt

cp tests/cassh/cassh.conf.sample tests/cassh/cassh.conf
cp tests/cassh/ldap_mapping.json.sample tests/cassh/ldap_mapping.json

# Edit cassh.conf file to configure the hosts

# Generate temporary certificates
mkdir test-keys
ssh-keygen -C CA -t rsa -b 4096 -o -a 100 -N "" -f test-keys/id_rsa_ca # without passphrase
ssh-keygen -k -f test-keys/revoked-keys

############################################
# BEGIN THE ONE OR MULTIPLE INSTANCES STEP #
############################################

# Duplicate the cassh.conf
cp tests/cassh/cassh.conf tests/cassh/cassh_2.conf
# Generate another krl
ssh-keygen -k -f test-keys/revoked-keys-2
sed -i "s/revoked-keys/revoked-keys-2/g" tests/cassh/cassh_2.conf

One instance

# Launch this on another terminal
bash tests/launch_demo_server.sh --server_code_path ${PWD} --debug
$ /opt/cassh/src/server/server.py --config /opt/cassh/tests/cassh/cassh.conf

# When 'http://0.0.0.0:8080/' appears, start this script
bash tests/test.sh

Multiple instances

The same as previsouly, but launch this to specify a second cassh-server instance

# Launch this on another terminal
bash tests/launch_demo_server.sh --server_code_path ${PWD} --debug --port 8081
$ /opt/cassh/src/server/server.py --config /opt/cassh/tests/cassh/cassh_2.conf

Client side

Generate key pair then sign it !

git clone https://github.com/nbeguier/cassh.git /opt/cassh
cd /opt/cassh

# Generate key pair
mkdir test-keys
ssh-keygen -t rsa -b 4096 -o -a 100 -f test-keys/id_rsa

rm -f ~/.cassh
cat << EOF > ~/.cassh
[user]
name = user
key_path = ${PWD}/test-keys/id_rsa
key_signed_path = ${PWD}/test-keys/id_rsa-cert
url = http://localhost:8080

[ldap]
realname = [email protected]
EOF

# List keys
python cassh status

# Add it into server
python cassh add

# ADMIN: Active key
python cassh admin user active

# Sign it !
python cassh sign [--display-only]

License

Licensed under the Apache License, Version 2.0 (the "License").

Copyright

Copyright 2017-2022 Nicolas BEGUIER; (nbeguier - nicolas_beguier[at]hotmail[dot]com)

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