<!--
{
  "availability" : [
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/SecItemImportExportKeyParameters/keyAttributes",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@SA@SecItemImportExportKeyParameters@FI@keyAttributes"
  },
  "title" : "keyAttributes"
}
-->

# keyAttributes

An array containing zero or more key attributes for an imported key.

```
var keyAttributes: Unmanaged<CFArray>?
```

## Discussion

Valid values are [`kSecAttrIsPermanent`](/documentation/Security/kSecAttrIsPermanent), [`kSecAttrIsSensitive`](/documentation/Security/kSecAttrIsSensitive), and [`kSecAttrIsExtractable`](/documentation/Security/kSecAttrIsExtractable). If you set this attribute array to `NULL`, the following defaults are used:

- The item is marked permanent if a keychain is specified.
- The item is marked sensitive if it is a private key.
- The item is marked extractable by default.

---

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)