Closed Bug 1136386 Opened 9 years ago Closed 9 years ago

python client: Logs credentials when debugging is enabled

Categories

(Taskcluster :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mshal, Assigned: jonasfj)

References

Details

Attachments

(1 file)

If DEBUG_TASKCLUSTER_CLIENT is set in the environment, the python client prints the clientId+accessToken to the screen. We should either remove this debug line (I think it's log.debug(o) in BaseClient:__init__()), or find some other way to log useful information (permission errors, retries, etc) from mozharness.
Attached file Github PR
Log all options except "credentials".

As it probably makes a lot of sense to log the options passed in. Just in case someone changes the `base_url` or something...
Assignee: nobody → jopsen
Status: NEW → ASSIGNED
Attachment #8568801 - Flags: review?(jhford)
Summary: python client logs credentials with debugging enabled → python client: Logs credentials when debugging is enabled
Comment on attachment 8568801 [details] [review]
Github PR

>>> import taskcluster
>>> a = taskcluster.Auth()
credentials key scrubbed from logging output
credentials key scrubbed from logging output
{'maxRetries': 5, 'baseUrl': u'https://auth.taskcluster.net/v1', 'signedUrlExpiration': 900}
{'maxRetries': 5, 'baseUrl': u'https://auth.taskcluster.net/v1', 'signedUrlExpiration': 900}

Merged with a slight modification to the logic to print a message about the fact that we're scrubbing credentials
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Comment on attachment 8568801 [details] [review]
Github PR

clearing r? as jhford decided to merge it.
Attachment #8568801 - Flags: review?(jhford)
Component: TaskCluster → General
Product: Testing → Taskcluster
Target Milestone: --- → mozilla41
Version: unspecified → Trunk
Resetting Version and Target Milestone that accidentally got changed...
Target Milestone: mozilla41 → ---
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: