All about apple keychain

Содержание
  1. Set up iCloud Keychain
  2. How to turn on iCloud Keychain
  3. Turn on iCloud Keychain on your iPhone, iPad, or iPod touch
  4. Turn on iCloud Keychain on your Mac
  5. If you can’t turn on iCloud Keychain
  6. Frequently asked questions
  7. What information does iCloud Keychain store?
  8. How does iCloud Keychain protect my information?
  9. What happens when I turn off iCloud Keychain on a device?
  10. Can Apple recover my iCloud Security Code?
  11. How do I find my saved passwords?
  12. Keychain API в iOS
  13. Начнем с небольших определений
  14. Добавление элемента
  15. Получение элемента
  16. Обновление элемента
  17. Удаление элемента
  18. Подведение итогов
  19. Manage passwords using keychains on Mac
  20. What is a keychain?
  21. Keychain Access
  22. iCloud Keychain
  23. View the information stored in a keychain on Mac
  24. If iCloud Keychain won’t turn on or sync
  25. If iCloud Keychain won’t turn on with a new device
  26. If iCloud Keychain won’t sync with other devices
  27. View the passwords stored in iCloud Keychain
  28. On your iPhone, iPad, or iPod touch with iOS 14:
  29. On your iPhone, iPad, or iPod touch with iOS 13 or earlier:
  30. On your Mac
  31. If you don’t see your iCloud Keychain items
  32. Did you restore from an iCloud backup and then notice missing iCloud Keychain items?
  33. Did you turn off iCloud Keychain on all your devices?
  34. On your Mac, did you use Keychain Access to reset your iCloud Keychain?
  35. If iCloud Keychain is on, but Safari won’t save or autofill account or credit card information
  36. On your iPhone, iPad, or iPod touch
  37. On your Mac
  38. If Safari won’t save the password for one of the websites that you’re using
  39. If you didn’t receive the verification code through SMS
  40. Check if you use two-factor authentication
  41. Check or update your phone number
  42. If you can’t change the SMS verification phone number for iCloud Keychain
  43. If you need help with your iCloud Security Code

Set up iCloud Keychain

With iCloud Keychain, you can keep your passwords and other secure information updated across your devices.

iCloud Keychain remembers things, so that you don’t have to. It auto-fills your information—like your Safari usernames and passwords, credit cards, and Wi-Fi passwords on any device that you approve. Have more questions about iCloud Keychain?

How to turn on iCloud Keychain

When you update your device to the latest iOS or iPadOS, the setup assistant asks you to set up iCloud Keychain. Learn about availability by country or region.

Turn on iCloud Keychain on your iPhone, iPad, or iPod touch

  1. Tap Settings, tap [your name], then choose iCloud.
  2. Tap Keychain.*
  3. Slide to turn on iCloud Keychain. You might be asked for your passcode or Apple ID password.

Turn on iCloud Keychain on your Mac

  1. Choose Apple menu  > System Preferences.
  2. Click Apple ID, then click iCloud in the sidebar. In macOS Mojave or earlier, click iCloud.
  3. Select Keychain.*
  4. If you choose to «Approve Later» when signing into your Apple ID, you need to approve with an old passcode or from another device when prompted. If you’re unable to approve, reset your end-to-end encrypted data when prompted.

*On your iPhone, iPad, or iPod touch with iOS 13 or later, or on your Mac with macOS Catalina or later, two-factor authentication is required to turn on iCloud Keychain. If you haven’t set it up yet, you’re prompted to update to two-factor authentication.

If you can’t turn on iCloud Keychain

If you can’t turn on iCloud Keychain after following these steps, make sure you meet the minimum system requirements for iCloud Keychain and that you’re using two-factor authentication.

If you’re not using two-factor authentication, you might be prompted to create an iCloud Security Code—six digits, complex alphanumerics, or randomly generated—to authorize additional devices and verify your identity. If you forgot your code, you might be able to reset it.

Frequently asked questions

Get answers to some of the most common questions about iCloud Keychain.

What information does iCloud Keychain store?

iCloud Keychain stores credit card numbers and expiration dates—without storing or autofilling the security code—and passwords and usernames, Wi-Fi passwords, Internet accounts, and more. Developers can also update their apps to use keychain, if the app is on a device that uses iOS 7.0.3 or later, or OS X Mavericks 10.9 and later. If you don’t see items stored in iCloud Keychain, learn what to do.

How does iCloud Keychain protect my information?

iCloud protects your information with end-to-end encryption, which provides the highest level of data security. Your data is protected with a key that’s made from information unique to your device, and combined with your device passcode, which only you know. No one else can access or read this data, either in transit or storage. Learn more.

