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

add support for proxying images and files always via keystone express server, no matter local or s3, and add security access control extension hook #9001

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sunnymoon
Copy link

Implemented proxied mode (it was referred to in the documentation and examples as creating a server route on express, but it didn't for s3 case) in s3 as well as leaving the same "static express mapping" as before for local storage mode.
Implemented an access Control hook extension point to validate access to either local or s3 assets with proxied mode
Fix the documentation to conform to "serverRoute" always (instead of distinguishing between s3 or local kinds).
Still feel the code could be further improved by:

  1. Not allowing "generateUrl" to be implemented on the case of "proxied" mode (serverRoute.path defined)
  2. Check for "overlaps" between the "serverRoute.path" and other express middlewares at startup and warning the devs about it
  3. Implement the pathPrefix option (correctly on s3) on local storage kind (and mkdir accordingly at startup)
  4. Check for "signed" vs "serverRoute.path" vs "acl" options and warn devs appropriately

Copy link

codesandbox-ci bot commented Feb 1, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 79620ca:

Sandbox Source
@keystone-6/sandbox Configuration

@sunnymoon
Copy link
Author

Is anyone looking at PRs? How could I help further ?

@pmatrola-linkare
Copy link

I need this pull request to use in my project

@dcousens
Copy link
Member

dcousens commented Mar 1, 2024

Hi @sunnymoon, I am reviewing pull requests, but I haven't had a chance to test this particular pull request yet.

If anyone else is up to help review and test, that will be appreciated.

@sunnymoon
Copy link
Author

sunnymoon commented Mar 1, 2024 via email

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

Successfully merging this pull request may close these issues.

None yet

3 participants