Skip to content

chore: bump github.com/gobwas/glob from 0.2.3 to 1.0.0 in /authbridge/authlib - #829

Closed
dependabot[bot] wants to merge 2 commits into
mainfrom
dependabot/go_modules/authbridge/authlib/github.com/gobwas/glob-1.0.0
Closed

chore: bump github.com/gobwas/glob from 0.2.3 to 1.0.0 in /authbridge/authlib#829
dependabot[bot] wants to merge 2 commits into
mainfrom
dependabot/go_modules/authbridge/authlib/github.com/gobwas/glob-1.0.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 31, 2026

Copy link
Copy Markdown
Contributor

Bumps github.com/gobwas/glob from 0.2.3 to 1.0.0.

Release notes

Sourced from github.com/gobwas/glob's releases.

v1.0.0

What's Changed

New Contributors

Full Changelog: gobwas/glob@v0.2.3...v1.0.0

Commits
  • 80c58b0 bench.sh: fix the assignment and the benchstat args, ignore *.bench
  • 60a7c15 readme: clarify ** and escaping, make the regexp comparison exact
  • c45ce1c remove parked files (but keep them in git history)
  • dab909e all: split parse.go into parse.go/match.go, polish docs, fix U+FFFD
  • 12d7a23 globtest: print out matchers tree and pretty syntax errors
  • ae63730 shape matchers: switch from <> to () and quote literals
  • a82038c pattern: String() and Separators() impl
  • e9b2193 ci: migrate to github actions
  • c0ec127 glob/v1: rewrite the matching engine
  • e7a84e9 Fix speed results table formatting.
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/gobwas/glob](https://github.com/gobwas/glob) from 0.2.3 to 1.0.0.
- [Release notes](https://github.com/gobwas/glob/releases)
- [Commits](gobwas/glob@v0.2.3...v1.0.0)

---
updated-dependencies:
- dependency-name: github.com/gobwas/glob
  dependency-version: 1.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file go Pull requests that update go code labels Aug 31, 2026
@dependabot
dependabot Bot requested a review from a team as a code owner August 31, 2026 23:15
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file go Pull requests that update go code labels Aug 31, 2026
Auto-tidied by dependabot-tidy workflow to keep cmd/* go.sum
files in sync with authlib after a Dependabot bump.

Signed-off-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@github-actions github-actions Bot closed this Aug 31, 2026
@github-actions github-actions Bot reopened this Aug 31, 2026
@dependabot @github

dependabot Bot commented on behalf of github Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@huang195

huang195 commented Sep 1, 2026

Copy link
Copy Markdown
Member

Closing — glob v1.0.0 cannot be adopted yet, and the blocker is outside this repo.

v1.0.0 is a breaking API change, not just the engine rewrite the release notes describe. Compile changed from returning the Glob interface to returning a concrete *Pattern, and the Glob interface was removed outright. authlib declares glob.Glob as a struct field in three packages:

  • authlib/listener/skiphost/skiphost.go:34
  • authlib/routing/router.go:32
  • authlib/plugins/tokenbroker/plugin.go:88

The CI run on this branch failed with 7× undefined: glob.Glob. (Heads up for anyone triaging from the PR page: the checks list here shows only DCO, because the real workflow runs are sitting at action_required. The aggregate looks green when it is not.)

The harder blocker: OPA depends on glob.Glob toov1/topdown/glob.go and v1/bundle/bundle.go — and it still does as of 1.20.1, so the OPA bump in #836 does not unblock this. glob v1 is unadoptable here until OPA migrates to the v1 API. Nothing to fix on our side.

On the matching-semantics risk, for the record: since "rewrite glob for a much simpler and correct engine" implied matching behavior could have changed under our .-separated patterns, I diffed the two versions over 36 patterns × 29 hosts (1102 comparisons) using the repo's real pattern corpus plus adversarial brace/class/escape syntax. Only two cells differ, both on the empty-host input:

pattern host v0.2.3 v1.0.0
? "" true false
*** "" false true

Separator semantics, brace alternation and nesting, character classes with negation, escaping, case sensitivity and trailing-dot FQDNs are all identical, as are the three patterns skiphost.New accepts as safe-because-not-match-all. skiphost.MatchPattern returns early on host == "" so neither cell is even reachable there. So when OPA does migrate, matching behavior should not be the obstacle — only the API.

Dependabot will re-propose this on the next glob release; I'm adding an ignore for glob major bumps so it does not recur until the OPA blocker clears.

Assisted-By: Claude Code

@huang195 huang195 closed this Sep 1, 2026
@github-project-automation github-project-automation Bot moved this from New/ToDo to Done in Rossoctl Issue Prioritization Sep 1, 2026
@dependabot
dependabot Bot deleted the dependabot/go_modules/authbridge/authlib/github.com/gobwas/glob-1.0.0 branch September 1, 2026 12:50
huang195 added a commit that referenced this pull request Sep 1, 2026
Extends the skip_hosts guard to the other two consumers of host patterns,
and gives all three a single owner for the behaviour.

authlib/internal/hostglob is now the one place cortex compiles an
operator-supplied host pattern and decides whether one is dangerously broad.
Three packages each did this themselves — listener/skiphost, routing and
plugins/tokenbroker — which is precisely why skiphost's guard could compare
against the literal strings "*" and "**" and miss "***", "{**}", "{*,**}"
and "?*", and why the other two had no breadth check at all. It also means
the eventual glob v1 migration (blocked on OPA, see #829) lands in one file
instead of three.

The routers deliberately do NOT copy skip_hosts' blanket rejection. A
match-all there is not a bypass: as the final route it is a legitimate
explicit catch-all, equivalent to defaultAction. The hazard is
first-match-wins — a broad early pattern silently swallows every route
beneath it, and if that early route is a passthrough then token exchange or
brokering is off for hosts the operator explicitly listed.

So both routers now reject unreachable routes instead. hostglob.Shadows is
sound rather than complete: it reports only certain unreachability — the
earlier pattern is match-all, or the later pattern is a literal the earlier
one already matches. A later wildcard shadowed by a narrower earlier wildcard
is not reported, because deciding glob subsumption in general risks a false
positive, and a false positive fails the pod at boot.

Both routers also now reject an empty host pattern (a route whose `host:` key
is missing from routes.yaml matches only an empty Host header, never real
traffic), and both take the no-route path for an empty host rather than
offering it to the patterns — a bare "*" matches the empty string under
gobwas/glob, so an unset Host header would otherwise select a "*" route and
mint or broker a token for a destination we cannot identify.

OPERATIONAL NOTE: the production router is built from the authproxy-routes
ConfigMap, so a live config containing a duplicate or shadowed route will now
fail the pod at boot instead of silently ignoring that route. Traffic
behaviour is unchanged — a shadowed route was already dead — so this trades
availability on upgrade for a loud signal. Downgrading the shadowing check to
a warning is a one-line change if that trade is not wanted.

TestResolve_FirstMatchWins configured the host "service" twice, which is dead
config and now rejected; it was rewritten to prove the same property with two
genuinely overlapping patterns ("svc-*" and "*-prod") where neither route is
unreachable.

Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Hai Huang <huang195@gmail.com>
evaline-ju pushed a commit to evaline-ju/cortex that referenced this pull request Sep 1, 2026
Three packages compile operator-supplied host patterns identically —
glob.Compile(pattern, '.') then Match(host):

  - listener/skiphost/skiphost.go   (bypasses the whole outbound pipeline)
  - routing/router.go               (token-exchange routing)
  - plugins/tokenbroker/plugin.go   (broker routing)

None of them owns that behaviour; gobwas/glob does. skiphost.New's doc
comment then makes load-bearing claims about it — that "*" matches every
single-label host, that "**" is match-all, and that "*.*",
"*.svc.cluster.local" and "service-*" are safe to accept precisely because
they are not. Those claims decide which patterns the boot-time guard
rejects, so a wrong one means an operator pattern silently exempts traffic
from enforcement.

Nothing pinned those claims to the library, so a glob upgrade could quietly
invalidate them. rossoctl#829 (glob v1.0.0) is exactly that shape: its release notes
describe "rewrite glob for a much simpler and _correct_ engine". It turned
out to be blocked on an unrelated API break, but the semantics risk was real
and unguarded either way.

These tests assert the contract against the library directly, so the next
bump has to prove it still holds rather than assume it.

Deliberately not covered: the empty host. It is the only input whose result
differs between v0.2.3 and v1.0.0 ("?" matched "" in v0.2.3 and does not in
v1.0.0; a run of three or more stars flipped the other way), both need a
degenerate pattern to reach, and MatchPattern returns early on host == ""
so skiphost never asks glob about it.

Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Hai Huang <huang195@gmail.com>
evaline-ju pushed a commit to evaline-ju/cortex that referenced this pull request Sep 1, 2026
glob v1 is a breaking API change, not just the engine rewrite its release
notes describe: Compile went from returning the Glob interface to a concrete
*Pattern, and the Glob interface was removed. authlib declares glob.Glob in
three packages (listener/skiphost, routing, plugins/tokenbroker), and OPA
declares it as well — v1/topdown/glob.go and v1/bundle/bundle.go, still true
at 1.20.1 — so glob v1 cannot be adopted here until OPA migrates. That is
outside this repo, so rossoctl#829 would be reopened on every glob release with no
action available.

Applied to the four gomod directories that require glob and have a Dependabot
entry. storage/redis does not require it; cmd/authbridge-cpex and
cmd/authbridge-praxis require it but have no Dependabot entry.

Matching semantics are deliberately not cited as a reason: a v0.2.3-vs-v1.0.0
differential over the repo's real pattern corpus (36 patterns x 29 hosts)
differed on two cells only, both on the empty host, which skiphost never
passes to glob. The contract is pinned separately in rossoctl#837.

Drop this ignore once OPA is on the glob v1 API.

Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Hai Huang <huang195@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update go code

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants