github atom36942/atom v17.0.0
Atom 17.0.0

one hour ago

Upgrade (projects must change): config_api entries take auth instead of is_token (and the 16.9.0 is_api_key), in config_extend.py: "is_token": True → "auth": ["jwt"], "is_token": False → "auth": [], "is_api_key": True → add "api_key" (["jwt", "api_key"], or ["api_key"] for machines only). Startup names any entry still using the old keys. A client sending an API key as Authorization: ApiKey atk_... sends Authorization: Bearer atk_....

  • auth, one list per route: the credentials a route accepts, as OpenAPI's per-route security does: [] public, ["jwt"] a JWT access token (people), ["api_key"] an API key (machines), ["jwt", "api_key"] either. It replaces the two flags is_token and is_api_key, so no meaningless mix is possible and a machine-only route can refuse a person's login. A role, permission or user check needs a non-empty auth (startup refuses it otherwise; before, it switched the token on silently). A credential the route does not list is 401 (jwt not allowed on this route, api_key not allowed on this route); none is authorization missing. func_middleware_check_token is now func_middleware_check_auth; /openapi.json adds x-auth per route.
  • API keys are sent as Authorization: Bearer atk_..., the standard header (GitHub, Stripe, OpenAI); the atk_ prefix tells a key from a JWT (which starts eyJ).
  • API keys use the generic routes: list keys with /my/object-read?table=api_key and revoke them with /my/object-delete (or /admin/object-read, /admin/object-delete for any user's); /my/api-key-read, /my/api-key-delete and /admin/api-key-delete from 16.9.0 are gone, and /my/api-key-create is the only key route. The database refuses every UPDATE of api_key (table_row_update_disable), so a key is never edited, and last_used_at is dropped (a key's requests are in log_api under its owner). key_hash joins config_column_read_blocked.
  • Docs: the standard terms (API key, service account, scopes, revocation, rotation) and a partner system sending data through a project route with "auth": ["api_key"] (docs/auth.md).

Don't miss a new atom release

NewReleases is sending notifications on new releases.