-
Notifications
You must be signed in to change notification settings - Fork 15
Add REST API authentication (JWT) #295
Copy link
Copy link
Open
Labels
area: rest-apispurrestd, REST endpointsspurrestd, REST endpointseffort: medium1-3 days1-3 dayspriority: criticalBlocks adoption, no workaroundBlocks adoption, no workaroundslurm-compatSlurm compatibility gapSlurm compatibility gaptype: featureNew capabilityNew capability
Metadata
Metadata
Assignees
Labels
area: rest-apispurrestd, REST endpointsspurrestd, REST endpointseffort: medium1-3 days1-3 dayspriority: criticalBlocks adoption, no workaroundBlocks adoption, no workaroundslurm-compatSlurm compatibility gapSlurm compatibility gaptype: featureNew capabilityNew capability
Type
Fields
Give feedbackNo fields configured for issues without a type.
Problem
The REST API (spurrestd) has zero authentication. Any HTTP client can submit, cancel, and query jobs without credentials. The router is created with no auth middleware — all routes are publicly accessible. This is a critical security gap that blocks production deployment.
Expected Behavior
Slurm's slurmrestd supports JWT token authentication via
Authorization: Bearer <token>header, with user identity extracted from JWT claims and authorization checks for admin vs regular user operations.Spur already has an
AuthConfiginspur-core/src/config.rswithplugin: "jwt"andjwt_keyfields — the config infrastructure exists but is unused by spurrestd.Acceptance Criteria
AuthorizationheaderAuthUserAuthorizationheader returns 401/pingendpoint remains accessible without auth--no-authflag available for development/testing (with warning log)AuthConfigfrom spur-core