Skip to content

feat(middleware)!: migrate to Fiber v3, cut /v3 major#121

Merged
rodrigodh merged 3 commits into
developfrom
feat/fiber-v3
Jul 15, 2026
Merged

feat(middleware)!: migrate to Fiber v3, cut /v3 major#121
rodrigodh merged 3 commits into
developfrom
feat/fiber-v3

Conversation

@rodrigodh

Copy link
Copy Markdown
Contributor

What

Migrates lib-auth to Fiber v3.4.0 and cuts the /v3 module major. Part of the coordinated Fiber v2→v3 wave, after lib-observability (v2.0.0-beta.1) and lib-commons (v6.0.0-beta.2).

Changes

  • Module path → github.com/LerianStudio/lib-auth/v3
  • gofiber/fiber v2 → v3.4.0; consumes the published betas lib-commons/v6 v6.0.0-beta.2 + lib-observability/v2 v2.0.0-beta.1 (no local replace)
  • Authorize(...) handler now func(c fiber.Ctx) error (v3 interface, by value) using c.Context() — merged cleanly with develop's product-param rename
  • golang.org/x/textv0.39.0 (CVE-2026-56852)
  • .trivyignore: accept GO-2026-5932 (x/crypto/openpgp unmaintained, no fix, not imported — pulled transitively by fiber v3's acme/autocert). No fiber/v2 in the graph (lib-auth doesn't use the huma wrapper).

Validation

go build ./..., go test ./..., golangci-lint — all green against the published betas.

Post-merge note

lib-auth's last tag is a prerelease (v2.9.0-beta.3), so semantic-release will mis-tag the /v3 cut as a v2 beta (same as lib-commons did). It will need a manual v3.0.0-beta.1 bootstrap tag after merge before consumers can pin it.

BREAKING CHANGE: consumers must move to /v3 and Fiber v3.

Bump gofiber/fiber v2->v3.4.0 and cut the /v3 module major. Consume the
published betas lib-commons/v6 v6.0.0-beta.2 and lib-observability/v2
v2.0.0-beta.1 (no local replace). Authorize's handler is now func(c fiber.Ctx)
(interface by value) and uses c.Context(); merged with develop's product-param
rename. Bump golang.org/x/text to v0.39.0 (CVE-2026-56852).

BREAKING CHANGE: module path is now github.com/LerianStudio/lib-auth/v3 and the
Authorize middleware requires Fiber v3.

X-Lerian-Ref: 0x1
Fiber v3 pulls golang.org/x/crypto via acme/autocert; the openpgp advisory
has no fixed version and the package is not imported.

X-Lerian-Ref: 0x1
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 64aaf1e5-9b7a-4837-a761-99ba59a8c838

📥 Commits

Reviewing files that changed from the base of the PR and between 4597cc1 and c78123e.

📒 Files selected for processing (1)
  • README.md

📝 Walkthrough

Walkthrough

The project was migrated to the lib-auth/v3 module path, with updated dependency versions and middleware imports. HTTP tracing now uses Fiber’s context accessor, documentation references v3, and a dated Trivy ignore rule was added.

Changes

lib-auth v3 migration

Layer / File(s) Summary
Module and dependency migration
go.mod
The module path changed to github.com/LerianStudio/lib-auth/v3, with updated direct and indirect dependency declarations and versions.
Middleware integration updates
auth/middleware/middleware.go, auth/middleware/middlewareGRPC.go, auth/middleware/middleware_test.go
Middleware and test imports moved to the newer commons, observability, and Fiber packages; HTTP tracing now uses c.Context().
Release documentation and security metadata
README.md, .trivyignore
Installation and middleware examples reference v3, and a dated Trivy ignore entry was added for the transitive OpenPGP finding.
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feat/fiber-v3

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.trivyignore:
- Around line 1-5: The .trivyignore exception is not constrained against future
direct imports of golang.org/x/crypto/openpgp. Add a CI guard using govulncheck
./... or an equivalent import-path check that fails when this module directly
imports golang.org/x/crypto/openpgp, while preserving the existing
transitive-dependency exception.

In `@README.md`:
- Line 10: Update the README installation command to remove the -u flag and
explicitly request the latest or a pinned lib-auth/v3 release, preventing
unrelated dependency upgrades.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: deeb0125-5863-4a38-85a5-6db3002ee406

📥 Commits

Reviewing files that changed from the base of the PR and between 2c2cf15 and 4597cc1.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (6)
  • .trivyignore
  • README.md
  • auth/middleware/middleware.go
  • auth/middleware/middlewareGRPC.go
  • auth/middleware/middleware_test.go
  • go.mod

Comment thread .trivyignore
Comment thread README.md Outdated
go get -u upgrades all of the consumer's dependencies; pin to @latest so
the install snippet only affects lib-auth. (CodeRabbit #121)

X-Lerian-Ref: 0x1
@rodrigodh
rodrigodh merged commit d8b7285 into develop Jul 15, 2026
3 checks passed
@rodrigodh
rodrigodh deleted the feat/fiber-v3 branch July 15, 2026 19:47
@lerian-studio-midaz-push-bot

Copy link
Copy Markdown

🎉 This PR is included in version 3.0.0-beta.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@lerian-studio-midaz-push-bot

Copy link
Copy Markdown

🎉 This PR is included in version 3.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant