check_authorization_posture

Function check_authorization_posture 

Source
pub fn check_authorization_posture(
    authorization_restricted: bool,
    allow_any_override: bool,
) -> Result<(), String>
Expand description

Decide whether bindcar may start given its TokenReview authorization posture.

With the Kubernetes TokenReview feature active, an empty namespace / service-account allowlist authorizes every authenticated ServiceAccount in the cluster — a confused-deputy where any compromised pod’s token grants full create/delete/modify over DNS zones (A2). bindcar refuses to start in that posture unless the operator explicitly accepts it, mirroring the check_startup_auth_posture pattern.

§Arguments

§Errors

Returns Err with an operator-facing message when authorization is unrestricted and the override was not set.