crates/nornir-auth-saml/tests/no_samael.rs
//! A34-14 (lane NIGHT-SAML): the samael path is gone. It checked the audience
//! against samael's default `http://localhost:8080/saml/metadata`, allowed
//! IdP-initiated responses, kept no replay cache and allowed 180 s of skew;
//! `sp` is the one SAML path. This guard keeps it from coming back.
const MANIFEST: &str = include_str!("../Cargo.toml");
const LIB: &str = include_str!("../src/lib.rs");
#[test]
fn the_crate_links_no_samael() {
for line in MANIFEST.lines().map(str::trim) {
assert!(
!line.starts_with("samael") && !line.contains("dep:samael"),
"Cargo.toml still names samael: {line}"
);
assert!(
!line.starts_with("saml ="),
"Cargo.toml still has the samael `saml` feature: {line}"
);
}
}
#[test]
fn the_library_has_no_samael_provider() {
for gone in ["samael::", "pub struct SamlProvider", "pub struct SamlConfig", "allow_idp_initiated"] {
assert!(!LIB.contains(gone), "src/lib.rs still holds {gone:?}");
}
}