What happens when I turn off iCloud Keychain on a device?

When you turn off iCloud Keychain for a device, you’re asked to keep or delete the passwords and credit card information that you saved. If you choose to keep the information, it isn’t deleted or updated when you make changes on other devices. If you don’t choose to keep the information on at least one device, your Keychain data will be deleted from your device and the iCloud servers.

Читайте также:  Как заставить iphone тормозить

Can Apple recover my iCloud Security Code?

No. If you enter your iCloud Security Code incorrectly too many times, you can’t use that iCloud Keychain. You can contact Apple Support to verify your identity and try again. After several incorrect attempts, your keychain is removed from Apple’s servers, and you need to set it up again.

How do I find my saved passwords?

iCloud Keychain stores your saved passwords so that you can view or change them at any time. Learn how to find your saved passwords on your iPhone, iPad, or iPod touch. You can also find your saved passwords on your Mac.

Information about products not manufactured by Apple, or independent websites not controlled or tested by Apple, is provided without recommendation or endorsement. Apple assumes no responsibility with regard to the selection, performance, or use of third-party websites or products. Apple makes no representations regarding third-party website accuracy or reliability. Contact the vendor for additional information.

Источник

Keychain API в iOS

Не так давно столкнулся с необходимостью использования Keychain-а для обеспечения дополнительной защиты при входе в приложение.

Я нашел много хороших статей по этой теме, но в основном там описываются сторонние фреймворки, упрощающие жизнь, а было интересно посмотреть, как работать с API напрямую. В этой статье я попытался объединить документацию Apple с практикой на простом примере.

Начнем с небольших определений

Keychain — зашифрованная база данных, куда сохраняются небольшие объемы пользовательской информации (см. документацию Apple).

Общая схема работы продемонстрирована на рисунке.

Keychain API Services в свои очередь являются часть фреймворка Security, но его рассмотрение требует отдельной статьи.

Добавление элемента

Выше приведен пример сохранения пароля в Keychain.
Рассмотрим функцию SecItemAdd подробнее.

На вход подается объект класса CFDictionary, который в свою очередь является ссылкой на неизменяемый объект словаря.
Что в это словарь входит? На самом деле его состав зависит от решаемой задачи — здесь же мы просто сохраняем простой пароль, давайте разберем этот простейший запрос.
Итак, kSecClass — этот ключ используется для значений хранимых элементов, список их можно посмотреть тут, мы же выбрали стандартный пароль.
kSecValueData — ключ, использующийся для передачи данных элемента.
На этом обязательные ключи заканчиваются, далее идут опциональные. Список таких параметров доступен в документации.

Возвращаемое значение типа OSStatus определяет результат операции сохранения/изменения/удаления, у него так же есть масса значений.

Получение элемента

Для получения элемента из Keychain-а используется метод SecItemCopyMatching.

Формируем запрос в виде словаря, где содержится искомый пароль.

Как мы видим, возвращен 0, символизирующий успешный результат поиска и выведен весь список атрибутов, полученных из API (Access group параметр затерт на всякий случай:)). Эти атрибуты подробно описаны тут.
Значение по ключу kSecValueData нас собственно тут интересует, успешно разворачиваем его в строку, далее выведенную терминал.

Обновление элемента

Для этого есть метод SecItemUpdate.

На вход подается 2 CFDictionary словаря — в первом информация об обновляемом элементе, во втором — та информация, на которую надо будет заменить старую.

На примере простого пароля — в первом запросе указываем что именно требуется найти для замены, во втором — то ключ-значение, которое мы обновим в найденном элементе.

Удаление элемента

Для удаления используем SecItemDelete.

У него на входе один параметр — словарь c информацией об удаляемом элементе, который надо найти.

Возвращает статус выполнения операции типа OSStatus.

Подведение итогов

В данной статье рассматривается работа с Keychain-ом на примере нескольких основных методов. Если увидите какие-то неточности, ошибки или просто хотите более подробно обсудить тему, пишите в комментарии или Telegram (skipperprivate).

Если будет интересно, можно отдельную статью посвятить работе с более сложными сущностями вроде Интернет-пароля, с большим количеством полей и т.д., или обсудить подобное в комментариях.

Источник

Manage passwords using keychains on Mac

macOS uses keychains to help you keep track of and protect the passwords, account numbers and other confidential information you use every day on your Mac computers and iOS and iPadOS devices.

You can use the Keychain Access app on your Mac to view and manage your keychains. When you use iCloud Keychain, you can keep your passwords and other secure information updated across your devices.

