Skip to content

FR: Add OAuth key support #48

@shubb30

Description

@shubb30

I was trying for several days to get this to work, until I turned on Tailscale debug logs, and found.

"level":"debug","ts":1715360455.7697527,"logger":"tailscale","msg":"Received error: key cannot be used for node auth: {KeyCapabilityBits(CONTROL_API_SCOPE_DEVICES|OAUTH_CLIENT) [tag:caddy-test]}"}

Switching to a personal token works correctly.
The same OAuth token can be used for standard Tailscale client auth. Please add OAuth token support to this plugin.

Here are the Caddy Tailscale build info.

ep	github.com/tailscale/caddy-tailscale	v0.0.0-20240507224936-af99185a32ce	h1:hcYvYL4T6kU8JvDKzN5AkfQkxnppa7Zn5XWncEQTwRE=
dep	github.com/tailscale/golang-x-crypto	v0.0.0-20240108194725-7ce1f622c780	h1:U0J2CUrrTcc2wmr9tSLYEo+USfwNikRRsmxVLD4eZ7E=
dep	github.com/tailscale/goupnp	v1.0.1-0.20210804011211-c64d0f06ea05	h1:4chzWmimtJPxRs2O36yuGRW3f9SYV+bMTTvMBI0EKio=
dep	github.com/tailscale/hujson	v0.0.0-20221223112325-20486734a56a	h1:SJy1Pu0eH1C29XwJucQo73FrleVK6t4kYz4NVhp34Yw=
dep	github.com/tailscale/netlink	v1.1.1-0.20211101221916-cabfb018fe85	h1:zrsUcqrG2uQSPhaUPjUQwozcRdDdSxxqhNgNZ3drZFk=
dep	github.com/tailscale/peercred	v0.0.0-20240214030740-b535050b2aa4	h1:Gz0rz40FvFVLTBk/K8UNAenb36EbDSnh+q7Z9ldcC8w=
dep	github.com/tailscale/tscert	v0.0.0-20230806124524-28a91b69a046	h1:8rUlviSVOEe7TMk7W0gIPrW8MqEzYfZHpsNWSf8s2vg=
dep	github.com/tailscale/web-client-prebuilt	v0.0.0-20240226180453-5db17b287bf1	h1:tdUdyPqJ0C97SJfjB9tW6EylTtreyee9C44de+UBG0g=
dep	github.com/tailscale/wireguard-go	v0.0.0-20231121184858-cc193a0b3272	h1:zwsem4CaamMdC3tFoTpzrsUSMDPV0K6rhnQdF7kXekQ=
dep	tailscale.com	v1.62.0	h1:iI1fPDNXXETMbVEatos7xSR6Bv6aCuonD7B1X3glnPE=

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions