Skip to content

Commit

Permalink
add necessary permission attributes during initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
krtkvrm committed Aug 4, 2022
1 parent 082bd7a commit 804bbc3
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions internal/proxy/middleware/authz/authz.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,11 @@ func (c *Authz) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
return
}

permissionAttributes := map[string]interface{}{}

permissionAttributes["namespace"] = rule.Backend.Namespace

permissionAttributes["user"] = req.Header.Get(c.identityProxyHeaderKey)

permissionAttributes["resource_type"] = ""
permissionAttributes := map[string]interface{}{
"namespace": rule.Backend.Namespace,
"user": req.Header.Get(c.identityProxyHeaderKey),
"resource_type": "",
}

for res, attr := range config.Attributes {
_ = res
Expand Down

0 comments on commit 804bbc3

Please sign in to comment.