Azure / azure-storage-python

Microsoft Azure Storage Library for Python
https://azure-storage.readthedocs.io
MIT License
338 stars 240 forks source link

Shared key being leaked in Queue Logs #572

Closed welcomemandeep closed 5 years ago

welcomemandeep commented 5 years ago

Which service(blob, file, queue) does this issue concern?

queue

Which version of the SDK was used? Please provide the output of pip freeze.

0.37.0

What problem was encountered?

INFO 2019-04-11 23:21:56,134 azure.storage.common.storageclient _perform_request 257 : Client-Request-ID=7f37445c-5c82-11e9-8811-784f436e746c Outgoing request: Method=POST, Path=/{MY_QUEUE}/messages, Query={'messagettl': None, 'visibilitytimeout': None, 'timeout': None}, Headers={'Content-Length': '106', 'x-ms-client-request-id': '7f37445c-5c82-11e9-8811-784f436e746c', 'User-Agent': 'Azure-Storage/0.37.1-0.36.0 (Python CPython 2.7.16; Darwin 16.7.0)', 'x-ms-version': '2017-04-17', 'Authorization': u'SharedKey :__SECRET_____', 'x-ms-date': 'Thu, 11 Apr 2019 17:51:56 GMT'}.

Have you found a mitigation/solution?

No

Note: for table service, please post the issue here instead: https://github.com/Azure/azure-cosmosdb-python.

zezha-msft commented 5 years ago

Hi @welcomemandeep, thanks for reaching out!

What are you seeing is just the authorization header, NOT the Shared Key itself. The authorization header was computed using the Key, and stops working after a bit of time.

Please upgrade to the latest version of the blob package. FYI you are using an outdated pre-GA version. The scrubbing was added already.

welcomemandeep commented 5 years ago

thanks @zezha-msft