I had issues configuring access to resources when using the Location Gateway.
The requirement - private services meant for internal company use, such as CI/CD portal, Monitoring portal, etc., should be protected behind VPN + Auth.
I’ve already configured Cloudflare authentication with Google WorkSpace; Here’s how I did it Cloudflare Teams and Google Workspace Integration.
All my applications are protected with Google Workspace authentication.
I’m using cloudflared in Kubernetes and trying to access my application from my macOS device, which has WARP client installed. My WARP client is authenticated with my Cloudflare team.
Initially, I’ve set my application with the following Policy Rule
- warp: Allow > Include > Gateway
IMPORTANT: You must selectGateway
in Device Postures before using it
I logged into https://mydomain.cloudflareaccess.com/
from my macOS, and my application appeared in the App Launcher
The application appears only if I’m connected with the WARP client; otherwise, it’s missing. That is the expected behavior (so far)
Though when hitting it or trying to access it, I got to this page:
Forbidden
You do not have permission to view this page
- Ray ID: 6c360458xxxxxxxxxx
- IP Address: 5.10.x.x
I recognized the IP Address as it’s the one that was added in Locations > Gateway > mygateway after I hit Add IP. It feels like I don’t have permissions somewhere else because everything is set correctly with my Gateway, app Policy Rule, and WARP client …
I’ve added another Policy Rule that Allows traffic from Emails ending with in
mydomain.com. So I ended up with two (2) Policy Rules for my application:
- private: Allow >
- Include > Gateway
IMPORTANT: You must selectGateway
in Device Postures before using it - Include >
Emails ending with in
mydomain.com
- Include > Gateway
NOTE: I’ve tried adding Emails ending with in
to the Require
block, because I should it should be AND
, but seems like it doesn’t work, though putting as an Include
statement does the trick.
The application is now accessible only by end-users running a WARP client, which is authenticated with my Cloudflare Team.
Troubleshooting Tip - To make sure that the WARP client is configured correctly, log into the App Launcher mydomain.cloudflareaccess.com
, click on Account, and inspect the User identity
; If everything is configured correctly, you should see is_warp=true
and is_gateway=true
.
{
...
"is_warp": true,
"is_gateway": true,
...
}
Thank you, Cloudflare, for making it happen - I’m dropping my AWS NLB because of that
I’d love to hear tips/recommendations/comments, so feel free to share your thoughts.