pub fn validate_subject(subject: &str) -> Result<&str, String>Expand description
Validate a client-asserted subject.
Rejects rather than sanitizes, so a client learns its value was wrong instead of discovering later that the audit trail says something else. Control characters are refused because this string is written into the event log and structured logs, where a newline would let a caller forge what looks like a second record.