Od 27 marca 2025 r. zalecamy używanie android-latest-release zamiast aosp-main do kompilowania i wspołtworzenia AOSP. Więcej informacji znajdziesz w artykule o zmianach w AOSP.
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Na urządzeniach z Androidem 13 lub nowszym Android obsługuje podejście uwierzytelniania z zaufanym serwerem (TOFU) (RFC7435), które pozwala użytkownikom zaufać sieci korporacyjnej (EAP) przez zainstalowanie głównego urzędu certyfikacji używanego przez serwer i ustawienie nazwy jego domeny w zapisanej sieci. TOFU umożliwia urządzeniu uzyskanie nieautoryzowanego klucza publicznego, gdy użytkownik po raz pierwszy łączy się z siecią korporacyjną, i zachowuje ten klucz na potrzeby kolejnych połączeń.
Tło
W odróżnieniu od sieci osobistych, które wymagają tylko hasła, sieci korporacyjne korzystają z uwierzytelniania za pomocą infrastruktury kluczy publicznych (PKI), co wymaga wstępnej instalacji certyfikatów. W Androidzie 11 lub starszym użytkownicy mogą wybrać opcję Nie weryfikuj dla certyfikatu CA serwera w ustawieniach sieci, omijając weryfikację certyfikatu po stronie serwera. Aby jednak zwiększyć bezpieczeństwo i zapewnić zgodność ze specyfikacją WPA R2, w Androidzie 12 wprowadzono wymóg weryfikacji certyfikatu serwera w sieciach korporacyjnych. Ten dodatkowy wymóg stanowił barierę dla użytkowników, ponieważ musieli oni instalować certyfikat CA dla takich sieci. Dzięki TOFU użytkownicy mogą łączyć się z firmową siecią opartą na protokole PKI, po prostu akceptując jej główny urząd certyfikacji.
Opis funkcji
Gdy użytkownik łączy się z siecią firmową, która nie ma już zainstalowanego uwierzytelnionego klucza publicznego, urządzenia obsługujące TOFU wyświetlają następujące zachowanie.
Łączenie z nową siecią za pomocą selektora sieci Wi-Fi
Wybierz nową sieć firmową w selektorze Wi-Fi.
Urządzenie wyświetla okno (rysunek 1) z prośbą o potwierdzenie, czy sieć jest zaufana.
Kliknij Tak, połącz, aby zaakceptować połączenie z siecią, lub Nie, nie łącz, aby odrzucić.
Jeśli klikniesz Tak, połącz, urządzenie automatycznie skonfiguruje parametry zabezpieczeń, połączy się z siecią i włączy automatyczne łączenie z tą siecią.
Jeśli klikniesz Nie, nie łącz, urządzenie rozłączy się z siecią i wyłączy automatyczne łączenie z nią.
Rysunek 1. Okno funkcji TOFU
Łączenie z istniejącą siecią z włączonym automatycznym łączeniem
Podczas łączenia się z siecią firmową, która ma włączone automatyczne połączenie, ale nie ma ważnego certyfikatu CA, urządzenie łączy się automatycznie, a następnie wyświetla trwałe (nieusuwalne) powiadomienie.
Kliknij powiadomienie.
Urządzenie wyświetla okno (rysunek 1) z prośbą o potwierdzenie, czy sieć jest zaufana.
Kliknij Tak, połącz, aby zaakceptować połączenie z siecią, lub Nie, nie łącz, aby odrzucić.
Jeśli klikniesz Tak, połącz, urządzenie automatycznie skonfiguruje parametry zabezpieczeń, połączy się z siecią i włączy automatyczne łączenie z tą siecią.
Jeśli klikniesz Nie, nie łącz, urządzenie rozłączy się z siecią i wyłączy automatyczne łączenie z nią.
Aby zweryfikować implementację funkcji TOFU na urządzeniu, użyj tych testów:
CTS: CtsWifiTestCases
VTS: VtsHalWifiSupplicantStaNetworkTargetTest
Treść strony i umieszczone na niej fragmenty kodu podlegają licencjom opisanym w Licencji na treści. Java i OpenJDK są znakami towarowymi lub zastrzeżonymi znakami towarowymi należącymi do firmy Oracle lub jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-09-02 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-09-02 UTC."],[],[],null,["For devices running Android 13 or higher, Android\nsupports the Trust on First Use (TOFU) authentication approach\n([RFC7435](https://datatracker.ietf.org/doc/html/rfc7435.html)),\nwhich lets users trust an enterprise (EAP) network by installing the root CA\nused by the server and setting its domain name in a saved network. TOFU allows\nthe device to obtain an unauthenticated public key when a user first connects\nto an enterprise network and retain the key for subsequent connections.\n\nBackground\n\nCompared to personal networks that just require a password, enterprise networks\nuse public key infrastructure (PKI) authentication, which requires the client\nto preinstall certificates. In Android 11 or lower, users can select the\n*Do not validate* option for the server CA certificate in the network settings,\nbypassing the validation of the server side certificate. However, to strengthen\nsecurity and comply with the WPA R2 specification, Android 12 introduced a\nrequirement for enterprise networks to have server certificate validation. This\nadditional requirement created a barrier for users as they need to install a CA\ncertificate for such networks. TOFU provides a way for users to connect to a\nPKI-based enterprise network by simply accepting its root CA.\n\nFeature behavior\n\nDevices that support TOFU display the following behavior when a user connects\nto an enterprise network that doesn't have an *already-installed*\nauthenticated public key.\n\nConnect to new network through Wi-Fi picker\n\n1. Select a new enterprise network in Wi-Fi picker.\n\n The device displays a dialog (Figure 1) to confirm whether the\n network is trusted.\n2. Tap **Yes, connect** to accept the network connection, or tap **No, don't\n connect** to decline.\n\n - If you tap **Yes, connect**, the device automatically configures the\n security parameters, connects to the network, and enables autoconnect\n for the network.\n\n | **Note:** Misconfigured networks that use invalid or expired certificates might not allow any security validation by the device. In such cases, the device fails to connect to the network.\n - If you tap **No, don't connect**, the device disconnects from the\n network and disables autoconnect for the network.\n\n **Figure 1.** Dialog for the TOFU feature\n\nConnect to existing network with autoconnect enabled\n\nWhen connecting to an enterprise network that has autoconnect enabled but\ndoesn't have a valid CA certificate, the device connects automatically, then\ndisplays a sticky (nondismissable) notification.\n\n1. Tap the notification.\n\n The device displays a dialog (Figure 1) to confirm whether the\n network is trusted.\n2. Tap **Yes, connect** to accept the network connection, or tap **No, don't\n connect** to decline.\n\n - If you tap **Yes, connect**, the device automatically configures the\n security parameters, connects to the network, and enables autoconnect\n for the network.\n\n | **Note:** Misconfigured networks that use invalid or expired certificates might not allow any security validation by the device. In such cases, the device fails to connect to the network.\n - If you tap **No, don't connect**, the device disconnects from the\n network and disables autoconnect for the network.\n\nImplementation\n\nTo support the TOFU feature, implement the supplicant HALs provided in the\nAndroid Open Source Project (AOSP) at\n[`/hardware/interfaces/wifi/supplicant/aidl/android/hardware/wifi/supplicant`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/wifi/supplicant/aidl/android/hardware/wifi/supplicant).\n\nThe following public APIs are available in Android 13\nfor use by apps:\n\n- [`WifiManager#isTrustOnFirstUseSupported()`](https://developer.android.com/reference/android/net/wifi/WifiManager#isTrustOnFirstUseSupported()): Indicates whether the device supports TOFU.\n- [`WifiEnterpriseConfig#enableTrustOnFirstUse(boolean)`](https://developer.android.com/reference/android/net/wifi/WifiEnterpriseConfig#enableTrustOnFirstUse(boolean)): Enables TOFU.\n- [`WifiEnterpriseConfig#isTrustOnFirstUseEnabled()`](https://developer.android.com/reference/android/net/wifi/WifiEnterpriseConfig#isTrustOnFirstUseEnabled()): Indicates whether TOFU is enabled.\n\nValidation\n\nTo validate the implementation of TOFU on your device, use the following tests:\n\n- CTS: `CtsWifiTestCases`\n- VTS: `VtsHalWifiSupplicantStaNetworkTargetTest`"]]