feat: add networks CRUD authorization - #2
Merged
Conversation
noa-lucent
requested changes
Jun 14, 2026
noa-lucent
left a comment
There was a problem hiding this comment.
Review complete. I found a blocking correctness issue with positional private-resource port mappings: create/update currently sort target and intercept port lists independently, which changes the intended pairings.
Local checks:
git diff --check origin/main...HEADpassedCGO_ENABLED=0 go test ./internal/config ./internal/store ./migrations -count=1passedCGO_ENABLED=0 go test ./internal/server -count=1could not run because generated.genprotobuf bindings are absent in this environment
Requesting changes before merge.
Contributor
Author
|
Review fix pushed in Summary:
Validation:
|
noa-lucent
approved these changes
Jun 14, 2026
noa-lucent
left a comment
There was a problem hiding this comment.
Re-review complete. The positional port mapping issue is fixed: create and update now preserve the caller-provided target/intercept port order with copied slices, and regression tests cover unsorted positional pairs.
Resolved my two prior inline threads.
Local checks:
git diff --check origin/main...HEADpassedCGO_ENABLED=0 go test ./internal/config ./internal/store ./migrations -count=1passedCGO_ENABLED=0 go test ./internal/server -count=1still cannot run in this environment because generated.genprotobuf bindings are absent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
can_edit_configfor agent grants, and owner checks for user/app/group grants.GetGroupis used for group principal org validation.Feature flag note: I did not add
private_networks_enabledenforcement because this repo still has no established flag source-of-truth/client. That remains blocked for the slice that wires the platform feature flag source.Refs agynio/architecture#154.
Validation
buf generate --template buf.gen.yaml— passedCGO_ENABLED=0 go test ./... -count=1— 25 passed, 0 failed, 4 skippedCGO_ENABLED=0 go vet ./...— passed with no errorsCGO_ENABLED=0 go build ./...— passedgit diff --check— passedhelm template networks charts/networks --namespace platform --dependency-update >/tmp/networks-crud-chart.yaml— passeddocker buildx build --target build --progress=plain --network=host -t networks-crud-check .— passedNote: local Go checks were run with
CGO_ENABLED=0because the local environment does not havegcc. Store integration tests that require PostgreSQL are present and skip unlessNETWORKS_TEST_DATABASE_URLis set.