-
Notifications
You must be signed in to change notification settings - Fork 83
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
OKAPI-1081: Reject invalid tenant ids #1347
Conversation
https://folio-org.atlassian.net/browse/OKAPI-1081 Implement https://folio-org.atlassian.net/wiki/display/TC/ADR-000002+-+Tenant+Id+and+Module+Name+Restrictions so that creating a new tenant via POST /_/proxy/tenants API is rejected unless the tenant id matches ^[a-z][a-z0-9]{0,30}$ Legacy tenant ids still work when used in any other API.
@julianladisch while this avoids problems with existing tenant data. it is still a breaking change of the API. If we need to bump Okapi version to 6.0.0, I'd like us to release 5.3.0 first. Platform module release deadline for Quesnelia is March 1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://folio-org.atlassian.net/wiki/spaces/DD/pages/1779867/Tenant+Id+and+Module+Name+Restrictions mentions Okapi and the modules should provide APIs and/or scripts to do the migration.
Is that ready? Can we provide a configuration to allow user to continue use the old ^[a-z0-9_-]+$
validation to avoid this breaking change?
Legacy tenant IDs can still be used. The restriction only affects new tenant IDs created via the API. There's no need to migrate legacy tenant IDs. |
From users' perspective, for whatever reason, they might need or prefer to name new tenant id consistently with old tenants, or they might need to recreate old tenants with the same ids. It would be better to provide configuration to allow these. |
FYI that was just a suggestion. No objection if you want to merge as is. |
The FOLIO security team discussed whether there should be an option to allow creation of legacy tenant ids. However, the security team prefers not to have such an option for security reasons. There are workarounds for people who want to do create legacy tenant ids: They can directly write into the Okapi database, or they can install an old Okapi version. |
Quality Gate passedIssues Measures |
https://folio-org.atlassian.net/browse/OKAPI-1081
Implement
https://folio-org.atlassian.net/wiki/display/TC/ADR-000002+-+Tenant+Id+and+Module+Name+Restrictions
so that creating a new tenant via POST /_/proxy/tenants API is rejected unless the tenant id matches
^[a-z][a-z0-9]{0,30}$
Legacy tenant ids still work when used in any other API.