Skip to content

Commit

Permalink
rgw: use trace logs for RGW admin HTTP info
Browse files Browse the repository at this point in the history
Debug logs for the RGW Admin Ops debugHTTPClient can leak credentials
used to access the Admin Ops API as well as credentials that may be
returned for any buckets/users. Use trace logs instead, which users are
unlikely to enable in production to mitigate the risk.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
  • Loading branch information
BlaineEXE committed Oct 7, 2021
1 parent 2fdfb9c commit f339737
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/operator/ceph/object/admin.go
Expand Up @@ -72,7 +72,8 @@ func (c *debugHTTPClient) Do(req *http.Request) (*http.Response, error) {
if err != nil {
return nil, err
}
c.logger.Debugf("\n%s\n", string(dump))
// this can leak credentials for making requests
c.logger.Tracef("\n%s\n", string(dump))

resp, err := c.client.Do(req)
if err != nil {
Expand All @@ -84,7 +85,8 @@ func (c *debugHTTPClient) Do(req *http.Request) (*http.Response, error) {
if err != nil {
return nil, err
}
c.logger.Debugf("\n%s\n", string(dump))
// this can leak any sensitive info like credentials in the response
c.logger.Tracef("\n%s\n", string(dump))

return resp, nil
}
Expand Down

0 comments on commit f339737

Please sign in to comment.