#is it possible to interface tunnels with workers?

20 messages · Page 1 of 1 (latest)

willow silo
#

is it possible to make calls from workers to tunnels without necessarily exposing the tunnels directly to the internet via a domain?

stable crow
#

Not really, the closest you can get is protecting the tunnel hostnames with Access and adding a Service Token as a secret to the Worker

willow silo
#

very interesting, i haven't worked with Access at all. can you give a quick summary of how that would be done? is there a library available to the workers that works with Access?

stable crow
#

Its not the most perfect security in the world (relies on a static secret) but its as good as you can get

willow silo
#

alright, i've figured out how to create a service token. and I think i can figure out how to set those headers. but how do i set a tunnel to be protected by the service token?

stable crow
willow silo
#

ah, i see it:

stable crow
#

You can then specify a certain service token in the "additional rules"

#

Or just yolo it and accept any:

willow silo
#

what about session duration?

stable crow
#

Its irrelevant for service auth policies

willow silo
#

perfect, going to the tunnel in my browser is blocked. that's expected. tomorrow i will try through the worker

#

many thanks dogekek

stable crow
#

Yep if the only policy is Service Auth then you get the nice Forbidden page

willow silo
#

this is very convenient

stable crow
#

There is also a setting to redirect it to another page instead

#

Under "Non-identity failure block page" in the Access application settings

neat merlin