Using Service Auth for Gitea Access via Git Client + Cloudflare Tunnel
previous, I added a Cloudflare Zero Trust Application Access for my gitea with a one-time password, but when I use a git client to push code, it redirects me to Cloudflare Tunnel with a one-time password
So, in this blog, I want to create a Service Auth to ByPass access to Gitea, if I have a special key. Otherwise, it redirects to Cloudflare Tunnel with a one-time passwordProblem
Solution
Table of Contents
- Setup Gitea (Optional)
- Create Service Auth
- Create a ByPass Policy
- Add Cloudflare Zero Trust Application Access
- Configure your git config with the Service Auth header
- Test
Setup Gitea (Optional)
I have a docker compose file ready for deployment (I use it on my Synology NAS)
Create Service Auth
- Cloudflare Zero Trust Dashboard > Access > Service Auth > Create Service
- Save CF-Access-Client-Id / CF-Access-Client-Secret, for adding in the git client
Create a ByPass Policy
- Cloudflare Zero Trust Dashboard > Access > Policies > Add Policies
- Create a ByPass for Gitea with condition Service Auth (gitea)
Add Cloudflare Zero Trust Application Access
- Cloudflare Zero Trust Dashboard > Access > Applications > Add an application > Self-hosted
- Set Gitea Domain
- Add Policy First
1. ByPass Policy (Service Auth)
2. One-Time Password, if the ByPass Policy does Not Match
Configure your git config with the Service Auth header
Run the following command to tell git client to add an extra header with the Gitea URL
git config --global --add http.https://yourgitdomain/.extraHeader "CF-Access-Client-Id: CF_Service_Auth_Access"git config --global --add http.https://yourgitdomain/.extraHeader "CF-Access-Client-Secret: CF_Service_Auth_Access_Secret"
MegatronicThronBanks
in reply to Robert Roskam • • •systemd must burn in holy fire.
hackbyte (friendica) 13HB1
in reply to MegatronicThronBanks • • •Roy Brander🇨🇦
in reply to Robert Roskam • • •Unix junkie who basically agrees.
But....does FFMPEG do just one thing because it edits video?
Because it *feels* like what they called Perl 35 years back: A Swiss Army Chainsaw.
hackbyte (friendica) 13HB1
in reply to Roy Brander🇨🇦 • • •@Roy Brander🇨🇦 @Robert Roskam Well, imho ffmpeg is just a bigger tool like sox for audio, or imagemagick for images....
There are several sides to all this. ;)