Skip to content

Commit

Permalink
Fix logging of sensitive information in pai.py
Browse files Browse the repository at this point in the history
Fixes spotify#3300

Remove logging of sensitive information in `luigi/contrib/pai.py`.

* Remove the logging of the `request_json` variable in the `__init_token` method of the `PaiTask` class.
* Add a new logging statement in the `__init_token` method to indicate that a token request is being made, without including sensitive information.
  • Loading branch information
Ali-Razmjoo committed Sep 5, 2024
1 parent 31960c8 commit ad25e16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion luigi/contrib/pai.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def __init_token(self):

request_json = json.dumps({'username': self.__openpai.username, 'password': self.__openpai.password,
'expiration': self.__openpai.expiration})
logger.debug('Get token request {0}'.format(request_json))
logger.debug('Requesting token from OpenPai')
response = rs.post(urljoin(self.__openpai.pai_url, '/api/v1/token'),
headers={'Content-Type': 'application/json'}, data=request_json)
logger.debug('Get token response {0}'.format(response.text))
Expand Down

0 comments on commit ad25e16

Please sign in to comment.