Skip to content
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

AkamaiSecureUrlBuilder creates not working urls for files #229

Closed
sim1234 opened this issue Nov 25, 2022 · 5 comments · Fixed by #230
Closed

AkamaiSecureUrlBuilder creates not working urls for files #229

sim1234 opened this issue Nov 25, 2022 · 5 comments · Fixed by #230
Assignees

Comments

@sim1234
Copy link

sim1234 commented Nov 25, 2022

Describe the bug

AkamaiSecureUrlBuilder claims to follow secure delivery guidelines described in https://uploadcare.com/docs/security/secure-delivery/ but the urls generated by it don't work (HTTP 403).

Reference implementation uses Akamai EdgeAuth that differs a bit from what is implemented in this project:

  • Akamai implementation uses sha256 hash function while pypuloadcare uses sha1 by default. This isn't an issue since it can be overwritten.
  • Akamai doesn't use acl in hashed values, nor in the token itself.

Code / screenshots

Uploadcare(..., secure_url_builder=AkamaiSecureUrlBuilder(...)).generate_secure_url("<uuid>") results in https://mydomain.com/<uuid>/?token=exp=...~acl=/<uuid>/~hmac=...

while

EdgeAuth(...).generate_url_token("<uuid>") results in exp=.../~hmac=...

Environment

  • Library version: 3.1.0
  • Language/framework version: Python 3.8
  • OS version: macOS 13.0.1
@dmitry-mukhin
Copy link
Member

Hi!
This is a known issue, that is addressed in #220.
It'll be a part of version 4.0.

I'll try to introduce it to 3.2 as well.

@dmitry-mukhin dmitry-mukhin self-assigned this Nov 25, 2022
@dmitry-mukhin dmitry-mukhin linked a pull request Nov 25, 2022 that will close this issue
3 tasks
@dmitry-mukhin
Copy link
Member

@sim1234 please check the newest version

@sim1234
Copy link
Author

sim1234 commented Nov 25, 2022

@dmitry-mukhin I don't think the acl issue was addressed there.

@dmitry-mukhin
Copy link
Member

Adding ACL is optional. We've decided to use it.

@dmitry-mukhin
Copy link
Member

feel free to send PR that makes this optional in pyuploadcare as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants