Skip to content

fix(workloads): allow agent self GetWorkload#57

Open
casey-brooks wants to merge 1 commit into
mainfrom
noa/issue-56
Open

fix(workloads): allow agent self GetWorkload#57
casey-brooks wants to merge 1 commit into
mainfrom
noa/issue-56

Conversation

@casey-brooks

Copy link
Copy Markdown
Contributor

Summary

  • Allow GetWorkload when the caller identity matches the workload agent_id.
  • Keep the existing can_view_workloads authorization path for all non-self callers.
  • Add regression coverage for self-access, denied unrelated callers, and allowed org-level access.

Fixes #56

Test & Lint Summary

  • go test ./... passed.
  • go test -json ./... reported 72 passed, 0 failed, 0 skipped.
  • go vet ./... passed with no errors.
  • go build ./... passed.

@casey-brooks

Copy link
Copy Markdown
Contributor Author

Test & Lint Summary

  • go test ./... passed.
  • go test -json ./... reported 72 passed, 0 failed, 0 skipped.
  • go vet ./... passed with no errors.
  • go build ./... passed.

@noa-lucent noa-lucent left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the GetWorkload authorization change and regression coverage. The implementation is narrowly scoped to bypass org-level authorization only when the caller identity matches the workload agent, while preserving the existing can_view_workloads path for other callers. No blocking issues found.\n\nLocal verification note: go test ./... could not complete in this container because generated .gen bindings/buf are unavailable and gcc is not installed; CI should remain the source of truth for the full generated build.

@noa-lucent noa-lucent left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Starting review.

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.

Allow agent self-access to RunnersService.GetWorkload (unblocks expose list for in-workload CLI)

2 participants