nixpam

command
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2020 License: MPL-2.0 Imports: 9 Imported by: 0

README

Trasapam

Pluggable Authentication Module for native two factor authentication agents for *nix platforms.

Status

Currently only tested on Ubuntu 19.04, 20.04, Centos 6,7,8.

Building

Use make file.
In termminal (inside the project folder), $ make will (1) build trasapam.so file, (2) copy file in /lib/security and (3) restart sshd daemon

Config

Config file trasapam.toml should be copied in /etc/trasa/config/trasapam.toml. Make sure to edit config file according to your service detail and trasa-server lcoation.

Project structure

  • CGO codes are included in trasapam.go and trasapamUtils.go file.
  • trasapamUtils.go includes utility functions to initialize pam module and conversing with users.
  • trasapam.go exports pam_sm_authenticate function which is go port of relevant C extern function where our logic for processing 2fa is performed.
  • utils.go file has utility for reading config file, handleing 2fa requests and logging

Debugging

Set debug = true in trasapam.toml config file Create log file at /var/log/trasapam.log.

Note:

Using go-curl package for http request because for some reason, go's built in httpclient is failing to make http request when invoked from inside pam module.

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