Skip to content

0.9.5

Latest

Choose a tag to compare

@tibo-pendino tibo-pendino released this 27 Nov 16:31
· 20 commits to main since this release
13cefb0

OpenGateLLM 0.9.5 carries on the move to OpenFGA started in 0.9.4: every /v1/admin/routers and /v1/admin/roles route, and the GET and PATCH /v1/admin/organizations routes, are now decided by the platform:api#admin relation, not by the Postgres role.
The new relations are computed from admin: no data migration, no Alembic migration, no configuration change. scripts/setup_openfga.sh publishes the new authorization model at start-up.
A router is now loaded together with its providers and checks the rules on them under a lock, so two concurrent writes can no longer leave a mixed router.
A Redis user denied a command the provider limits need is now reported at start-up instead of silently turning the limits off.

Breaking changes

  • Authorize GET (list and get-one) and PATCH /v1/admin/organizations with OpenFGA (platform:api#can_read_organization, organization:<id>#can_update). PATCH checks the permission before the existence lookup: a user without it gets a 403, not a 404, for an unknown id (#1488, #1512)
  • Authorize GET (list and get-one), POST, PATCH and DELETE /v1/admin/routers with OpenFGA (platform:api#can_read_router, can_create_router, can_update_router, can_delete_router) (#1522, #1523, #1525, #1530)
  • Authorize GET (list and get-one), POST, PATCH and DELETE /v1/admin/roles with OpenFGA (platform:api#can_read_role, can_create_role, can_update_role, can_delete_role) (#1533, #1534, #1541, #1546)
  • On all the routes above, a user who does not hold platform:api#admin gets 403 "User <id> is not allowed to perform this action.", whatever their Postgres role, instead of 403 "User has no admin rights." (#1488, #1512, #1522, #1523, #1525, #1530, #1533, #1534, #1541, #1546)

Refactoring

  • Load a router together with its providers: forwarding and the model health no longer query the providers separately, and the admin API is unchanged (#1508)
  • Check the rules on a router's providers (same vector size, same context length, no mix of providers with and without a qos_limit) in one place, under a lock on the router: two concurrent provider writes can no longer each pass the check and leave a mixed router. Existing mixed routers keep working (#1529)

Bug fix

  • Log an error naming the refused command, at start-up and on every request that needs it, when the Redis user is denied a command the provider limits need, instead of logging Redis is unreachable once per worker. The API still starts and serves requests without the provider limits (#1539)

Chore

  • Update the issue templates (#1540)
  • Update the generated documentation and release versions (#1514)

Upgrade notes

  1. Check that every admin holds platform:api#admin before upgrading, now that routers, roles and organizations depend on it: run db-migrate again, whose m001_platform_admins grants it to every user whose role holds ADMIN, including those created or promoted through SSO login since the last run.
  2. Check that SELECT count(*) FROM provider WHERE model_hosting_zone IS NULL returns 0, and set those rows to WOR otherwise: reading a router now reads its providers, so such a row would also fail the admin list of routers and the start-up (#1508).
  3. If the API logs The Redis user is not allowed to run a command the provider limits need at start-up, allow that command to its Redis user: the list is in the Redis permissions (#1539).
  4. Rolling back to 0.9.4 needs no migration: scripts/setup_openfga.sh publishes the 0.9.4 model again, and the OpenFGA store keeps its tuples.

Full Changelog: 0.9.4...0.9.5

  • chore(doc): update generated documentation and release versions by @github-actions[bot] in #1514
  • feat(admin): patch /v1/admin/organizations with openfga by @bakr-a in #1512
  • feat(organizations): authorize GET /v1/admin/organizations with OpenFGA by @bakr-a in #1488
  • refacto(routers): load the router together with its providers (#1490) by @benjaminpilia in #1508
  • feat(routers): authorize POST /v1/admin/routers with OpenFGA by @bakr-a in #1523
  • feat(routers): authorize DELETE /v1/admin/routers with OpenFGA by @bakr-a in #1525
  • feat(routers): authorize PATCH /v1/admin/routers with OpenFGA by @bakr-a in #1530
  • refacto(routers): write providers through their router (#1505) by @benjaminpilia in #1529
  • feat(routers): authorize GET /v1/admin/routers with OpenFGA by @bakr-a in #1522
  • feat(roles): authorize POST /v1/admin/roles with OpenFGA by @tibo-pendino in #1533
  • feat(roles): authorize DELETE /v1/admin/roles with OpenFGA by @tibo-pendino in #1534
  • fix(qos): refuse to start when the Redis user is denied a command the provider limits need (#1531) by @benjaminpilia in #1539
  • chore: update issue templates by @leoguillaume in #1540
  • feat(roles): authorize GET /v1/admin/roles with OpenFGA by @tibo-pendino in #1541
  • feat(roles): authorize PATCH /v1/admin/roles with OpenFGA by @tibo-pendino in #1546