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
authorization_restricted- Whether an allowlist is configured (TokenReviewConfig::is_authorization_restricted).allow_any_override- Whether the operator setALLOW_ANY_SERVICE_ACCOUNT_ENV.
§Errors
Returns Err with an operator-facing message when authorization is
unrestricted and the override was not set.