1
0
mirror of https://github.com/falk-werner/webfuse synced 2026-10-18 01:13:56 +00:00

add example of PAM authenticator

This commit is contained in:
Falk Werner
2023-02-02 21:05:49 +01:00
parent 7a131d6024
commit 7559bebb05
7 changed files with 332 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
# 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