What is a keychain?

A keychain is an encrypted container that securely stores your account names and passwords for your Mac, apps, servers and websites, and confidential information, such as credit card numbers or bank account PIN numbers.

When you access a website, email account, network server or other password-protected item, you can choose to save the password in your keychain so you don’t have to remember or enter the password each time.

Each user on a Mac has a login keychain. The password for your login keychain matches the password you use to log in to your Mac. If an administrator on your Mac resets your login password, you need to reset your login keychain password.

Keychain Access

You use the Keychain Access app on your Mac to view and manage your login and other keychains, and also the items securely stored in the keychains — for example, keys, certificates, passwords, account information and notes. If you forget a password, you can find it in Keychain Access. Learn more about Keychain Access.

Читайте также:  Если обновить айфон удалятся ли все

iCloud Keychain

If you use iCloud, you can have iCloud Keychain securely store the website login information and credit card information you use with AutoFill in Safari, and your Wi-Fi network information. iCloud Keychain automatically keeps that information up to date across all your Mac computers and iOS and iPadOS devices. iCloud Keychain also stores login information for the accounts you use in Mail, Contacts, Calendar and Messages so it’s available on all your devices. Learn more about iCloud Keychain.

Tip: When you use passwords and credit cards online, you can let Safari store them in your keychain and automatically fill them in for you. If you also use iCloud Keychain on your Mac and iOS and iPadOS devices, Safari can fill in the stored information on any of your devices. See AutoFill credit card info.

Источник

View the information stored in a keychain on Mac

Keychain Access lets you view the keys, certificates, passwords, account information, notes, or other information stored in a keychain.

In the Keychain Access app on your Mac, if you don’t see a list of keychains, choose Window > Keychain Viewer or press Command-1.

Select the keychain that you want to view.

To see more information about an item, either double-click it or select it and click the Info button in the toolbar.

If the item is a key:

The Attributes pane in the Get Info window reveals basic identifying information for an item, such as its name and kind.

If you want to see the password for an item, click “Show password,” then enter the password for the keychain that contains that item.

The Access Control pane in the Get Info window lets you determine whether you need a password to use an item. For example, if you select “Ask for Keychain password” for an item, you have to type the keychain password as well as the item’s password to gain access to that item.

If the item is a certificate:

The Trust section displays details about the certificate’s trust policy.

The Details section displays information about the source and parameters of the certificate.

Источник

If iCloud Keychain won’t turn on or sync

If you need help with iCloud Keychain, learn what to do.

Check the System Status page for outages. Then, make sure that iCloud Keychain is available in your country or region. Still need help? Select your issue from the list and learn what to do next.

If iCloud Keychain won’t turn on with a new device

Make sure that your new device has the latest version of iOS or iPadOS, and the latest version of macOS, then try these steps:

  1. Make sure that you have a strong cellular network connection.
  2. Check your other devices. If you see a notification, follow the prompts to finish setting up iCloud Keychain.
  3. Learn how to turn on iCloud Keychain on your device.
  4. Contact Apple Support for more help setting up iCloud Keychain.

If iCloud Keychain won’t sync with other devices

Make sure that your new device has the latest version of iOS or iPadOS, or the latest version of macOS. Then, make sure that your device is on a Wi-Fi or cellular network. If the connection appears strong, turn on iCloud Keychain on the devices you want sync with.

View the passwords stored in iCloud Keychain

If you want to view the passwords stored in iCloud Keychain, follow the steps for your device.

On your iPhone, iPad, or iPod touch with iOS 14:

  1. Tap Settings > Passwords.
  2. Use Face ID or Touch ID when you’re prompted.
  3. Tap a website to view your password.

On your iPhone, iPad, or iPod touch with iOS 13 or earlier:

  1. Tap Settings > Passwords & Accounts > Website & App Passwords.
  2. Use Face ID or Touch ID when you’re prompted.
  3. Tap a website to view your password.

On your Mac

  1. Choose Safari > Preferences, then click Passwords.
  2. Enter your Mac password.
  3. Select a website to view your password.
  4. Select Details for selected websites at the bottom of the window.
  5. Enter your Mac password.

If you don’t see your iCloud Keychain items

There are several possible reasons for why you can’t find your iCloud Keychain information. If none of these apply, Contact Apple Support.

Did you restore from an iCloud backup and then notice missing iCloud Keychain items?

iCloud Keychain items aren’t part of iCloud Backup because they already live in the cloud. To restore your iCloud Keychain items, turn on iCloud Keychain.

Did you turn off iCloud Keychain on all your devices?

