Merge pull request #83064 from liggitt/propagate-context

Propagate context to remote authorize/authenticate webhook calls
This commit is contained in:
Kubernetes Prow Robot
2019-09-25 09:32:01 -07:00
committed by GitHub
61 changed files with 270 additions and 93 deletions

View File

@@ -18,6 +18,7 @@ package master
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io/ioutil"
@@ -59,7 +60,7 @@ const (
type allowAliceAuthorizer struct{}
func (allowAliceAuthorizer) Authorize(a authorizer.Attributes) (authorizer.Decision, string, error) {
func (allowAliceAuthorizer) Authorize(ctx context.Context, a authorizer.Attributes) (authorizer.Decision, string, error) {
if a.GetUser() != nil && a.GetUser().GetName() == "alice" {
return authorizer.DecisionAllow, "", nil
}