Skip to content

docs(sync): name OPENSTORAGE_SYNC_ALLOW_PRIVATE for push destinations - #897

Queued
ThomasK33 wants to merge 3 commits into
mainfrom
sync-allow-private-docs
Queued

ThomasK33 wants to merge 3 commits into
mainfrom
sync-allow-private-docs

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

The docs and one code comment named only the deprecated OPENSTORAGE_SYNC_PUSH_ALLOW_PRIVATE for push destinations. The server always parses that variable, but uses its value only while OPENSTORAGE_SYNC_ALLOW_PRIVATE is unset or empty (cmd/openstorage/config.go, resolveSyncEgress): when the unified variable is set, it decides both directions.

What changes

  • docs/reference/http-api.md, push-upstream bullet: names OPENSTORAGE_SYNC_ALLOW_PRIVATE first and what true admits, in the wording of the webhook guard docs: loopback, RFC 1918, RFC 6598 shared, link-local and ULA addresses, while the cloud-metadata addresses (169.254.169.254, fd00:ec2::254) and the other IANA special-purpose ranges stay denied (internal/events/guard.go, deniedReason). The deprecated variable counts only while the unified one is unset or empty, and is ignored when it has a value.
  • docs/reference/http-api.md, egress policy section: the same sentence about the deprecated variable.
  • docs/reference/configuration.md: the true value of OPENSTORAGE_SYNC_ALLOW_PRIVATE gets the same admit list (it left out RFC 6598 shared space and said that every cloud-metadata range stays denied), "unset" reads "unset or empty", and the deprecated variable's value is ignored when the unified one is set, but a malformed value still stops serve at startup. resolveSyncEgress parses it first, and TestResolveSyncEgress pins "malformed legacy is a boot error even when losing" (cmd/openstorage/config_test.go:1386 at the head).
  • internal/sync/worker_push.go, file comment: names the unified variable and the deprecated one's rule. This is a comment only, so the lane-schedule fingerprints do not change (the fingerprint gates pass).

No behavior change.

The second review (2503995) passed with wording points; d379114 says that only two metadata addresses stay denied (a metadata endpoint inside an admitted range, such as 100.100.100.200, is admitted), uses "non-empty value" where configuration.md calls "" an empty value, says that only the deprecated variable's value is ignored, fixes the table row at the top of configuration.md and the resolveSyncEgress line of cmd/openstorage/README.md, and adds a TestResolveSyncEgress case for an empty unified value.

The review of the first head (b15a58f) found the admit list wrong both ways and the "unset" wording inexact (resolveSyncEgress treats an empty value as unset); 2503995 fixes both. Not changed here: code comments in internal/events/guard.go, cmd/openstorage/config.go, internal/sync/worker.go and cmd/openstorage/wire_eventing.go, and the boot warning text in cmd/openstorage/wire.go, still leave RFC 6598 shared space out of the admit list.

Left open (P3, Codex reviews used up)

  • The new TestResolveSyncEgress case passes the resolver the same input as an absent key; no test checks an empty-but-present OPENSTORAGE_SYNC_ALLOW_PRIVATE through resolveServeConfig.
  • "Only two cloud-metadata addresses ... and the other IANA special-purpose ranges stay denied" leaves out that multicast, IPv6 outside 2000::/3 and zone-scoped literals are denied too.
  • The webhook row and section of configuration.md, the guard.go comment and ADR-45 still say the guard blocks cloud metadata in general; the sync section now says that 100.100.100.200 is admitted under the same guard.
  • The unset default gives pulls the same guard as true; the admit list is spelled out only under true.
  • The docs call the deprecated variable a "spelling" in some places and "a separate variable, not a legacy alias" in one.

Verification

  • git grep -n SYNC_PUSH_ALLOW_PRIVATE outside cmd/openstorage now finds the variable only next to the unified one or in its own configuration.md section, apart from ADR-44, which records the push-only design before ADR-45 unified it.
  • Docs gate (scripts/check-doc-links.py, unittest discover -s scripts), go vet ./internal/sync, gofmt and both fingerprint gates pass.

Found by the review of #889 (desk follow-up).


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: xhigh

The push-upstream bullet of http-api.md and the comment at the top of
internal/sync/worker_push.go named only the deprecated push-only
OPENSTORAGE_SYNC_PUSH_ALLOW_PRIVATE. The server reads it only while
OPENSTORAGE_SYNC_ALLOW_PRIVATE is unset (cmd/openstorage/config.go,
resolveSyncEgress). Both now name the unified variable first and say
when the deprecated one is ignored. configuration.md adds that a
malformed deprecated value still stops serve at startup.

Signed-off-by: Thomas Kosiewski <tk@coder.com>

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh`_

Change-Id: Icc90d2223ca5ef62c7d670edcf60627625922f20
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T18:41:30.413327Z d379114 Manual request
🔒 Security Review ✅ Completed 2026-11-16T18:42:30.024818Z d379114 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b15a58fcd6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/reference/http-api.md Resolved
@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: b15a58fcd6

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

…guard does

The review found the new sentence wrong both ways: true also admits RFC
6598 shared addresses (100.64.0.0/10), and the guard keeps only the two
metadata addresses 169.254.169.254 and fd00:ec2::254 denied, not every
metadata-looking range. http-api.md and configuration.md now use the
wording of the webhook guard docs. An empty OPENSTORAGE_SYNC_ALLOW_PRIVATE
counts as unset (resolveSyncEgress), so the docs say "unset or empty" and
"has a value", and the worker_push.go comment says that the opt-in admits
only the private classes.

Signed-off-by: Thomas Kosiewski <tk@coder.com>

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh`_

Change-Id: If5312b03db725222ca4fd8192063401075ae2ed3
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 2503995a04

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 2503995a04

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

…y value is unset

The second review found the wording still loose: "the cloud-metadata
addresses" read as every metadata endpoint, "has a value" clashed with
configuration.md's own word for an empty value, and "the deprecated
variable is ignored" hid that serve still parses it. The docs now say
that only two metadata addresses stay denied, that an empty unified value
counts as unset, and that only the deprecated value is ignored.
TestResolveSyncEgress pins the empty case. Two older lines get the same
fixes: the table row at the top of configuration.md and the
resolveSyncEgress line of cmd/openstorage/README.md.

Signed-off-by: Thomas Kosiewski <tk@coder.com>

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh`_

Change-Id: Ia4e3302fa18b814fd329fadac6b70c067d57f09e
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: d379114b98

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: d379114b98

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33
ThomasK33 added this pull request to the merge queue Nov 16, 2026
Any commits made after this event will not be merged.

This branch has not been deployed

No deployments
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