All Projects → 1wilkens → pam

1wilkens / pam

Licence: Apache-2.0, MIT licenses found Licenses found Apache-2.0 LICENSE-APACHE MIT LICENSE-MIT
Safe Rust API to the Linux Pluggable Authentication Modules (PAM)

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to pam

clarion
WebAuthn (U2F) helper for CLI operations (e.g. SSH Log in)
Stars: ✭ 78 (+30%)
Mutual labels:  pam
pam hook
Pam based webhook authentication for Kubernetes
Stars: ✭ 76 (+26.67%)
Mutual labels:  pam
python-pam
Python pam module supporting py3 (py2 support still exists but is deprecated)
Stars: ✭ 96 (+60%)
Mutual labels:  pam
pam-oauth2
OAuth2 pam module
Stars: ✭ 118 (+96.67%)
Mutual labels:  pam
pam-exec-oauth2
Allows Linux user authentication to OAuth2 via pam_exec
Stars: ✭ 73 (+21.67%)
Mutual labels:  pam
Howdy
🛡️ Windows Hello™ style facial authentication for Linux
Stars: ✭ 3,237 (+5295%)
Mutual labels:  pam
Teleport
Certificate authority and access plane for SSH, Kubernetes, web apps, databases and desktops
Stars: ✭ 10,602 (+17570%)
Mutual labels:  pam
pam panic
A PAM module that protects sensitive data and provides a panic function for emergency situations. Authentication through passwords or removable media.
Stars: ✭ 35 (-41.67%)
Mutual labels:  pam
fingerprint-gui
Use fingerprint readers with a Linux desktop environment
Stars: ✭ 47 (-21.67%)
Mutual labels:  pam
bottle-ssl
A simple web page using BottlePy and SSL
Stars: ✭ 47 (-21.67%)
Mutual labels:  pam
webdav-server-rs
webdav server in rust
Stars: ✭ 65 (+8.33%)
Mutual labels:  pam
privx-on-aws
PrivX - Just-in-time Access Management
Stars: ✭ 18 (-70%)
Mutual labels:  pam
pam e4crypt
PAM module for unlocking transparently encrypted directories on ext4
Stars: ✭ 18 (-70%)
Mutual labels:  pam
pam pwnd
A PAM module to test passwords against previous leaks at haveibeenpwned.com
Stars: ✭ 33 (-45%)
Mutual labels:  pam
hola
Windows Hello™ style facial authentication for Linux written in Rust
Stars: ✭ 54 (-10%)
Mutual labels:  pam

pam - Safe Rust API to the Linux Pluggable Authentication Modules (PAM)

Crates.io Documentation Build Status License

Note: Currently only supports basic username/password authentication out-of-the-box.

Warning

Environment support through the env module is probably broken and should not be used in the current state!

Usage

  1. Add pam to your Cargo.toml:
[dependencies]
pam = "0.7.0"
  1. Use the Authenticator struct to authenticate and open a session
extern crate pam;
pub fn main() {
        let service = "<yourapp>";
        let user = "<user>";
        let password = "<pass>";

        let mut auth = pam::Authenticator::with_password(service).unwrap();
        auth.handler_mut().set_credentials(user, password);
        if auth.authenticate().is_ok() && auth.open_session().is_ok() {
            println!("Successfully opened a session!");
        }
        else {
            println!("Authentication failed =/");
        }
}

TODO:

  • Implement basic user/password authentication
  • Add Authenticator struct
  • Add (more) documentation
  • Verify current conv does not leak memory
  • Allow custom conv functions to be passed
  • Code cleanup

Supported Rust versions

The library is only continuously built against Rust stable, beta and nightly but as it does not use a lot of new language features it should probably compile on older versions as well. If you encounter problems building on older versions and a small fix can be applied to make the build succeed, consider opening a pull request.

Note about stability

This crate follows semantic versioning. As such all versions below 1.0.0 should be considered development versions. This means the API could change any time.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].