Add test suite for authentication library #1

Open
opened 2026-07-25 11:16:23 +00:00 by GKaszewski · 0 comments
Owner

Severity: Critical

This is a security-critical authentication library published on crates.io with zero test coverage. The README acknowledges this ("Run tests if there are any").

Minimum tests needed:

  • Unit test for PassthroughModeDef deserialization (valid "Block", valid "Pass", invalid "Foo")
  • Unit test for Settings struct deserialization from a sample JSON/YAML
  • Integration test for build_keycloak_layer with a mock AppContext
  • Test that invalid/missing Keycloak config produces proper errors, not panics
**Severity: Critical** This is a security-critical authentication library published on crates.io with zero test coverage. The README acknowledges this ("Run tests if there are any"). Minimum tests needed: - Unit test for `PassthroughModeDef` deserialization (valid "Block", valid "Pass", invalid "Foo") - Unit test for `Settings` struct deserialization from a sample JSON/YAML - Integration test for `build_keycloak_layer` with a mock `AppContext` - Test that invalid/missing Keycloak config produces proper errors, not panics
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GKaszewski/loco-keycloak-auth#1