All Projects → cbdevnet → fugit

cbdevnet / fugit

Licence: other
_Really_ lightweight git access control

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to fugit

Aws Gate
Better AWS SSM Session manager CLI client
Stars: ✭ 294 (+1125%)
Mutual labels:  ssh, access-control
alpine-desktop
No description or website provided.
Stars: ✭ 13 (-45.83%)
Mutual labels:  ssh
server
AuthzForce Server (Community Edition)
Stars: ✭ 48 (+100%)
Mutual labels:  access-control
trezor-ssh-agent
Trezor SSH Agent for Windows (Putty, WinSCP and more) + KeepKey supported!
Stars: ✭ 54 (+125%)
Mutual labels:  ssh
hermes-core
Security framework for building multi-user end-to-end encrypted data storage and sharing/processing with zero leakage risks from storage and transport infrastructure.
Stars: ✭ 72 (+200%)
Mutual labels:  access-control
terraform-google-nomad
📗 Terraform Module for Nomad clusters with Consul on GCP
Stars: ✭ 63 (+162.5%)
Mutual labels:  ssh
sqlx-adapter
Asynchronous casbin adapter for mysql, postgres, sqlite based on sqlx-rs
Stars: ✭ 27 (+12.5%)
Mutual labels:  access-control
tosh
Imagine your SSH server only listens on an IPv6 address, and where the last 6 digits are changing every 30 seconds as a TOTP code...
Stars: ✭ 406 (+1591.67%)
Mutual labels:  ssh
wormhole
A minimalistic Ansible-like tool for configuring remote servers via ssh
Stars: ✭ 22 (-8.33%)
Mutual labels:  ssh
casbin-ex
An authorization library that supports access control models like ACL, RBAC, ABAC in Elixir
Stars: ✭ 37 (+54.17%)
Mutual labels:  access-control
reverse-ssh
Statically-linked ssh server with reverse shell functionality for CTFs and such
Stars: ✭ 548 (+2183.33%)
Mutual labels:  ssh
lastkeypair
A serverless SSH certificate authority to control access to machines using IAM and Lambda
Stars: ✭ 39 (+62.5%)
Mutual labels:  access-control
ssh
A file transfer application
Stars: ✭ 18 (-25%)
Mutual labels:  ssh
orbit-db-access-controllers
Access Controllers for OrbitDB
Stars: ✭ 25 (+4.17%)
Mutual labels:  access-control
girltalk
A tool for helping stand up headless C2 for droppables.
Stars: ✭ 16 (-33.33%)
Mutual labels:  ssh
privx-on-aws
PrivX - Just-in-time Access Management
Stars: ✭ 18 (-25%)
Mutual labels:  access-control
consrv
Command consrv is a SSH to serial console bridge server, originally designed for deployment on gokrazy.org devices. Apache 2.0 Licensed.
Stars: ✭ 76 (+216.67%)
Mutual labels:  ssh
essh
Extended ssh command
Stars: ✭ 42 (+75%)
Mutual labels:  ssh
TailLog
实时日志(tail log)查看监控客户端工具
Stars: ✭ 79 (+229.17%)
Mutual labels:  ssh
sshecret
I can keep a SSHecret
Stars: ✭ 56 (+133.33%)
Mutual labels:  ssh
Rudimentary (as in, really not that advanced) git access control using SSH key
magic and plain text files. If you want more features, use gitolite or
something along those lines. Found a bug? Report it - or even better, fix it
and send a pull request!

Configuring fugit requires experience with configuring ssh, key-based logins,
git and, should something break, bash. It might contain some vulnerabilities
I have not yet found, so check the code for yourself. Still, you probably
should only give SSH access to people you trust in any case.

Setup
-----
Set up a system user.
Clone this repo into the home of the new user and copy fugit to ~/sbin/fugit.
Make sure ~/sbin/fugit is executable.
If you like, change the log destination from the default (fugit.log) on line 4
You can also change the config directory from the default ($HOME/fugit.d/) on
line 6.

Add the keys used to identify users to ~/.ssh/authorized_keys and add a forced
command executing "~/sbin/fugit <user identifier>" (see the demo file in the
repo for an example).

You might also want to add some or all of
	no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-user-rc
to the key options. Alternatively,
	restrict
includes all of the above.

fugit allows you to choose between two methods of access control: 
file-based (default) and directory-based. To select directory-based access 
control, edit the CONF variable (line 7) to point to a directory.


The access control methods have the following structure

File-based:
	Edit the configuration file (default: fugit.conf) to contain exactly 4
	lines of text per repository to be served.
	Those should be, exactly in this order
		REPO <repo-identifier>	//Identifies the remote
		REAL=<path>		//Path to the repo on disk
		PUSH="<list of users>"	//Users allowed to push to the repo
		PULL="<list of users>"	//Users allowed to pull from the repo

Directory-based:
	The configuration for a repository is read from a file, the name of
	which is determined by replacing all forward slashes ('/') in the 
	submitted repo-identifier with underscores, appending ".conf" and
	prepending the CONF variable.

	Example:
		CONF is "fugit.d"

		$ git clone ssh://host/repo/identifier
		=> Repo identifier is "repo/identifier"
		=> Config file is "fugit.d/repo_identifier.conf"

	Config files for repositories should contain these 3 lines
	REAL=<path>			//Path to the repo on disk
	PUSH=<path>			//Path to a users file
	PULL=<path>			//Path to a users file

	The referenced 'users' files should contain one user-identifier
	per line, to be granted the respective permission.

Debugging
---------
First, check the log. It should contain all commands processed by fugit.
In order to see very verbose debug information at run time, uncomment the
	set -x
line in the beginning of the file. You will now be spammed with execution
data upon interacting with repos controlled by fugit.

How it works
------------
git's submodules exchange data via stdin/stdout over ssh. fugit inserts itself
into that channel, distinguishes between push and pull operations and
either allows the channel to continue or simply closes it. It's not exactly
rocket science, but it works.

Why
---
Because I need to restrict git access for one system user serving multiple
key-users to specific repositories without fine-grained control. So, really
only push/pull/nothing. I reviewed some of the existing options and found them
all pretty heavy on instructions, prerequisites and implementation complexity.
So I made my own.
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].