1
0
mirror of https://github.com/falk-werner/webfuse synced 2024-09-29 06:50:43 +00:00
falk-werner_webfuse/example/authenticator/pam
2023-02-04 15:54:15 +01:00
..
etc/pam.d add example of PAM authenticator 2023-02-02 21:05:49 +01:00
src use stdin to provide authentication token to authenticator rather than command line option 2023-02-04 15:48:17 +01:00
.gitignore added missing newline 2023-02-04 15:54:15 +01:00
CMakeLists.txt add example of PAM authenticator 2023-02-02 21:05:49 +01:00
README.md add example of PAM authenticator 2023-02-02 21:05:49 +01:00

webfuse PAM authenticator

This directory contains an example of a webfuse authenticator using PAM.

The authenticator uses username and password for authentication. Since webfuse only provides a token, username and password are encoded as follows:

TOKEN := base64 ( USERNAME ":" PASSWORD )

Example:

USERNAME := "user"
PASSWORD := "secret"
TOKEN    := base64 ( "user:secret" ) = "XNlcjpzZWNyZXQ="

The utilities webfuse_pam_token_encode and webfuse_pam_token_decode can be used to encode and decode tokens.

Build

cmake -b build
cmake build

Dependencies

  • libpam
  • libb64

Notes

  • in order to make the authenticator work, read access to /etc/shadow is needed