If so, your iCloud Keychain is removed from the cloud. If you chose to delete the keychain items from your devices when you turned off iCloud Keychain, your iCloud Keychain is also removed from those devices. You need to set up iCloud Keychain and add items again.

Читайте также:  Зарядка айфон где плюс где минус

If you turn off iCloud Keychain on all your devices and choose to delete your iCloud Keychain locally on all your devices, Apple can’t recover your iCloud Keychain.

On your Mac, did you use Keychain Access to reset your iCloud Keychain?

If so, macOS deleted your iCloud Keychain items. To reset your Mac Keychain again, temporarily disable iCloud Keychain in iCloud Preferences and then set up iCloud Keychain.

If iCloud Keychain is on, but Safari won’t save or autofill account or credit card information

If Safari doesn’t autofill your account names, passwords, or credit cards, or doesn’t ask to save them to begin with, check the AutoFill and Private Browsing settings on your device.

On your iPhone, iPad, or iPod touch

  1. For account names and passwords in iOS 14, go to Settings > Passwords > AutoFill Passwords, and check that Autofill Passwords is turned on. In iOS 13 or earlier, go to Settings > Passwords & Accounts.
  2. For credit card information,* go to Settings > Safari > Autofill, and check that Credit Cards is turned on.
  3. Open Safari. If the navigation bar in Safari is black or dark instead of white or light gray, turn off Private Browsing. Safari doesn’t save account names and passwords when Private Browsing is on.

Still need help to autofill credit card information? In Safari, tap the credit card field, then tap the «AutoFill Credit Card» option above the keyboard.

On your Mac

  1. Choose Safari > Preferences, then click AutoFill.
  2. For account names and passwords, check that you selected «User names and passwords.» For credit card information,* check that you selected «Credit cards.»
  3. See if you turned on Private Browsing. Safari doesn’t save account names and passwords when Private Browsing is on.

Still need help to autofill credit card information? In Safari, click a credit card field to see the message that asks you to choose which credit card to use from your iCloud Keychain.

* Always enter your card’s security code manually. iCloud Keychain doesn’t store credit card security codes.

If Safari won’t save the password for one of the websites that you’re using

Some websites request that passwords not be saved. Safari won’t save or autofill account names and passwords on those sites.

If you didn’t receive the verification code through SMS

If you use two-factor authentication, the steps below don’t apply because you won’t have a separate SMS verification number for iCloud Keychain. Check if you use two-factor authentication, then check that the phone number associated with your account is correct.

Check if you use two-factor authentication

  • On your iPhone, iPad, or iPod touch, tap Settings > [your name], then tap Password & Security.
  • On your Mac, choose Apple menu  > System Preferences. In macOS Catalina or later, click Apple ID, then click Password & Security in the sidebar. In macOS Mojave or earlier, click iCloud, then click Account Details.

Check or update your phone number

If two-factor authentication is off, use these steps to check that your phone number is correct or update your phone number.

  1. Make sure that you have a strong cellular network connection on your phone.
  2. Make sure that your phone number can get SMS messages. To check, ask someone to send you a text message.
  3. Make sure the correct phone number is associated with your account. Here’s how:
    • On your iPhone, iPad, or iPod touch, tap Settings > [your name] > iCloud > Keychain > Advanced.
    • On your Mac, choose Apple menu  > System Preferences, then click Apple ID. Click iCloud in the sidebar, then select Keychain. If you’re using macOS Mojave or earlier, click iCloud, then click Options next to Keychain.
  4. Make sure that the phone number under Verification number is correct.

If you can’t change the SMS verification phone number for iCloud Keychain

  1. If you have a device with iCloud Keychain already turned on, try these steps first to change your iCloud Security Code:
    • On your iPhone, iPad, or iPod touch, tap Settings > [your name] > iCloud > Keychain > Advanced and tap Change Security Code.
    • On your Mac, choose Apple menu  > System Preferences, click Apple ID, then click iCloud in the sidebar. Select Keychain. If you’re using macOS Mojave or earlier, click iCloud, then click Options next to Keychain. Choose «Change Security Code. «
  2. After you change the iCloud Security Code, try to change the SMS verification number again.
  3. If you still can’t change the SMS verification number, or if you can’t access a device that has iCloud Keychain enabled, contact Apple Support and verify your identity to get help setting up iCloud Keychain.

If you need help with your iCloud Security Code

If you forgot your iCloud Security Code or see an alert that your iCloud Security Code was entered too many times, reset the Security Code for iCloud Keychain or create a new Security Code. If your account is protected by two-factor authentication, you don’t need an iCloud Security Code.

Источник

Оцените статью