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

[Multi-Tenant] Tenanted Outgoing Payments #3119

Open
5 tasks
Tracked by #2893
njlie opened this issue Nov 21, 2024 · 1 comment
Open
5 tasks
Tracked by #2893

[Multi-Tenant] Tenanted Outgoing Payments #3119

njlie opened this issue Nov 21, 2024 · 1 comment
Assignees
Labels
pkg: backend Changes in the backend package.

Comments

@njlie
Copy link
Contributor

njlie commented Nov 21, 2024

Outgoing Payments should become tenanted as per the Multi-Tenancy design, and will be logically separated in the backend database by a tenantId row that serves as a foreign key on the tenants table.

  • Add tenantId row to outgoingPayments table that is required and maps to an id on the tenants table.
  • Add tenantId to database queries on outgoing payments.
  • Acquire tenantId from request headers on routes involving outgoing payments and pass them into outgoing payment service logic.
  • Include tenantId in path of outgoing payment URL. e.g. http://exampe-rafiki/:tenantId/outgoing-payments/:id
  • Note: the outgoing payment should be created only for the same tenant/wallet address where the quote was created, i.e. since an outgoing payment depends on a quote (which in turn depends on a wallet address), we shouldn't be able to have a situation where we have an outgoing payment on tenant B and a quote on tenant A.

Prerequisites

@njlie njlie added the pkg: backend Changes in the backend package. label Nov 21, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Rafiki Nov 21, 2024
@njlie njlie moved this from Backlog to Todo in Rafiki Nov 25, 2024
@mkurapov mkurapov self-assigned this Nov 26, 2024
@mkurapov mkurapov moved this from Todo to In Progress in Rafiki Nov 28, 2024
@mkurapov mkurapov moved this from In Progress to Todo in Rafiki Dec 3, 2024
@mkurapov mkurapov removed their assignment Dec 3, 2024
@mkurapov
Copy link
Contributor

mkurapov commented Dec 3, 2024

Taking on #3033 for the time being, this one available for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: backend Changes in the backend package.
Projects
Status: Todo
Development

No branches or pull requests

3 participants