sshpiper-openpubkey

command module
v0.0.0-...-6654838 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2024 License: MIT Imports: 30 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

sshpiper + openpubkey

This is an sshpiper plugin that authenticates upstream using openpubkey. Openpubkey plugin does not store any or require private key to upstream server. It generates a private key on the fly with Openpubkey and uses it to authenticate to upstream server.

The sshd accepts openpubkey

see example/sshd for how to create a sshd with openpubkey + google oidc public key

Run with docker compose

Get your Google OIdc client id and secret from Google Cloud Console

  • SSHPIPERD_OPENPUBKEY_CLIENTID is the client id of your oidc client
  • SSHPIPERD_OPENPUBKEY_CLIENTSECRET is the client secret of your oidc client
docker compose up -d

docker-compose.yml

version: '2'
services:
  nginx-proxy:
    image: jwilder/nginx-proxy
    restart: always
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - /etc/nginx/vhost.d
      - /usr/share/nginx/html
      - /var/run/docker.sock:/tmp/docker.sock:ro
      - certs:/etc/nginx/certs:ro
    environment:
      DEFAULT_HOST: opk.sshpiper.com
  letsencrypt:
    image: jrcs/letsencrypt-nginx-proxy-companion
    restart: always
    volumes_from:
      - nginx-proxy
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - certs:/etc/nginx/certs:rw
  opk:
    image: farmer1992/sshpiper-openpubkey
    restart: always
    ports:
      - "22:2222"
    expose:
      - "3000"
    environment:
      - GIN_MODE=release
      - SSHPIPERD_LOGIN_GRACE_TIME=1m
      - VIRTUAL_HOST=opk.sshpiper.com
      - VIRTUAL_PORT=3000
      - LETSENCRYPT_HOST=opk.sshpiper.com
      - LETSENCRYPT_EMAIL=farmer1992@gmail.com
      - SSHPIPERD_OPENPUBKEY_BASEURL=https://opk.sshpiper.com
      - SSHPIPERD_OPENPUBKEY_CLIENTID=xxxxxxxxxxxxxxxxxx.apps.googleusercontent.com
      - SSHPIPERD_OPENPUBKEY_CLIENTSECRET=xxxxxxxxxxxxxxx
      - SSHPIPERD_OPENPUBKEY_ISSUERURL=https://accounts.google.com
      - SSHPIPERD_SERVER_KEY_DATA=<base64 of server key>

volumes:
  certs:

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址