mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[PR #5234] [MERGED] auth/oidc: fix eager token fetch at startup, add validation and e2e tests #5195
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#5195
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fatedier/frp/pull/5234
Author: @fatedier
Created: 3/13/2026
Status: ✅ Merged
Merged: 3/15/2026
Merged by: @fatedier
Base:
dev← Head:new📝 Commits (1)
ad23930auth/oidc: fix eager token fetch at startup, add validation and e2e tests📊 Changes
12 files changed (+885 additions, -35 deletions)
View changed files
📝
Release.md(+1 -0)📝
client/service.go(+23 -12)📝
client/service_test.go(+106 -0)📝
pkg/auth/oidc.go(+52 -15)📝
pkg/auth/oidc_test.go(+105 -7)📝
pkg/config/v1/validation/client.go(+5 -0)➕
pkg/config/v1/validation/oidc.go(+57 -0)➕
pkg/config/v1/validation/oidc_test.go(+78 -0)📝
pkg/util/http/server.go(+5 -1)📝
pkg/vnet/controller.go(+3 -0)➕
test/e2e/mock/server/oidcserver/oidcserver.go(+258 -0)➕
test/e2e/v1/basic/oidc.go(+192 -0)📄 Description
Summary
NewOidcAuthSetterno longer eagerly fetches a token at construction time. Instead, anoidcTokenSourcewrapper defers the first fetch toSetLogin()insideloopLoginUntilSuccess(), so transient IdP outages no longer prevent the client from starting.ValidateOIDCClientCredentialsConfigfor early detection of misconfigured OIDC client credentials (missing clientID, invalid tokenEndpointURL, conflicting params).expires_in(with token request count assertion)Test plan
go test ./pkg/auth/...— unit tests pass (6 tests)go test ./pkg/config/v1/validation/...— validation tests passgolangci-lint run— 0 issuesmake e2e --ginkgo.focus="Feature: OIDC"— 4 OIDC e2e tests passmake e2e— full e2e suite passes (only pre-existing Ports Whitelist failure)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.