This is a custom container that will authorize users based on their SSH private key. The key whitelist is built by listing all users that belong to a certain github organisation.
You need to supply Github API Personal access token that will be used to get the list of organisation users. The access can be read only, following permissions are needed for the task: repo.
Provide following environment variables for the container
To make the login process faster, the script does cache the member list for 1 hour and user keys for 24 hours.
A host can require list of ssh keys for such scenarios:
/api/1/git-ssh-keys?scope=https://github.com/wunderio&outside_collaborators=true for getting all keys in wunderio organisation, including outside collaborators;/api/1/[email protected]:wunderio/silta-ssh-keys.git for getting public keys of all silta-ssh-keys repository collaborators in wunderio organisation.docker image build -t ssh-server .
docker run -p 8080:80 --env-file ./env.list -d ssh-server
curl -s -u user:pass http://localhost:8080/api/1/git-ssh-keys\?scope\=https://github.com/wunderio
Content type
Image
Digest
sha256:02ec8dd41…
Size
29.2 MB
Last updated
15 days ago
docker pull wunderio/silta-ssh-keys:v1.0.1