This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 44062 - SecRecord is missing a property to enable password access control
Summary: SecRecord is missing a property to enable password access control
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: General (show other bugs)
Version: master
Hardware: PC Mac OS
: Normal normal
Target Milestone: (C9)
Assignee: Alex Soto
URL:
Depends on:
Blocks:
 
Reported: 2016-09-07 16:33 UTC by Ashley Gazich [MSFT]
Modified: 2016-09-27 16:33 UTC (History)
8 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Ashley Gazich [MSFT] 2016-09-07 16:33:03 UTC
### Customer report

Non-public report https://kb.xamarin.com/agent/case/370436

Customer is having trouble accessing the keychain using SecRecord.
It looks like SecRecord is missing a property to enable password access control
(kSecAccessControlApplicationPassword in iOS9+).

Current workaround:
Access the internal NSMutableDictionary SecRecord.queryDict property using reflection, and add
a value for kSecUseAuthenticationContext. 

Are there plans to extend SecRecord with a UseAuthenticationContext
property (or something similar)? If not, is there an alternative recommended workaround?

Customer included this link for reference:
http://collinbstuart.github.io/lessons/2015/11/04/keychain_entropy/
Comment 1 Vincent Dondain [MSFT] 2016-09-08 17:51:52 UTC
Confirmed, missing binding in https://github.com/xamarin/xamarin-macios/blob/master/src/security.cs#L514-L582
Comment 2 Sebastien Pouliot 2016-09-13 16:02:57 UTC
@Alex please add this to your current work on SecRecord improvements - https://trello.com/c/uw7KfZB3
Comment 3 Alex Soto 2016-09-16 04:45:28 UTC
Propposed PR https://github.com/xamarin/xamarin-macios/pull/842
Comment 4 Alex Soto 2016-09-19 14:45:20 UTC
Fixed in xamarin-macios/master @ 27424075eb802a05312e0849057f41bf4a3d987b

Note You need to log in before you can comment on or make changes to this bug.