Add support for OAuth clients
Are you interested in adding support for using OAuth clients to authenticate? Regular API keys expire after at most 90 days, but OAuth client secrets never expire. This is helpful when setting up automation scripts where you don't want to have to update the key periodically.
I think this would not be too difficult:
- [ ] Add class variables for
oauth_client_idandoauth_client_secretto theTailscaleclass - [ ] Add method to call
https://api.tailscale.com/api/v2/oauth/tokenand save the token as theapi_keyon the class - [ ] Change the
_request()method to send the headerAuthorization: Bearer [...]instead of basic auth
The API documentation suggests you can use Authorization: Bearer [...] with a normal API key as well.
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
@frenck Any thoughts on this proposal?
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
I am happy to submit a pull request if it is likely to be accepted.
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
Activity on this issue.
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
@williamjacksn I tried making a PR #379 for this a while ago, but @frenck never re-reviewed after I address his first round of feedback
I think this repo needs additional maintainers...
Thanks for letting me know @clayrosenthal. It's too bad this repo has the nice name on PyPI:
- https://pypi.org/project/tailscale/
And I see we have some other options:
- https://pypi.org/project/tailscale_agent/ | https://github.com/kevinbringard/tailscale-python-client/
- https://pypi.org/project/tailscale-fixed/ | https://github.com/lmagyar/python-tailscale
I ended up publishing my own:
- https://pypi.org/project/tailscale-api/
tailscale-fixed "author" here (just merged eg. together and published it in a hurry, first fix is already out...)
As I see both tailscale_agent and tailscale-api are non-async.
And tailscale_agent covers a lot of (or all?) the API functions, but I don't see structured dataclasses, and tailscale-api covers only the devices function, and the model lacks ClientConnectivity, ClientSupports, Latency.
Correct me if I'm wrong, I'm not a python guru and only run through the sources.