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

docs/design: s3gw-ui backend design document #403

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

jecluis
Copy link
Contributor

@jecluis jecluis commented Mar 18, 2023

With this patch we are introducing a design document ADR on the proposed s3gw-ui backend.

Feedback welcome.

Signed-off-by: Joao Eduardo Luis <joao@suse.com>

@jecluis jecluis added kind/documentation Improvements or additions to documentation kind/design Design work area/ui User Interface labels Mar 18, 2023
@jecluis jecluis requested review from l-mb, votdev and jhmarina March 18, 2023 17:36
@jecluis jecluis force-pushed the wip-ui-backend-design branch from 9ebf530 to d9cce7a Compare March 18, 2023 17:43
@jhmarina
Copy link
Contributor

Copy link
Contributor

@jhmarina jhmarina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm but I'll leave the review to @votdev or @l-mb 🙂

@jecluis jecluis linked an issue Mar 20, 2023 that may be closed by this pull request
@giubacc
Copy link

giubacc commented Mar 23, 2023

I know we already discussed this and for sure the solution proposed here works; however I have the sensation that all this architecture could be a bit too much overcomplicated for the problem we have.
I'd like all the clients could be logically equivalent; without special handling for the browser client.
IMO, regardless of what the client is, it should speak to s3gw using the natural protocol, that is S3.
What if an user wants to install and use his personal web client that works with other S3 backends?
Could he be able to use it with s3gw?
I'd like the user could be able to configure CORS for his buckets depending on what he wants those to be.
Are we, with this solution, hiding something that should be under the control of the user?
What if, instead, we modify the radosgw to default assign the allow-all policy for CORS to newly created buckets?
The user then, via the UI or other, could choose to keep that or change that.

@votdev
Copy link
Contributor

votdev commented Mar 24, 2023

What if an user wants to install and use his personal web client that works with other S3 backends?

This will work (in addition to our REST based layer) because the S3 endpoints still exist and can be used by whatever client. This excludes RGW Admin Ops calls (user and bucket management) which are not S3, therefore they are reserved for the s3gw ui.

I'd like the user could be able to configure CORS for his buckets depending on what he wants those to be.
Are we, with this solution, hiding something that should be under the control of the user?
What if, instead, we modify the radosgw to default assign the allow-all policy for CORS to newly created buckets?
The user then, via the UI or other, could choose to keep that or change that.

This solution counteracts the sense of an administration interface that should have access to everything.

BTW, as it seems now we have to add an UI into Longhorn as well, a REST API makes more sense than before.

@jecluis
Copy link
Contributor Author

jecluis commented Mar 24, 2023

What Volker said, and I would like to expand on a few things.

I'd like all the clients could be logically equivalent; without special handling for the browser client. IMO, regardless of what the client is, it should speak to s3gw using the natural protocol, that is S3.

And they can. They can speak to s3gw all they want. If they are a browser client, then they will have to find their own way to talk to s3gw, and address CORS themselves.

What if an user wants to install and use his personal web client that works with other S3 backends? Could he be able to use it with s3gw?

They can, as long as they solve the CORS issue themselves. If that ever happens, and if they then believe s3gw should address the CORS issue for them, then they can open an issue and we can discuss it then.

I'd like the user could be able to configure CORS for his buckets depending on what he wants those to be. Are we, with this solution, hiding something that should be under the control of the user?

They can. They can configure CORS on their buckets. We're not removing that ability.

What if, instead, we modify the radosgw to default assign the allow-all policy for CORS to newly created buckets? The user then, via the UI or other, could choose to keep that or change that.

That's a no, because that doesn't solve the CORS issue for the s3gw-ui, which is what this design document addresses. Not only we would be making an assumption on what the administrator wants as a default CORS policy (we don't know if an "allow all" is what the administrator wants), we would be essentially saying that any bucket could share its resources with any website (assuming the client had the right privileges) by default. That is not okay. If the CORS policy is to be "allow all", it should be set explicitly.

On top of it, relying on user-specific CORS policies for administration and management of s3gw via s3gw-ui would break access to those buckets we intend to administrate and manage. That is not acceptable for s3gw-ui.

@giubacc
Copy link

giubacc commented Mar 27, 2023

ok, with the given rationale, I don't see motivations against the proposed design.

Signed-off-by: Joao Eduardo Luis <joao@suse.com>
@jecluis jecluis force-pushed the wip-ui-backend-design branch from d9cce7a to 46ff5d9 Compare March 27, 2023 16:41
@jecluis
Copy link
Contributor Author

jecluis commented Mar 27, 2023

@irq0 pushed with additional information on the behavior of s3gw-ui. Let me know if you need more specifics. I didn't want to go into actually mapping operations though, because those should be implemented on a case-by-case need, instead of having to define which operations map to what.

@jhmarina jhmarina added this to the v0.15.0 milestone Apr 4, 2023
@jecluis
Copy link
Contributor Author

jecluis commented Apr 11, 2023

@jhmarina doesn't seem like anyone has particular strong feelings against merging this. Mind approving so this can be merged?

@jhmarina jhmarina merged commit 19d4ee7 into s3gw-tech:main Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui User Interface kind/design Design work kind/documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: write a design doc for the UI backend
4 participants