You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale-android/android
Andrea Gottardo 1428c54e6c mdm: throw ErrNoSuchKey when a value not defined in Android syspolicy handler
Fixes tailscale/tailscale#11716

The implementation of the syspolicy handler on Android was incomplete. As explained in the comments (65f215115f/util/syspolicy/handler.go (L27)), a syspolicy handler should return a `syspolicy.ErrNoSuchKey` error when a value is not defined for a given key. The Android handler was instead returning an empty string.

When attempting to log in with a custom coordination server, since we were not returning syspolicy.ErrNoSuchKey, the caller into the syspolicy package (65f215115f/ipn/prefs.go (L665)) was always fetching an empty string from the MDM setting instead of using the default value `p.ControlURL`. Fallback logic would therefore always use the `DefaultControlURL` instead of the value defined in preferences.

Verified that upon specifying a custom coordination server in the app UI, a login screen for that coordination server appears and I can connect the Android device to that custom coordination server.

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
7 months ago
..
gradle/wrapper android: update gradle (#112) 1 year ago
src mdm: throw ErrNoSuchKey when a value not defined in Android syspolicy handler 7 months ago
build.gradle go.mod: update for 1.65.0 (#319) 7 months ago
gradle.properties build.gradle: increase JVM memory settings (#145) 10 months ago
gradlew update dependencies 12 months ago
gradlew.bat update dependencies 12 months ago