tailscale / tailscale-client-go

A client implementation for the Tailscale HTTP API
MIT License
61 stars 27 forks source link

tailscale: support Grants field to ACL #67

Closed zchee closed 9 months ago

zchee commented 10 months ago

Support https://tailscale.com/kb/1324/acl-grants.

zchee commented 10 months ago

@twitchyliquid64 Use tailslace.com/tailcfg directly. PTAL.

zchee commented 9 months ago

@twitchyliquid64 @creachadair gentle ping

zchee commented 9 months ago

@twitchyliquid64 @creachadair sorry, gentle ping again

knyar commented 9 months ago

Hey, quick question: are you doing this to get grants support in Terraform, or do you have a different use case for this client?

Longer term we'd like to avoid having to maintain a copy of the policy schema here, especially for beta features (like grants) that we might still want to make some backwards incompatible changes to. The alternative we discussed is supporting passing policy as a hujson blob to the API without re-serializing it. If your end goal is to use this in Terraform, would that be a viable alternative?

knyar commented 9 months ago

We have removed usage of local schema in the Terraform provider in https://github.com/tailscale/terraform-provider-tailscale/pull/332, and you should be able to use the Grants field starting with v0.14.0 of the provider. If you are using this library directly, you can now pass the ACL as a HuJSON string to the SetACL method.