Files
javalsai 9463c26036 feat!: implement complete password auth chain (+)
This is a final implementation, it completely works, is safe and
audited. There are several changes overall (most explained in the
README):
- Added `debuggable` cargo feature to disable debug ability, reducing a
  bit library size.
- Completed README with setup, concernsm, features and more.
- Add `asdeny` argument to behave as a PAM barrier. Updated nixos
  configuration accordingly.
- Modularity, separated config from API client and CURL client, each can
  take a `debug` option for a clean function call interface.
- Unified logging methods, there is a current `e/println!` call in all
  the codebase, behind a macro, to allow for consistent log formatting.
- Readability, separated and broke down cognitive complicated structures
  for ease of readability, methods are as simple as I could get them to
  be and reusable across `authentication` and `password` flows.
- HTTP headers now are macro'ed to prevent typos and have unified casing
  and representations.
- Simplified CURL interface so it integrates perfectly with rust type
  system for just what's necessary, it's more readable and loggable.
- Checked PAM returned errors to see if they are sensible enough.
- Checked this interacts with `pam_unix.so` as expected.
2026-05-11 01:56:48 +02:00

51 lines
1.4 KiB
TOML

[package]
name = "keycloak_pam"
description = "PAM module to authenticate against a keycloak instance"
version = "0.1.0"
edition = "2024"
license = "GPL-3.0-only"
repository = "https://git.javalsai.tuxcord.net/tuxcord/keycloak-pam"
keywords = ["pam", "pam-module", "authentication", "keycloak"]
categories = ["authentication", "network-programming"]
[lib]
crate-type = ["cdylib"]
[features]
default = ["debuggable"]
debuggable = []
[profile.release]
codegen-units = 1
opt-level = 3
lto = true
strip = "symbols"
panic = "abort"
trim = true
[dependencies]
curl = { version = "0.4.49", default-features = false }
libc = { version = "0.2.186", default-features = false }
nonstick = { version = "0.1.2", default-features = false, features = ["link"] }
serde = { version = "1.0.228", default-features = false, features = ["derive"] }
serde_json = { version = "1.0.149", default-features = false, features = [
"std",
] }
thiserror = { version = "2.0.18", default-features = false }
urlencoding = { version = "2.1.3", default-features = false }
[lints.clippy]
cargo = { level = "warn", priority = -1 }
multiple_crate_versions = { level = "allow" }
correctness = { level = "deny", priority = -1 }
nursery = { level = "deny", priority = -1 }
option_if_let_else = { level = "allow" }
pedantic = { level = "deny", priority = -1 }
perf = { level = "deny", priority = -1 }
style = { level = "deny", priority = -1 }
unwrap_used = "deny"
missing-errors-doc = "allow"