<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/kSecAttrAccessControl",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@kSecAttrAccessControl"
  },
  "title" : "kSecAttrAccessControl"
}
-->

# kSecAttrAccessControl

A key with a value that’s an access control instance indicating access control settings for the item.

```
let kSecAttrAccessControl: CFString
```

## Discussion

The corresponding value is a [`SecAccessControl`](/documentation/Security/SecAccessControl) instance, created with the [`SecAccessControlCreateWithFlags(_:_:_:_:)`](/documentation/Security/SecAccessControlCreateWithFlags(_:_:_:_:)) method, containing access control conditions for the item. See [Restricting keychain item accessibility](/documentation/Security/restricting-keychain-item-accessibility) for more details.

> Important:
> This attribute is mutually exclusive with the ``doc://com.apple.security/documentation/Security/kSecAttrAccess`` attribute.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)