himmelcloak

himmelcloak is a Rust library for browserless Keycloak login on Linux. It is my senior capstone for the himmelblau team, sponsored by SUSE and NVIDIA, and a sister project to himmelblau. I lead the six-person team.

Role: team lead Rust, OIDC, PKCE, Keycloak, wolfCrypt aidangarske/himmelcloak
01 / What I built

Main changes

02 / Design

One design choice

Each login is a single-use flow that fails closed. A failed check, an error, a redirect to another site or more than five redirects ends it. I chose refusing over recovering because a half-finished login holding secrets is worse than a retry.

03 / Debugging

A bug I fixed

CI failed on every PR. A parallel test forked a child that inherited the lock fd, so the lock test intermittently got EWOULDBLOCK. I added a test-only retry for up to 2 seconds and bumped url to 2.5.9 for a RUSTSEC advisory. (#216)

04 / Verification

How it was checked

PREvidence
#216clippy -D warnings, workspace lib tests, and 30 runs of cargo test -p himmelcloak-cli all pass.
#146Against Keycloak 26.8 all 3 live tests pass; pointing at keycloak.test makes the new test fail.
#175Live scenario rejects a code Keycloak never issued; unit tests cover wrong or missing nonce.
05 / Limits

What is not done yet

Required actions that need a browser are unsupported by design. PAM and SSH integration is planned, not done, and the project is still ongoing.

All my merged pull requests 21 in aidangarske/himmelcloak
  • #217Add a verbose login trace for the demo and debugging
  • #218Run the make targets and CI with Podman
  • #216Update url to 2.5.9 for RUSTSEC-2026-0592 and retry the sync lock in tests
  • #209HC-74: add the one-time-code factor, CLI code prompt, and phone demo
  • #200Update readme build steps, build, test, and demo Himmelcloak through Docker with four make targets
  • #194Assign the kc-admin-api scope to the group-sync fixture and fix the Rust 1.99 clippy lint
  • #177HC-17: end a login that fails a check as failed rather than cancelled
  • #176HC-15: complete the login when Keycloak redirects to the callback
  • #175HC-14: exchange the authorization code for verified tokens
  • #165validate oidc discovery metadata
  • #166bind authorization requests to login flows
  • #164Stop duplicate CI runs by scoping push triggers to main and release
  • #146Test that the transport rejects a Keycloak host-name mismatch
  • #160bump wolfssl to 5.9.4 and automate native and toolchain pins
  • #154Add cross-distro ci images and matrix
  • #150Define the challenge and answer contract with cancellation and expiry
  • #161Group the pam and nss crates under a crates directory
  • #145Split the repository into a three-crate Cargo workspace
  • #143Fix architecture diagram rendering
  • #142Relicense Himmelcloak under GPL-3.0-or-later only
  • #1OIDC core and keyCloack connection basline

all work view the repository