mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-02 22:57:00 -05:00
Cloudflare Tunnel: Hide Cloudflare token from the process argument #1992
Labels
No labels
A:accessibility
A:api
A:cert-expiry
A:core
A:dashboard
A:deployment
A:documentation
A:domain expiry
A:incidents
A:maintenance
A:metrics
A:monitor
A:notifications
A:reports
A:settings
A:status-page
A:ui/ux
A:user-management
Stale
ai-slop
blocked
blocked-upstream
bug
cannot-reproduce
dependencies
discussion
duplicate
feature-request
feature-request
good first issue
hacktoberfest
help
help wanted
house keeping
invalid
invalid-format
invalid-format
question
releaseblocker 🚨
security
spam
type:enhance-existing
type:new
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/uptime-kuma#1992
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 @Eskander on GitHub (Mar 11, 2023).
⚠️ Please verify that this feature request has NOT been suggested before.
🏷️ Feature Request Type
Other
🔖 Feature description
When I run uptime-kuma in a Docker container and set up Cloudflare tunnel, the token is exposed outside the container and any random process running on the host machine can get it in plaintext, for example with a simple
ps -aux:This defeats the purpose of mechanisms such as Docker secrets, Kubernetes Secrets etc.., and I suppose the Cloudflare token should be treated as sensitive data because it effectively controls what's hosted on the website.
So in this feature request, I suggest to consider a different method to pass the token to cloudflared.
✔️ Solution
Environment variables are currently the recommended best practice in Docker(?), so this could be used to invoke cloudflared:
env TUNNEL_TOKEN=token_goes_here cloudflared tunnel runThe token is no longer exposed in the process list:
❓ Alternatives
Use a config file, it's apparently possible but I haven't looked into it.
Or keep things as is, if the current situation does not present a problem?
📝 Additional Context
No response
@bmidgley commented on GitHub (Sep 4, 2024):
A true Zero Trust philosophy would require this to be a high priority! It's over a year old!
@CommanderStorm commented on GitHub (Sep 4, 2024):
@bmidgley
If this is a priority to you, consider making the PR nessesary.
Things in open source move because volunteers spawn to do the work...
Why I don't consider it high priority for my use case (=> won't work on this during my vacation):
In docker the container is isolated from the host, the host is not isolated from the container. So from the host, you can see the files, network connections, network interfaces, processes, etc, that are used inside the container. But from the container, you can only see what's in the container (barring any privilege escalation configured in the run command).
There are a number of mechanisms you can configure to isolate the other way too (namespaces, hidepid, ..)
@bmidgley commented on GitHub (Sep 4, 2024):
@CommanderStorm I'm glad to see your response. It sounds like you are a volunteer. I believe Cloudflare the company should be making security a high priority and paying staff to work on these things in regular work hours. As a user of the system, I might just find another company that does similar work rather than fix this infrastructure. I love writing software, but I'm in the application and don't have time set aside to work in the security layers.
People who work in security are constantly trying to find ways to add layers of protection, monitoring, and validation in an endless arms race. It's not a satisfying story to say that container separation will protect us. It means only one privilege escalation is necessary to take advantage of this weakness.