Mulai 27 Maret 2025, sebaiknya gunakan android-latest-release, bukan aosp-main, untuk mem-build dan berkontribusi pada AOSP. Untuk mengetahui informasi selengkapnya, lihat Perubahan pada AOSP.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Untuk perangkat yang menjalankan Android 13 atau yang lebih tinggi, Android
mendukung pendekatan autentikasi Trust on First Use (TOFU)
(RFC7435),
yang memungkinkan pengguna memercayai jaringan perusahaan (EAP) dengan menginstal root CA
yang digunakan oleh server dan menetapkan nama domainnya di jaringan tersimpan. TOFU memungkinkan
perangkat mendapatkan kunci publik yang tidak diautentikasi saat pengguna pertama kali terhubung
ke jaringan perusahaan dan mempertahankan kunci untuk koneksi berikutnya.
Latar belakang
Dibandingkan dengan jaringan pribadi yang hanya memerlukan sandi, jaringan perusahaan
menggunakan autentikasi infrastruktur kunci publik (PKI), yang mengharuskan klien
untuk melakukan pra-penginstalan sertifikat. Di Android 11 atau yang lebih lama, pengguna dapat memilih
opsi Jangan validasi untuk sertifikat CA server di setelan jaringan,
yang mengabaikan validasi sertifikat sisi server. Namun, untuk memperkuat
keamanan dan mematuhi spesifikasi WPA R2, Android 12 memperkenalkan
persyaratan bagi jaringan perusahaan untuk memiliki validasi sertifikat server. Persyaratan tambahan ini
menciptakan hambatan bagi pengguna karena mereka perlu menginstal sertifikat
CA untuk jaringan tersebut. TOFU menyediakan cara bagi pengguna untuk terhubung ke
jaringan perusahaan berbasis PKI dengan hanya menerima CA root-nya.
Perilaku fitur
Perangkat yang mendukung TOFU menampilkan perilaku berikut saat pengguna terhubung
ke jaringan perusahaan yang tidak memiliki kunci publik terautentikasi
yang sudah diinstal.
Menghubungkan ke jaringan baru melalui pemilih Wi-Fi
Pilih jaringan perusahaan baru di pemilih Wi-Fi.
Perangkat menampilkan dialog (Gambar 1) untuk mengonfirmasi apakah
jaringan tepercaya.
Ketuk Ya, hubungkan untuk menerima koneksi jaringan, atau ketuk Tidak, jangan
hubungkan untuk menolak.
Jika Anda mengetuk Ya, hubungkan, perangkat akan otomatis mengonfigurasi
parameter keamanan, terhubung ke jaringan, dan mengaktifkan koneksi otomatis
untuk jaringan.
Jika Anda mengetuk Tidak, jangan hubungkan, perangkat akan terputus dari jaringan dan menonaktifkan koneksi otomatis untuk jaringan tersebut.
Gambar 1. Dialog untuk fitur TOFU
Terhubung ke jaringan yang ada dengan mengaktifkan koneksi otomatis
Saat terhubung ke jaringan perusahaan yang mengaktifkan koneksi otomatis, tetapi
tidak memiliki sertifikat CA yang valid, perangkat akan terhubung secara otomatis, lalu
menampilkan notifikasi melekat (tidak dapat ditutup).
Ketuk notifikasi tersebut.
Perangkat menampilkan dialog (Gambar 1) untuk mengonfirmasi apakah
jaringan tepercaya.
Ketuk Ya, hubungkan untuk menerima koneksi jaringan, atau ketuk Tidak, jangan
hubungkan untuk menolak.
Jika Anda mengetuk Ya, hubungkan, perangkat akan otomatis mengonfigurasi
parameter keamanan, terhubung ke jaringan, dan mengaktifkan koneksi otomatis
untuk jaringan.
Jika Anda mengetuk Tidak, jangan hubungkan, perangkat akan terputus dari jaringan dan menonaktifkan koneksi otomatis untuk jaringan tersebut.
Untuk memvalidasi penerapan TOFU di perangkat Anda, gunakan pengujian berikut:
CTS: CtsWifiTestCases
VTS: VtsHalWifiSupplicantStaNetworkTargetTest
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-27 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-27 UTC."],[],[],null,["# Trust on First Use (TOFU)\n\nFor 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----------\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----------------\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\n### Connect 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\n### Connect 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--------------\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----------\n\nTo validate the implementation of TOFU on your device, use the following tests:\n\n- CTS: `CtsWifiTestCases`\n- VTS: `VtsHalWifiSupplicantStaNetworkTargetTest`"]]