{"action":"opened","issue":{"url":"https://api.github.com/repos/jeremangnr/JNKeychain/issues/15","repository_url":"https://api.github.com/repos/jeremangnr/JNKeychain","labels_url":"https://api.github.com/repos/jeremangnr/JNKeychain/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/jeremangnr/JNKeychain/issues/15/comments","events_url":"https://api.github.com/repos/jeremangnr/JNKeychain/issues/15/events","html_url":"https://github.com/jeremangnr/JNKeychain/issues/15","id":188789043,"number":15,"title":"kSecAttrService and kSecAttrAccount used as key","user":{"login":"gabrielgava","id":21227413,"avatar_url":"https://avatars.githubusercontent.com/u/21227413?v=3","gravatar_id":"","url":"https://api.github.com/users/gabrielgava","html_url":"https://github.com/gabrielgava","followers_url":"https://api.github.com/users/gabrielgava/followers","following_url":"https://api.github.com/users/gabrielgava/following{/other_user}","gists_url":"https://api.github.com/users/gabrielgava/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrielgava/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrielgava/subscriptions","organizations_url":"https://api.github.com/users/gabrielgava/orgs","repos_url":"https://api.github.com/users/gabrielgava/repos","events_url":"https://api.github.com/users/gabrielgava/events{/privacy}","received_events_url":"https://api.github.com/users/gabrielgava/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-11T15:51:00Z","updated_at":"2016-11-11T15:51:00Z","closed_at":null,"body":"The kSecAttrService and kSecAttrAccount should be used to uniquely identify a keychain, and not a value. See the following lines of code:\r\n\r\nNSMutableDictionary *keychainQuery = [NSMutableDictionary dictionaryWithDictionary:\r\n                                          @{(__bridge id)kSecClass            : (__bridge id)kSecClassGenericPassword,\r\n                                            (__bridge id)kSecAttrService      : key,\r\n                                            (__bridge id)kSecAttrAccount      : key,\r\n                                            (__bridge id)kSecAttrAccessible   : (__bridge id)kSecAttrAccessibleAfterFirstUnlock\r\n                                            }];\r\n\r\nThe kSecAttrGeneric is the right item to be used as a key. \r\nSee http://useyourloaf.com/blog/simple-iphone-keychain-access/\r\n\r\nWith the current code I was overwriting the same value through different application (same company) because I was using the same key in my two applications (user email) since they were writing in the same keychain."}}
{"actor":{"display_login":"gabrielgava"}}