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

Service Token auth #13

Open
gunzino opened this issue Jul 26, 2024 · 6 comments
Open

Service Token auth #13

gunzino opened this issue Jul 26, 2024 · 6 comments

Comments

@gunzino
Copy link

gunzino commented Jul 26, 2024

Hello,

Would it be possible implement Service Token auth for "WARP Connector" so this would allow us to create true Site-to-Site VPN with pure WireGuard.

https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/private-net/warp-connector/

@rany2
Copy link
Owner

rany2 commented Jul 26, 2024

I'll have to research it, I don't know what this is

@MeesJ
Copy link

MeesJ commented Aug 20, 2024

I attempted using the CF_Authorization cookie obtained by authorizing with a service token at the TEAMNAME.cloudflareaccess.com/warp endpoint. However, it seems the current version of the warp.sh script isn't compliant with this authorization method. The following error is returned:

curl: (22) The requested URL returned error: 500

@rany2
Copy link
Owner

rany2 commented Aug 22, 2024

I doubt that that cookie is used to obtain a WG config. I'll have a look myself but my assumption is that everything is going to be different in terms of generating the config and it will not be a straightforward modification.

@MeesJ
Copy link

MeesJ commented Aug 24, 2024

I doubt that that cookie is used to obtain a WG config

Not directly, but the output of that cookie returns a JWT token as usual (https://developers.cloudflare.com/cloudflare-one/identity/service-tokens/).

@GaryChicago
Copy link

GaryChicago commented Aug 27, 2024

@MeesJ I did get this working (Cloudflare ZT/Teams w/ Service Auth) by pulling information from the cloudflare warp linux client. I can provide feedback here or we can start a group chat if we're interested in getting this working natively in this script.

My UDM Pro Max is natively connected via its wireguard client to cloudflare.

image

@rany2
Copy link
Owner

rany2 commented Sep 26, 2024

@GaryChicago Do you know how to MITM it? warp-svc on Linux seems to embed the trusted certificates into the binary itself so it's not trivial to modify it. If you have any tips I'd appreciate it.

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

No branches or pull requests

4 participants