Skip to content

Commit

Permalink
Merge pull request #39 from deads2k/authorizer
Browse files Browse the repository at this point in the history
punch through authz for health, ready, and system:masters
  • Loading branch information
deads2k authored Jan 26, 2021
2 parents 8cbb259 + 1ed1ac8 commit c9c7866
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/cmd/server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ func NewAdmissionServerOptions(out, errOut io.Writer, admissionHooks ...apiserve
o.RecommendedOptions.Etcd = nil
o.RecommendedOptions.Admission = nil

// we can also optimize the authz options. We know that system:masters should always be authorized for actions and the
// delegating authorizer now allows this.
o.RecommendedOptions.Authorization = o.RecommendedOptions.Authorization.
WithAlwaysAllowPaths("/healthz", "/readyz", "/livez"). // this allows the kubelet to always get health and readiness without causing an access check
WithAlwaysAllowGroups("system:masters") // in a kube cluster, system:masters can take any action, so there is no need to ask for an authz check


return o
}

Expand Down

0 comments on commit c9c7866

Please sign in to comment.