-
Notifications
You must be signed in to change notification settings - Fork 31
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
Generating wildcard ACL and URL tokens for Akamai #265
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dmitry-mukhin
previously requested changes
Oct 26, 2023
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.
I think that AkamaiBuilder
should have a method to get only token, now it's inside _build_token
.
Intended usage, probably is something like:
original_url = "https://acme.ucarecdn.com/:uuid/"
builder = AkamaiSecureUrlBuilder(original_url, secret)
token = builder.get_token()
secure_preview = f"{original_url}-/preview/100x100/?token={token}"
evgkirov
force-pushed
the
feature/264-uuid_signing
branch
from
October 26, 2023 23:26
0b5677c
to
e185146
Compare
evgkirov
force-pushed
the
feature/264-uuid_signing
branch
from
October 26, 2023 23:47
e185146
to
7ddcaa7
Compare
evgkirov
force-pushed
the
feature/264-uuid_signing
branch
from
October 26, 2023 23:53
7ddcaa7
to
fa87d16
Compare
evgkirov
changed the title
Wildcard ACL for generate_secure_url
Generating wildcard ACL and URL tokens for Akamai
Oct 27, 2023
evgkirov
force-pushed
the
feature/264-uuid_signing
branch
from
October 27, 2023 01:39
c725b36
to
732a60c
Compare
evgkirov
force-pushed
the
feature/264-uuid_signing
branch
from
October 27, 2023 01:43
732a60c
to
016f5ea
Compare
rsedykh
reviewed
Oct 27, 2023
dmitry-mukhin
requested changes
Nov 10, 2023
Co-authored-by: Dmitry Mukhin <[email protected]>
Co-authored-by: Dmitry Mukhin <[email protected]>
Co-authored-by: Dmitry Mukhin <[email protected]>
Co-authored-by: Dmitry Mukhin <[email protected]>
dmitry-mukhin
approved these changes
Nov 13, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issues: #263 and #264.
This pull request introduces the ability to generate secure URLs with the same signature valid not only for the base URL of the file (e.g.,
https://cdn.yourdomain.com/52da3bfc-7cd8-4861-8b05-126fef7a6994/
) but also for all of its transformations (#264). This is optional by default.Also,
AkamaiSecureUrlBuilderWithUrlToken
class has been implemented (#263).A new method called
generate_secure_url_token
is exposed forUploadcare
. Instead of full URL it will return just the token (unlike thegenerate_secure_url
method).Added
For
Uploadcare
:generate_secure_url_token
method.wildcard
parameter togenerate_secure_url
method.For
AkamaiSecureUrlBuilderWithAclToken
:get_token
method.wildcard
parameter tobuild
method.AkamaiSecureUrlBuilderWithUrlToken
class.Changed
AkamaiSecureUrlBuilder
has been renamed toAkamaiSecureUrlBuilderWithAclToken
. It is still available under the old name and works as before, but it will give you a deprecation warning when you use it.