Skip to content

Commit

Permalink
feat(authorization): Forward tracing to OPA
Browse files Browse the repository at this point in the history
  • Loading branch information
oxyno-zeta committed Jul 6, 2021
1 parent a25c6c9 commit b41ac1e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/s3-proxy/authx/authorization/opa-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ func isOPAServerAuthorized(req *http.Request, oidcUser *models.OIDCUser, resourc
}
// Add content type
request.Header.Add("Content-Type", "application/json")
// Forward trace on request
err = childTrace.InjectInHTTPHeader(req.Header)
// Check error
if err != nil {
return false, err
}
// Making request to OPA server
resp, err := http.DefaultClient.Do(request)
if err != nil {
Expand Down

0 comments on commit b41ac1e

Please # to comment.