-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #2015 - Update topsites.py for IAM user credential #2021
Conversation
@MDTsai yes I can help. Do you need to get it done by today or by monday? |
@karlcow by end of January, old credential fail day, thanks ! |
(drive by comment, just to see why tests failed):
|
Use HTTP GET and different signature then use root credential Fix unittest cases
Just fix the PEP8 fail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MDTsai Awesome work as usual. ❤️ Thanks.
All the comments and requests for changes are syntactic.
- So I would replace
\n
by string structure (though to be tested, specifically for the signing process.) - The code needs to be merged with the latest unit tests structure introduced in Fixes #1986 - Start migration to Intern 4 #1987 But this is smooth I have done it locally. :)
- Remove
import base64
in the topsites.py - There are a couple of long lines which needs to be reformatted and/or have
# noqa
or# nopep8
keywords
query=canonical_query, | ||
headers=canonical_headers, | ||
signed_headers=ATS_SIGNED_HEADERS, | ||
payload_hash=payload_hash) |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
return sign_key | ||
|
||
|
||
def get_sha256_hex(data): |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
return urlencode(query_params) | ||
|
||
|
||
def gen_sign(data): | ||
def get_sign_key(key, datestamp, region_name, service_name): | ||
"""AWS sign key from key, datestamp, region and service""" |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
No worries @MDTsai |
Use HTTP GET and different signature then use root credential. @karlcow could you help to review this?