mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[PR #4660] [CLOSED] OIDC support for raw tokens and claim verification #5021
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#5021
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/4660
Author: @foresturquhart
Created: 2/6/2025
Status: ❌ Closed
Base:
dev← Head:feature/oidc-raw-token-hd-claim📝 Commits (3)
cda2cb1Implement OIDC raw token and hd claim verificationb499412Wrap new VerifyLogin logic in allowedHostedDomains length checkf62cd91Change from verifying hosted domains to verifying claims📊 Changes
5 files changed (+80 additions, -5 deletions)
View changed files
📝
pkg/auth/auth.go(+1 -1)📝
pkg/auth/oidc.go(+64 -1)📝
pkg/auth/oidc_test.go(+3 -3)📝
pkg/config/v1/client.go(+3 -0)📝
pkg/config/v1/server.go(+9 -0)📄 Description
Description
This pull request implements OIDC support for raw tokens and claim verification, as discussed in issue #4659.
This allows users to authenticate with
frpcusing pre-existing OIDC tokens (e.g., obtained fromgcloud auth print-identity-token) and enablesfrpsto restrict access to clients belonging to a specific Google Workspace. This is useful for scenarios like creating internal, organization-restricted tunneling services. This isn't Google-specific, but I've only tested the functionality with Google.Changes
rawTokenfield toAuthOIDCClientConfig(client-side).generateAccessTokento userawTokenif provided, bypassing the client credentials flow.allowedClaimsfield toAuthOIDCServerConfig(server-side).VerifyLoginto decode the JWT payload, extract claims, and compare them againstallowedClaimsbefore signature verification.Related Issue
Closes #4659
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.