Skip to content

feat(machines,config)!: require auth and permissions on machine API - #74

Merged
anthonyA1214 merged 1 commit into
mainfrom
feat/machine-endpoint-permissions
Nov 27, 2026
Merged

anthonyA1214 merged 1 commit into
mainfrom
feat/machine-endpoint-permissions

Conversation

@anthonyA1214

Copy link
Copy Markdown
Member

Ticket

N/A

Description

Secures the /machines API with session token or Django session authentication and per-route HasPermission checks, adding custom Machine permissions for restore, token issue and revoke, and streaming, and granting all machine permissions to SystemAdmin. Also reads CSRF_TRUSTED_ORIGINS from the environment and includes a users migration for the CustomUserManager state. Clients must now authenticate and hold the matching permission, and deployments need the new environment variable set.

Related Issue

N/A

Type of Change

  • Bug fix
  • New feature
  • Chore
  • Refactor
  • Documentation

Image Change

N/A

- Require session token or Django session auth on MachineController
- Guard each machine route with a HasPermission check
- Add custom restore, issue token, revoke token, and stream permissions
  to Machine, with the matching migration
- Grant all machine permissions to the SystemAdmin role
- Read CSRF_TRUSTED_ORIGINS from the environment
- Add a users migration for the CustomUserManager state

BREAKING CHANGE: /machines endpoints now require authentication and the
matching permission. Deployments must also set CSRF_TRUSTED_ORIGINS.
@anthonyA1214
anthonyA1214 merged commit b45fbed into main Nov 27, 2026
6 checks passed
@anthonyA1214
anthonyA1214 deleted the feat/machine-endpoint-permissions branch November 27, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant