Skip to content

feat: add auth proxy mode#112

Open
0x666c6f wants to merge 2 commits into
mainfrom
feature/pla-1781-erpc-auth-proxy
Open

feat: add auth proxy mode#112
0x666c6f wants to merge 2 commits into
mainfrom
feature/pla-1781-erpc-auth-proxy

Conversation

@0x666c6f

@0x666c6f 0x666c6f commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add an auth-proxy subcommand that checks configured eRPC auth before reverse-proxying to an upstream
  • reuse existing auth registries and rate-limit budgets, including DB-backed strategies
  • build the full cmd/erpc package so the new subcommand is included in Docker/GoReleaser/Makefile builds

Tests

  • go test ./cmd/... -count=1
  • go test ./auth ./upstream -count=1
  • make build

PLA-1781


Open in Devin Review

Copilot AI review requested due to automatic review settings July 6, 2026 15:26
@wiz-c998a0ef2b

wiz-c998a0ef2b Bot commented Jul 6, 2026

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings 1 Low
Software Management Finding Software Management Findings -
Total 1 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

@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: 581c5a5fb2

ℹ️ 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 cmd/erpc/auth_proxy.go Outdated

@devin-ai-integration devin-ai-integration 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

Copilot AI 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.

Pull request overview

Adds a new auth-proxy mode to the erpc CLI that authenticates incoming JSON-RPC requests using configured eRPC auth/rate-limits and then reverse-proxies the request to a configured upstream. This extends the CLI surface area and updates build packaging so the new subcommand ships in standard binaries/images.

Changes:

  • Add an auth-proxy subcommand to cmd/erpc that performs auth checks and then reverse-proxies to an upstream URL.
  • Update build/run entrypoints to build the full ./cmd/erpc package (Makefile, Dockerfile, GoReleaser) so the new subcommand is included.
  • Add initial unit test coverage for the auth-proxy’s secret auth + rate-limit behavior.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Makefile Build/run targets now build the full cmd/erpc package so new subcommands are included.
Dockerfile Container build now compiles ./cmd/erpc (with and without pprof tag).
cmd/erpc/main.go Registers the new auth-proxy CLI subcommand and --upstream flag.
cmd/erpc/auth_proxy.go Implements auth-checking reverse proxy server/handler.
cmd/erpc/auth_proxy_test.go Adds a test verifying secret auth and rate-limit enforcement before proxying.
.goreleaser.yaml GoReleaser build entrypoint changed to ./cmd/erpc to include all subcommands.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmd/erpc/auth_proxy.go
Comment thread cmd/erpc/auth_proxy.go Outdated
Comment thread cmd/erpc/auth_proxy.go Outdated
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.

2 participants