mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #2822] [feature] frp_oidc requires a parameter to use auth0 OIDC #2258
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#2258
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?
Originally created by @StarryVoid on GitHub (Mar 2, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/2822
Originally assigned to: @blizard863 on GitHub.
Bug Description
Hi
I just tested the linkage between auth0 and frp_oidc, and it is very similar to the configuration #2814 used, but an error is reported
The Log is
The failed request (curl) (audience="")
The successful request (curl) (Have audience)
The Config is
The Auth0 Config
Auth0 && FRP_OIDC
I think the problem is the same as #2814 .
我在网络上查找关于 OIDC 相关的内容,检索到了 Auth0 这个服务
原本想使用 github 的 oidc 服务,但并没有找到相关的详细文档 [ URL / URL2 ]
本项目中涉及到相关问题的是 #2814 望解决
frpc Version
0.39.1
frps Version
0.39.1
System Architecture
linux/amd64
Configurations
frps.ini
authentication_method = oidc
oidc_issuer = https://dev-xxx.jp.auth0.com/
oidc_audience = https://dev-xxx.jp.auth0.com/api/v2/
frpc.ini
authentication_method = oidc
oidc_client_id = "IDXXXXXXXX"
oidc_client_secret = "SXXXXXXXX"
oidc_token_endpoint_url = "https://dev-xxx.jp.auth0.com/oauth/token/"
oidc_additional_audience = "https://dev-xxx.jp.auth0.com/api/v2/"
Logs
2022/03/02 13:43:33 [W] [service.go:105] login to server failed: couldn't generate OIDC token for login: oauth2: cannot fetch token: 403 Forbidden
Response: {"error":"access_denied","error_description":"No audience parameter was provided, and no default audience has been configured"}
couldn't generate OIDC token for login: oauth2: cannot fetch token: 403 Forbidden
Response: {"error":"access_denied","error_description":"No audience parameter was provided, and no default audience has been configured"}
Steps to reproduce
...
Affected area
@blizard863 commented on GitHub (Mar 2, 2022):
https://github.com/fatedier/frp/pull/2814/files
Maybe a solution.
@StarryVoid commented on GitHub (Mar 3, 2022):
Thx . i think it's great
And i want to know how to associate the service provider api to the frp_oidc configuration parameter.and no documentation to explain what's going on.
1、"frpc_oidc_client_id / oidc_client_secret '
i think it's need to be manually generated ,no need to say.
2、"frpc_oidc_token_endpoint_url"
i guess it's the same as "oauth to get access_token". like Auth0 Azure Github
3、"frpc_oidc_additional_audience"
I don't know if the configuration is correct or wrong
4、 "frps_oidc_issuer"
i guess it's the same as "openid-connect-discovery". like Azure Github Auth0 . but the configuration is truncated prefix ".well-known/openid-configuration"
5、frps_oidc_audience
I don't know if the configuration is correct or wrong
Consult documentation
https://docs.microsoft.com/zh-cn/azure/active-directory/develop/v2-protocols-oidc
https://docs.microsoft.com/zh-cn/azure/active-directory/develop/access-tokens
https://docs.microsoft.com/zh-cn/azure/active-directory/develop/id-tokens
https://auth0.com/docs/get-started/applications
https://docs.github.com/en/developers/apps/building-oauth-apps/authorizing-oauth-apps
Auth0 (wrong) (Need audience="***" )
Github (wrong) (I think Github doesn't support oidc)
Azure (wrong)
@blizard863 commented on GitHub (Mar 3, 2022):
Hello @StarryVoid , this is an interesting question, I want to give my understand, maybe it's wrong but I want to discuss with you.
oidc_additional_xxx params is not support in frp release version but in my PR, maybe this PR will be merged. I test my PR by auth0, authing services, you can pull my code and build it, I guess it will be success in auth0 service.
OAuth 2.0 support some grant_types, such as Authorization Code, Password, Client Credentials and so on. frp use the Client Credentials, this is a standard usage. By the way I search github document by key words "client credentials", there is no related documentation. So I guess github is not support this grant_type ?

I also read the Azure document, https://docs.microsoft.com/zh-cn/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow, you can try this. Hope to hear your good news.
reference:
https://docs.github.com/en/developers/apps/building-oauth-apps/authorizing-oauth-apps
https://datatracker.ietf.org/doc/html/rfc6749#section-4.1
@blizard863 commented on GitHub (Mar 3, 2022):
frp_oidc document is few, it's really necessary to explain every params.
I will do a series of usage documents against this document https://datatracker.ietf.org/doc/html/rfc6749.
@github-actions[bot] commented on GitHub (Apr 8, 2022):
Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
@Tongzhongren commented on GitHub (Jul 15, 2022):
您好,我想知道OIDC 认证的时候 oidc_issuer oidc_audience oidc_client_id oidc_client_secret oidc_audience oidc_token_endpoint_url 说明是什么
@StarryVoid commented on GitHub (Jul 15, 2022):
你好。@Tongzhongren
我不是开发者,这个东西是开发者早期根据其他人写的代码合并进来的,并且还不完善,文档也缺失
其次这个问题在上面我已经阐述了对应关系 https://github.com/fatedier/frp/issues/2822#issuecomment-1057654887 相关名称均为 参数 名
接着如果你想了解OIDC,我觉得你可以去了解Auth0的相关文档
最后上文中讨论的修复,仅适配了 auth0 等类似的 OIDC 认证方式,而实际上非标OIDC有许多验证条件,FRP只是提取了部分验证条件加以使用,在对接非标OIDC时都会在验证中失败。解决的部分问题只是让普通用户能在标准OIDC的验证流程中正常使用,且已经PR完毕,目前应该不会再次出现此issue的问题(未验证)