Skip to content

πŸ› fix: bypass the proxy for the OMP_AUTH_BROKER_URL host in agent NO_PROXY - #15649

Merged
hivecommons-hive[bot] merged 33 commits into
v5from
hive/adopt-15433
Oct 30, 2026
Merged

hivecommons-hive[bot] merged 33 commits into
v5from
hive/adopt-15433

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Supersedes #15433 (adopted after CI went red and the contributor was unavailable; original commits by @odttlnt preserved).

Fixes #15432

This branch is #15433's head 3313ef2503af as pushed by @odttlnt (fork odttlnt/hive), unchanged. Last lane reason on the original: fork-not-editable.

Hive fix agent: rebase this branch on v5, fix the failing checks / review asks, and push to THIS branch. Keep the original author's commits and their Signed-off-by; add your own sign-off on your commits. Do not open another PR.

…PROXY

Agents inherit OMP_AUTH_BROKER_URL, whose host is usually a private
address (Docker bridge gateway). Requests went through the hive proxy and
were refused by the plain-forward destination guard, so the CLI exited on
start. Append only that host to NO_PROXY; unparsable or host-less URLs add
nothing.

Fixes #15432

Hive-Run: #15432
Hive-Plan: agent NO_PROXY broker host
Hive-Spec: agent-env#no-proxy-broker
Signed-off-by: SACHIN NAIK <sachin.naik@ibm.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 30, 2026
@kubestellar-prow kubestellar-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 30, 2026
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#15433 πŸ› fix: bypass the proxy for the OMP_AUTH_BROKER_URL host in agent NO_PROXY same files changelog.d/fixed-15432-broker-no-proxy.md
src/crux/agent/coverage_boost_test.go
src/crux/agent/manager_env.go
src/crux/agent/manager_env_noproxy_test.go

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 30, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Decision needed: @clubanderson should decide whether agents may bypass the hive proxy for the OMP_AUTH_BROKER_URL host (one operator-chosen private address, outside the plain-forward destination guard and its violation accounting).

Code looks correct to me; this is a proxy-policy decision, so I am routing rather than judging it.

What I verified at this head (patch is byte-identical to fork #15433, rebased onto v5):

  • src/crux/agent/manager_env.go:24-36 β€” agentNoProxy() parses OMP_AUTH_BROKER_URL, appends only u.Hostname() (port stripped, IPv6 brackets removed), and returns loopback-only for unset, unparsable, host-less or opaque URLs. A hostname containing ,/whitespace is also rejected, so the value cannot smuggle extra NO_PROXY entries.
  • manager_env.go:277 β€” the only call site; replaces the fixed "127.0.0.1,localhost,::1" from #14076.
  • manager_env_noproxy_test.go covers each branch; coverage_boost_test.go now pins the env empty so the existing loopback assertion stays deterministic.
  • Go's httpproxy and Node's proxy-from-env both match NO_PROXY entries on host without port, so 172.18.0.1:18765 from the issue is matched by the 172.18.0.1 entry.

What a human needs to decide: #15432 asks that agents talk to the credential broker directly. That host is chosen by the hive's own environment (not by the agent), which bounds the exposure to one address β€” but traffic to it leaves the proxy's destination guard, audit log and violation counters. The question above is the whole decision; everything else in the diff follows the reference fix in #15432 verbatim.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 30, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Needs a decision, not a merge:

  • the reviewer swarm returned requires_human @097a861
  • reviewer question: @clubanderson should decide whether agents may bypass the hive proxy for the OMP_AUTH_BROKER_URL host (one operator-chosen private address, outside the plain-forward destination guard and its violation accounting).
  • the automerge lane will not merge this unattended

Head: verdict requires_human @097a861, 65/66 checks green, 1 pending, DCO yes, soak 0s of 30m0s.

What to do: approve this head (097a861) to merge as-is, or leave a changes requested review (or reply /hive decision <what to change>) and the hive will push the fix.

How to release it:

  • After reading the verdict, a trusted merger can submit a GitHub Approve review for the current head and the lane clears the hold on its next pass; /hive approve replies on a PR are acknowledged but not consumed.

Clear the cause and the hive re-evaluates on its next pass; the stage moves to stage/090-ready-for-human-merge, stage/095-pre-merge-soak or the merge queue on its own. Approval does not bypass CI, hold labels or other merge gates.

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

/lgtm

Posted by @clubanderson from the Hive dashboard; the merge gate decides from here.

@kubestellar-prow

Copy link
Copy Markdown
Contributor

@hivecommons-hive[bot]: you cannot LGTM your own PR.

Details

In response to this:

/lgtm

Posted by @clubanderson from the Hive dashboard; the merge gate decides from here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

/approve

Posted by @clubanderson from the Hive dashboard; the merge gate decides from here.

@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue labels Oct 30, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Decision needed: @hanthor should decide whether agent NO_PROXY may be widened automatically from OMP_AUTH_BROKER_URL β€” the question already posted on #15433 β€” since this adoption carries that PR's commit unchanged and one answer settles both.

This is the hive's adoption of #15433. I diffed the two heads: the only commits here beyond 3313ef2 are merges of v5, and git diff 3313ef2 0a2d57e -- src/crux/agent changelog.d is empty. The code review on #15433 therefore applies verbatim β€” agentNoProxy (src/crux/agent/manager_env.go:24-36) reads the broker URL from the crux process env, adds only u.Hostname(), and falls back to loopback-only on anything unparsable; I re-read it at this head and found no defect.

What is pending is not a code fix but the proxy-policy call raised on #15433 (env-derived exemption vs. an operator-declared list, per the open question in #15432). Whichever of the two PRs lands, the other should close; I have not closed anything.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 30, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Looks correct to me. This adoption carries #15433's patch byte-for-byte (+50/-1 across manager_env.go, manager_env_noproxy_test.go, coverage_boost_test.go, changelog.d/fixed-15432-broker-no-proxy.md) merged onto current v5; the merge introduced no changes of its own.

Re-verified against the v5 tree at this head:

  • src/crux/agent/manager_env.go:24-36 β€” agentNoProxy() reads OMP_AUTH_BROKER_URL from the crux process env and appends only u.Hostname(); empty, unparsable, host-less and opaque URLs return the unchanged loopback list, and the ContainsAny(host, ", \t") guard prevents a malformed value from injecting extra NO_PROXY entries.
  • src/crux/agent/manager_launch.go:444 still builds the agent env from os.Environ(), so the broker host the governor exempts is the same one the agent CLI dials.
  • v5 has not touched the NO_PROXY pair since #15433 was reviewed (manager_env.go:256 is still the literal loopback string), so the rebase is clean.

The policy question raised on #15433 (@hanthor: broker-derived exemption vs an operator-declared list) was answered when @clubanderson /approved head 3313ef2 and requested this adoption, so I am not re-asking it. The one consequence worth stating once more for the record: NO_PROXY matches by host, so the agent reaches every port on the broker host without the proxy's destination guard β€” inherent to the approach #15432 chose.

Could not run go test in this pod (blocked for agents); CI is the verdict.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot removed the stage/050-review-pending Review swarm requested; awaiting a verdict for the current head label Oct 30, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

stage 060-reviewed β†’ 050-review-pending: required-check-pending:build-and-test

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Read agentNoProxy and the env block in src/crux/agent/manager_env.go at 72246f9, plus the only other consumer of the old literal. The change looks correct to me: url.Parse + Hostname() strips port and IPv6 brackets, the ContainsAny(host, ", \t") guard keeps a malformed value from smuggling extra NO_PROXY entries, and every failure path falls back to the unchanged loopback list. coverage_boost_test.go:271 now pins the env so the loopback assertion stays deterministic.

One operator-facing gap:

  • low β€” docs out of date. src/docs/env-vars.md:348 still says NO_PROXY is 127.0.0.1,localhost,::1 β€” loopback never traverses the hive proxy. After this PR it is loopback plus the host of OMP_AUTH_BROKER_URL when that is set; an operator debugging why a broker on the Docker bridge is reachable directly will not find the answer in the reference. A one-line edit to that row (and the matching changelog wording already describes it well) would close it.

Nothing else from me; this supersedes #15433 as the body states, with the original commits preserved.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

/lgtm

Posted by @clubanderson from the Hive dashboard; the merge gate decides from here.

@kubestellar-prow

Copy link
Copy Markdown
Contributor

@hivecommons-hive[bot]: you cannot LGTM your own PR.

Details

In response to this:

/lgtm

Posted by @clubanderson from the Hive dashboard; the merge gate decides from here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

/approve

Posted by @clubanderson from the Hive dashboard; the merge gate decides from here.

@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hivecommons-hive[bot]
Once this PR has been reviewed and has the lgtm label, please assign hanthor for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Looks correct to me, and the policy question that parked it has already been answered β€” this is ready for the merge gate, not for another decision round.

What I verified (diff + v5 tree):

  • gh pr diff 15649 is byte-identical to gh pr diff 15433. The PR's only non-merge commit is still @odttlnt's 3313ef2; every commit since 097a861 is a Merge branch 'v5' into hive/adopt-15433 (29 of them in ~9h). compare/097a861...38f552f touches only files that arrived from v5, none from this change.
  • src/crux/agent/manager_env.go:24-36 (agentNoProxy) reads OMP_AUTH_BROKER_URL from the crux process env and appends only u.Hostname(); unset/unparsable/host-less/opaque URLs fall back to the existing 127.0.0.1,localhost,::1. manager_env_noproxy_test.go covers IPv4+port, hostname, IPv6 literal, invalid, path-only and opaque; coverage_boost_test.go:271 pins the var empty so the loopback-only assertion stays deterministic.
  • The requires_human recorded on this PR and on #15433 asked whether agent NO_PROXY may be widened automatically from OMP_AUTH_BROKER_URL. @clubanderson answered it with /lgtm + /approve at head 097a861. The content approved there is exactly the content at 38f552f.

For a maintainer:

  1. The approval keeps falling out of date only because the adopt branch is re-merged from v5 every ~15 minutes, which moves the head and regresses the stage to 050-review-pending (see the hive:stage-regressed comment). Nothing in the code changed; re-confirming at the current head is safe.
  2. Once this lands, #15433 (same diff, fork branch that cannot be pushed) can be closed as superseded, as this PR's body already declares. I have not closed anything.

β€” hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed β€” no findings from this perspective.

β€” hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed β€” no findings from this perspective.

β€” hive: agent=adjudicator-3 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed β€” no findings from this perspective.

β€” hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed β€” no findings from this perspective.

β€” hive: agent=adjudicator-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

stage 060-reviewed β†’ 050-review-pending: required-check-pending:build-and-test

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Read the diff against v5 at 003726527 and the callers. This looks correct to me, and the decision that parked #15433 has already been made.

Content. The only non-merge commit here is 3313ef2, byte-identical to #15433's diff (I diffed gh pr diff 15433 against gh pr diff 15649: no difference). Every later commit is a Merge branch 'v5'.

Correctness. agentNoProxy() (src/crux/agent/manager_env.go:24-36) reads OMP_AUTH_BROKER_URL from the hive process, and the agent's own env is built from os.Environ() (src/crux/agent/manager_launch.go:444), so the broker URL the CLI will dial and the host added to NO_PROXY come from the same variable. u.Hostname() strips brackets from IPv6 literals, which is the form Go's httpproxy matcher expects; the ContainsAny(host, ", \t") guard keeps a malformed value from smuggling extra NO_PROXY entries. The table test covers the unset/invalid/host-less cases, and the one existing NO_PROXY test now pins the env to "" so it stays deterministic.

Security. This widens the proxy bypass by exactly one host, taken from an env var on the hive host that agents cannot set. All other private addresses remain behind the plain-forward guard.

Decision status. #15433 was routed to @hanthor on whether NO_PROXY may be widened automatically from OMP_AUTH_BROKER_URL versus an operator-declared list. @clubanderson approved this PR from the dashboard at head 72246f9 (<!-- hive:pr-approval head=72246f9… by=clubanderson -->); the only change since is further v5 merges. I am treating that as the answer and not re-raising the question. The generic agents.no_proxy_extra idea in #15432 stays a follow-up, as the body says.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#1564910cde53` sha256:7f0040a75319a5820a56dd96b7145f2b1521e9a095d80268b0d5260e81b88621 β€” download from the dashboard or `hivectl review evidence #15649`.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

πŸ› bug: agents can't reach OMP_AUTH_BROKER_URL β€” the proxy's private-address guard refuses it, so the CLI exits on start

1 participant