kornelski / kornelski/rust-security-framework
kSecAttrAccessControl Ignored by SecItemAdd
- Dominant language
- Rust
- Stars
- 304
- Forks
- 105
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I have been trying to add `access control` to the function `to_dictionary` for struct `ItemAddOptions` to protect keychain entries with biometry and application password. I have also added some options in the search function, but they seem to have no effect. Note I have forked the repository and I am using a locally defined path so these changes are being used.
Has anyone gotten access control to work to protect their keychain entries?
For example the above is where I add the option in `to_dictionary` line 599 `item.rs`.
```
if let Some(access_control) = &self.access_control {
dict.add(
&unsafe { kSecAttrAccessControl }.to_void(),
&access_control.to_void(),
);
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in item.rs around line 599 and inspect ItemAddOptions::to_dictionary, including the kSecAttrAccessControl entry passed to SecItemAdd. Check the related search-function options and reproduce the behavior using the locally defined path; done means the requested access-control options affect keychain entries as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100