rafiki
rafiki copied to clipboard
feat(backend): add tenant name
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
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)
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.