Giter Club home page Giter Club logo

pam-jwt's Introduction

JWT pam module.

This is a pam module that will authenticate a user based on them having a ecnrypted and/or signed JWT token.

This is primarily intended as an authentication module for SSO cases, like using it for connecting RDP users to XRDP without passwords. We'd be happy to learn of other potential uses though.

An example usage would be you to use a remote desktop gateway to obtain a JWT token in a RDP file to connect to a remote machine and XRDP authenticates you.

Works on linux and osx. BSD doesn't work because go doesn't (yet) support buildmode=c-shared on bsd.

Building:

  1. clone the repo and run 'make'
  $ git clone github.com/bolkedebruin/pam-jwt

  ...

  $ make
  go build -buildmode=c-shared -o pam_jwt.so
  go test -cover
  PASS
  coverage: 71.8% of statements
  ok  	_/home/pmoody/tmp/pam-jwt	0.205s

  $

Usage:

  1. put this pam module where ever pam modules live on your system, eg. /lib/security

  2. add it as an authentication method, eg.

  $ grep auth /etc/pam.d/xrdp-sesman
  auth sufficient                 pam_jwt.so token_url=https://something?access_token
  # auth sufficient                 pam_jwt.so secret=<encryption_key> signing_key=<signing_key> alg=<alg> issuer=issuer
  auth include                    password-auth

FAQ:

  • How do I report a security issue?

    • Please report security issues in the issues
  • can you make it do $X?

    • Submit a feature request, or better yet a pull request

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.