Skip to content

Commit 9e62843

Browse files
committed
fix(agents): use hyphenated authz namespaces for spec permission sets
Permission-id segments must match [a-z0-9]+(-[a-z0-9]+)* (no underscores); the EnvironmentSpec/ComputeSpec PermissionSets used underscored namespaces (agents.environment_specs / agents.compute_specs), which the authz bundle rejected as malformed permission ids and failed closed (hard_fail), 500ing the auth service and breaking platform startup in tests. Rename the namespaces to agents.environment-specs / agents.compute-specs (matching the hyphenated route paths). Covered by the existing plugins/nemo-agents/tests/test_authz.py derivation assertion (problems == []). Signed-off-by: Ben McCown <bmccown@nvidia.com>
1 parent 3f2f496 commit 9e62843

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • plugins/nemo-agents/src/nemo_agents_plugin/api/v2

plugins/nemo-agents/src/nemo_agents_plugin/api/v2/_perms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ class EnvironmentPerms(PermissionSet, namespace="agents.environments"):
4040
DELETE = perm("Delete an agent environment")
4141

4242

43-
class EnvironmentSpecPerms(PermissionSet, namespace="agents.environment_specs"):
43+
class EnvironmentSpecPerms(PermissionSet, namespace="agents.environment-specs"):
4444
CREATE = perm("Create agent environment specs")
4545
LIST = perm("List agent environment specs")
4646
READ = perm("Read an agent environment spec")
4747
DELETE = perm("Delete an agent environment spec")
4848

4949

50-
class ComputeSpecPerms(PermissionSet, namespace="agents.compute_specs"):
50+
class ComputeSpecPerms(PermissionSet, namespace="agents.compute-specs"):
5151
CREATE = perm("Create agent compute specs")
5252
LIST = perm("List agent compute specs")
5353
READ = perm("Read an agent compute spec")

0 commit comments

Comments
 (0)