Fix gRPC auth metadata keys, allow TLS 1.2 for Android clients

- Read x-engpad-username/x-engpad-password from gRPC metadata
  (matching what the Android client sends)
- Allow TLS 1.2 on gRPC port — Android's BoringSSL/OkHttp transport
  does not negotiate TLS 1.3 without Conscrypt

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-25 09:08:24 -07:00
parent 691301dade
commit ab2884a8e9
2 changed files with 3 additions and 3 deletions

View File

@@ -29,8 +29,8 @@ func AuthInterceptor(database *sql.DB) grpc.UnaryServerInterceptor {
return nil, status.Error(codes.Unauthenticated, "missing metadata")
}
usernames := md.Get("username")
passwords := md.Get("password")
usernames := md.Get("x-engpad-username")
passwords := md.Get("x-engpad-password")
if len(usernames) == 0 || len(passwords) == 0 {
return nil, status.Error(codes.Unauthenticated, "missing credentials")
}