WebFinger endpoint from Zitadel users generator service
Files
README.md

zitadel-webfinger #

A simple Zitadel to WebFinger response generator for services that might require such a thing, notably Tailscale.

[azahi@eonwe:~]$ http -b https://bar.com/.well-known/webfinger?resource=acct:foo@bar.com
{
    "links": [
        {
            "href": "https://zitadel.example.com",
            "rel": "http://openid.net/specs/connect/1.0/issuer"
        }
    ],
    "subject": "acct:foo@bar.com"
}

Usage #

[azahi@eonwe:~]$ ./zitadel-webfinger \
  -listen 127.0.0.1:8829 \
  -zitadel-url "https://zitadel.example.com" \
  -zitadel-token "REDACTED"

The token should be a PAT for a user that has access to get a list of other users on your Zitadel instance.

This will make it listen to requests on 127.0.0.1:8829/webfinger. You can then use something like NGINX to proxy requests to the well-known path:

location /.well-known/webfinger {
  proxy_pass http://127.0.0.1:8829;
  proxy_set_header Host $host;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header X-Forwarded-Proto $scheme;
  proxy_set_header X-Forwarded-Host $host;
  proxy_set_header X-Forwarded-Server $host;
}