rafiki icon indicating copy to clipboard operation
rafiki copied to clipboard

feat(backend): add tenant name

Open golobitch opened this issue 1 year ago • 2 comments

Changes proposed in this pull request

Context

Checklist

  • [ ] Related issues linked using fixes #number
  • [ ] Tests added/updated
  • [ ] Documentation added
  • [ ] Make sure that all checks pass
  • [ ] Bruno collection updated

golobitch avatar Sep 02 '24 21:09 golobitch

Some generic comments:

  • Are you thinking we need a separate tenantEndpoints table in order to track changes/deletions? Should the same be done for the tenant endpoints in auth?
  • We probably don't need tenantId for grants in backend, since I think it is tenant agnostic (the backend grants are the stored grants that the Rafiki instance itself has gotten from Open Payment requests it has made to remote/other Rafiki instances)

mkurapov avatar Sep 06 '24 14:09 mkurapov

Some generic comments:

  • Are you thinking we need a separate tenantEndpoints table in order to track changes/deletions? Should the same be done for the tenant endpoints in auth?
  • We probably don't need tenantId for grants in backend, since I think it is tenant agnostic (the backend grants are the stored grants that the Rafiki instance itself has gotten from Open Payment requests it has made to remote/other Rafiki instances)

This design is a little bit premature. We should change tenantEndpoints to tenantConfiguration. Down the line we can have basically all ENVs that are tenant specific there. And that can be then configured from Admin UI. I think that we should have audit trail for data change on the tenant, but audit is completely different feature and I think that we will need to tackle that sooner or later.

TenantId is only mandatory for auth in order to get correct grant for tenant.

golobitch avatar Sep 06 '24 19:09 golobitch