Hi, I'm currently trying to impose access controls on keychain entries in the mobile app I'm developing. I'm interfacing the keychain through rust that is bound to objective c.
I can execute successful crud on the keychain service and when I add access control via kSecAttrAccessControls in the CFDictionary I pass into SecItemAdd it seems to work well as this is the dictionary printed before being passed into SecItemAdd:
{
accc = "<SecAccessControlRef: aku;prp(true);odel(true);oe(true);od(cbio(pbioc()))>";
acct = "app-user";
class = genp;
labl = App;
svce = "com.app";
"u_AuthCtx" = "LAContext[1:1704:3894]";
"v_Data" = {length = 10, bytes = 0x50617373776f72643121};
}
The aku in the input accc field is recognized in the result as you can see in the pdmn field but accc field is unknown, this is the result of calling SecItemCopyMatching:
UUID: "90DAA5D5-A21A-45AA-97D8-E3B99C763476"
accc: "unknown"
acct: "app-user"
agrp: "***.com.app"
cdat: "2023-07-12 10:57:08 +0000"
class: "genp"
labl: "App"
mdat: "2023-07-12 10:57:08 +0000"
musr: ""
pdmn: "aku"
sha1: "����\u0016\\�;\u000f�K���Z�?0��"
svce: "com.app"
sync: "unknown"
tomb: "unknown"
v_Data: "Hello"
As well this is for SecAccessControl created with flags for Biometry_any or Application_Password but I've tried with just Application Password as well and same result.
Any ideas why this would not be working?