infra
infra copied to clipboard
Tracking issue for org TODOs
This issue is to track all the TODOs we add while working on adding organizations, so that we don't forget to re-enable some checks once all the code is setup to support orgs.
- [x] ~https://github.com/infrahq/infra/pull/2896#discussion_r942780752 - require an org from the context~ - #2945
- [ ] - require all models to implement both
SetOrganizationID
, andIsOrganizationMember() bool
. - [x] ~https://github.com/infrahq/infra/pull/2902#discussion_r942792985 - require an orgID from the request~ This was fixed in a follow up .Replaced this item with another one below for the default behaviour when no org is specified by headers.
- [x] #2917
- [ ] remove the "set default org" from
setupDB
inserver
(and other) packages. This causes tests to not match production. - [ ] add tests cases for all handlers to show that an a request fails if the requestor (access key or domain) is for the wrong org
- [x] ~https://github.com/infrahq/infra/pull/2902/files#r943705460 - setting of the org in
data.initialize
.~ #2921 - [x] https://github.com/infrahq/infra/pull/2902/files#r943713595 - test coverage for org_id migration - #2961
- [x] error if domain from host header does not match the orgID of the access key #2911
- [x] ~reconsider behaviour of
unauthenticatedMiddleware
when no host header or infra-org header are set. Consider removing fallback to default org. Make this configurable so that we have default org fallback for on-prem.~ #2945 - [x] replace the regex in
SetDefaultDomain
withstrings.Map
#2957 - [x] add tests for
data.CreateOrganization
- [ ] return fake data for unathenticated
GET
routes when in multi-tenancy mode and the org is unknown