Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipn/ipnlocal: add /reset-auth LocalAPI endpoint #7094

Merged
merged 1 commit into from Jan 28, 2023
Merged

Conversation

mihaip
Copy link
Contributor

@mihaip mihaip commented Jan 27, 2023

The iOS has a command to reset the persisted state of the app, but it was doing its own direct keychain manipulation. This proved to be brittle (since we changed how preferences are stored with #6022), so we instead add a LocalAPI endpoint to do do this, which can be updated in tandem.

This clears the same state as the iOS implementation (tailscale/corp#3186), that is the machine key and preferences (which includes the node key). Notably this does not clear the logtail ID, so that logs from the device still end up in the same place.

Updates tailscale/corp#8923

ipn/ipnlocal/local.go Outdated Show resolved Hide resolved
ipn/ipnlocal/local.go Outdated Show resolved Hide resolved
Copy link
Member

@bradfitz bradfitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But LGTM, misc comments aside.

@mihaip mihaip force-pushed the mihaip/reset-auth branch 2 times, most recently from f54aa91 to 5a4d467 Compare January 28, 2023 00:09
The iOS has a command to reset the persisted state of the app, but it
was doing its own direct keychain manipulation. This proved to be
brittle (since we changed how preferences are stored with #6022), so
we instead add a LocalAPI endpoint to do do this, which can be updated
in tandem.

This clears the same state as the iOS implementation (tailscale/corp#3186),
that is the machine key and preferences (which includes the node key).
Notably this does not clear the logtail ID, so that logs from the device
still end up in the same place.

Updates tailscale/corp#8923

Signed-off-by: Mihai Parparita <mihai@tailscale.com>
@mihaip mihaip merged commit 4973956 into main Jan 28, 2023
@mihaip mihaip deleted the mihaip/reset-auth branch January 28, 2023 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants