Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support add additional params for OIDC #2814

Merged
merged 2 commits into from
Mar 7, 2022

Conversation

blizard863
Copy link
Collaborator

@blizard863
Copy link
Collaborator Author

This PR is tested by standard OAuth 2.0, Auth0 and Authing. I think it's reasonable.

@blizard863 blizard863 force-pushed the support-not-standard-oidc branch 2 times, most recently from 5ab5c3f to 6c0981d Compare February 22, 2022 04:20
@blizard863
Copy link
Collaborator Author

Hello @addisonj I saw your PR #2802 .

I think the auth0 is using not-standard OAuth2.0.

https://datatracker.ietf.org/doc/html/rfc6749
https://community.auth0.com/t/client-credentials-with-postman/34282/5

I warry about if there are auth1, auth2 companies which also need audience parameters but its value is not equal "cfg.OidcAudience" but "foobar". So I think hard code in frp is not suitable. I make it configurable.

And also, I register a auth0 service account. In my PR, I test as follow.

image

image

frps.ini

authentication_method = oidc
oidc_issuer = https://dev-xxx.us.auth0.com/
oidc_audience = https://dev-xxx.us.auth0.com/api/v2/

frpc.ini
authentication_method = oidc
oidc_client_id = pExxxKqoxxxBH
oidc_client_secret = F3492WS5pxxxxx8OG83DWxxxxx5nP3Oe-Lxcaoxxxx
oidc_audience = ""
oidc_token_endpoint_url = https://dev-xxx.us.auth0.com/oauth/token
oidc_additional_audience = https://dev-xxx.us.auth0.com/api/v2/   // It will be set by frp  audience=<value> 

It pass test in auth0 service.


@fatedier @GuyLewin WDYT ?

@addisonj
Copy link

addisonj commented Mar 2, 2022

@bingtianbaihua I think this seems reasonable. I was thinking of something like this as well might be preferable. LGTM!

@blizard863
Copy link
Collaborator Author

@bingtianbaihua I think this seems reasonable. I was thinking of something like this as well might be preferable. LGTM!

@addisonj OK,I will refine my code and merge it these days. By the way you can close your PR.

@blizard863 blizard863 force-pushed the support-not-standard-oidc branch from 6c0981d to 326a164 Compare March 6, 2022 08:08
@fatedier fatedier merged commit cd31359 into fatedier:dev Mar 7, 2022
@blizard863 blizard863 deleted the support-not-standard-oidc branch March 7, 2022 08:40
github-actions bot added a commit to aiastia-dockerhub/frp that referenced this pull request Mar 7, 2022
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.

4 participants