-
Notifications
You must be signed in to change notification settings - Fork 303
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
Add mechanism to inject a JWT + account name #577
Add mechanism to inject a JWT + account name #577
Conversation
e35ba0b
to
37e01ed
Compare
37e01ed
to
7f461b2
Compare
R2Admin(FeatureFlags featureFlags, | ||
uint subrequestChannel, | ||
kj::String account, | ||
kj::String jwt, |
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.
If these are always meant to be used together, I would suggest potentially combining them into a single struct.
7f461b2
to
894e087
Compare
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.
Looks good!
894e087
to
8a5ca89
Compare
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.
LGTM too
To allow greater flexibility in how R2 RPC operations can be performed, introducing the jwt as optional attribute. Also refactored the way R2 paths are built and passed to the doR2HTTP(verb)Request functions, since we expect to support greater variety of paths. Introduced concept of R2CrossAccount, which will leverage the new underlying flexibility to perform cross account operations with proper auth.
8a5ca89
to
90e7b3b
Compare
The admin account path is not needed. This was an oversight from cloudflare#577.
The admin account path is not needed. This was an oversight from cloudflare#577.
The admin account path is not needed. This was an oversight from cloudflare#577.
The admin account path is not needed. This was an oversight from cloudflare#577.
The admin account path is not needed. This was an oversight from cloudflare#577.
To allow greater flexibility in how R2 RPC operations can be performed, introducing the jwt as optional attribute. Also refactored the way R2 paths are built and passed to the doR2HTTPRequest functions, since we expect to support greater variety of paths.
Introduced concept of R2CrossAccount, which will leverage the new underlying flexibility to perform cross account operations with proper auth.