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

Prepare update/delete definition endpoints for custom connectors in Cloud #19670

Closed
xiaohansong opened this issue Nov 21, 2022 · 2 comments
Closed
Assignees

Comments

@xiaohansong
Copy link
Contributor

xiaohansong commented Nov 21, 2022

In #19637 (comment), we captured notes from a discussion about these API endpoints between FE and BE.

Synced offline about this. Our outcome and action items

  • createCustomSource/DestinationDefinition should be used (with workspaceId)

  • Once in UI, we want to remove the old (non workspace scoped) create APIs

  • updateSource/DestinationDefinition (does not need workspaceId)

    • Cloud will check if the passed connector ID, is actually assigned to a workspace that the user has access to, if not throws 404 in cloud if connector ID
  • Same logic as for update should apply for the delete endpoint

  • No migration will be needed, we accept orphaned rows in the actor table for the rare cases users ran into that case

In order to achieve this, we'll perform the following steps:

On the Cloud side, we will:

  • Remove the <update/delete>Custom<Source/Destination>Definition methods from the wrapped handler, since they won't exist in OSS anymore.
  • Update the <update/delete><Source/Destination>Definition methods in the wrapped handler to make sure the custom definition can be updated/deleted by the current user.
    • There is no workspaceId in the request, so really this check is that the current user has permission to at least one workspace that has a grant for the custom definition.
@pmossman
Copy link
Contributor

Refining notes:

  • This is an action item coming out of discussion w/ Tim and front-end around making the OSS connector endpoints more sensible.
  • Rather than letting a user pass in an arbitrary workspace ID as part of the request, we can authenticate requests in Cloud by using the current workspace from the logged in session. In OSS, the request can just go through without auth because we don't have RBAC in OSS.

@pmossman pmossman changed the title Remove workspace id in update/delete definition request Prepare update/delete endpoints for custom connectors in Cloud Nov 30, 2022
@pmossman pmossman changed the title Prepare update/delete endpoints for custom connectors in Cloud Prepare update/delete definition endpoints for custom connectors in Cloud Nov 30, 2022
@pmossman
Copy link
Contributor

This issue captures the contents of this other issue: #19669

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

No branches or pull requests

2 participants