Does anyone know the default value of the kSecAttrAccessible
attribute for iOS keychain items (see reference)? I'm just now upgrading an app to use stricter security, and I'm curious about how accessible my old keychain items–which didn't specify the kSecAttrAccessible
key-value pair–are.
Update: As of a few years ago, the default is now kSecAttrAccessibleWhenUnlocked
.
According to the Session 209 (Securing Application Data) video from last year's WWDC, the existing data defaults to kSecAttrAccessibleAlways
(so you'll need to update the accessibility class as necessary).
kSecAttrAccessibleWhenUnlocked
is now the default, and probably was a while ago. –
Larcher I've just tested this on iOS 5.1 and 6.0, the default is now kSecAttrAccessibleWhenUnlocked
.
However, I think it is always better to set an explicit kSecAttrAccessible
, rather than relying on defaults to be secure enough for you.
I've tested this on IOS 8.1 and default value is kSecAttrAccessibleWhenUnlocked.
Update: As of a few years ago, the default is now kSecAttrAccessibleWhenUnlocked
.
According to the Session 209 (Securing Application Data) video from last year's WWDC, the existing data defaults to kSecAttrAccessibleAlways
(so you'll need to update the accessibility class as necessary).
kSecAttrAccessibleAlways
in order to get this behavior –
Bayern kSecAttrAccessibleWhenUnlocked
is now the default, and probably was a while ago. –
Larcher The documentation for kSecAttrAccessibleWhenUnlocked
says:
This is the default value for keychain items added without explicitly setting an accessibility constant.
© 2022 - 2024 — McMap. All rights reserved.
kSecAttrAccessibleAlways
in order to get this behavior – Bayern