Prioritize user privacy and data security in your app. Discuss best practices for data handling, user consent, and security measures to protect user information.

All subtopics
Posts under Privacy & Security topic

Post

Replies

Boosts

Views

Activity

Check if "require password after sleep" enabled
Hello!I'm working on a security software showing basic security hygiene of managed computers and one of the parameters gathered is whether the screensaver is protected with password.On 10.12 I could read this settings from com.apple.screensaver plist, but starting from 10.13 this plist doesn't contain this value.I also don't want to use apple script because starting from Mojave it asks for special authorization, and also gives wrong result on 10.13.Are there any other options in achieving this?Thanks in advance!
1
0
755
Oct ’22
parsing DER format data using SecAsn1Decode
Hi,I'm working on the output of method `distinguishedNames` that available under challenge.protectionSpace when my application receieve callback from the server (didReceieveChallenge) of type NSURLAuthenticationMethodClientCertificate. In this case the server ask for certificate from the client that was signed by issuer from the issuersList provided by the server.The method challenge.protectionSpace.distinguishedNames returns as a DER encoded data, and I wish to decode it and get the issuer distiguished name.Since openssl is no longer native mac code, i turned to SecAsn1Decode and realized that it also expect to have a template of the DER format (SecAsn1Template).. so I pretty much need to have the formatted layout before I want to decode an instance formatted in this way.Conceptually, I'm not sure I understand why this template is really needed, because the DER format explain the format by itself.I've tested my assumption by copying the output of distinguishedNames and using asn.1 online converter to human readble text, and it revealed the format by itself.here's the input :30 81 8E 31 0B 30 09 06 03 55 04 06 13 02 49 4931 0F 30 0D 06 03 55 04 08 0C 06 62 62 62 62 626C 31 0C 30 0A 06 03 55 04 07 0C 03 54 4C 56 310B 30 09 06 03 55 04 0A 0C 02 54 53 31 1E 30 1C06 03 55 04 0B 0C 15 43 41 5F 63 65 72 74 69 6669 63 61 74 65 5F 73 65 72 76 65 72 31 1B 30 1906 03 55 04 03 0C 12 62 62 62 62 62 73 5F 4D 6163 42 6F 6F 6B 5F 50 72 6F 31 16 30 14 06 09 2A86 48 86 F7 0D 01 09 01 16 07 7A 40 7A 2E 63 6F6Dand the output :SEQUENCE (7 elem) SET (1 elem) SEQUENCE (2 elem) OBJECT IDENTIFIER 2.5.4.6 countryName (X.520 DN component) PrintableString II SET (1 elem) SEQUENCE (2 elem) OBJECT IDENTIFIER 2.5.4.8 stateOrProvinceName (X.520 DN component) UTF8String bbbbbl SET (1 elem) SEQUENCE (2 elem) OBJECT IDENTIFIER 2.5.4.7 localityName (X.520 DN component) UTF8String TLV SET (1 elem) SEQUENCE (2 elem) OBJECT IDENTIFIER 2.5.4.10 organizationName (X.520 DN component) UTF8String TS SET (1 elem) SEQUENCE (2 elem) OBJECT IDENTIFIER 2.5.4.11 organizationalUnitName (X.520 DN component) UTF8String CA_certificate_server SET (1 elem) SEQUENCE (2 elem) OBJECT IDENTIFIER 2.5.4.3 commonName (X.520 DN component) UTF8String bbbbbs_MacBook_Pro SET (1 elem) SEQUENCE (2 elem) OBJECT IDENTIFIER 1.2.840.113549.1.9.1 emailAddress (PKCS #9. Deprecated, use an altName extension instead) IA5String z@z.comSo perhaps anyone can thing of a good reason why is the template is needed ? and if so, how do i generate it for my specific example.Thanks !
3
0
1.9k
Jan ’22
Unable to paste copied data from iOS outlook to native contact app when Intune MAM policy is applied for data protection.
Hi,We have deployed the Intune MAM/MDM in our organisation for iPhone (iOS) and Android devices, in this policy we have enabled the data protection that user will not be able to paste copied data from policy managed app (e.g. MS Outlook, OneDrive, Teams etc).Now due to this we are not able to paste copied data in iOS contact apps, As per the Microsoft we have to exclude this iOS native contact apps by adding URL protocol in Intune MAM policy.We are requesting you to please share the URL protocol for iOS contact app so we can exclude this app.Ref:-https://docs.microsoft.com/en-us/intune/apps/app-protection-policy-settings-ios#data-transfer-exemptionshttps://docs.microsoft.com/en-us/intune/apps/app-protection-policies-exception (Refer section “iOS data transfer exceptions”)
2
0
2.6k
Jan ’22
Testing upcoming Safari cert validity changes
Per https://support.apple.com/en-us/HT211025Quoting:"In our ongoing efforts to improve web security for our users, Apple is reducing the maximum allowed lifetimes of TLS server certificates [to 398 days]" [...]"This change will not affect certificates issued from user-added or administrator-added Root CAs."Questions:What defines "user-added or administrator-added Root CAs"?How do we get our hands on a version of Safari now to test/prepare for this change? What version(s) of Safari honors this change?Note, I've asked a similar question on StackExchange: https://apple.stackexchange.com/questions/384033
17
0
4.9k
Feb ’23
Privileged helper can't access downloads folder on Catalina
Hey there,I'm having trouble with an macOS app and it's connected privileged helper tool. It looks like there is a problem with the new TCC - Files And Folders security layer. The console says pretty clear:-[TCCDAccessIdentity staticCode]: static code for: identifier /Library/PrivilegedHelperTools/com.my.HelperTool, type: 1: 0x7fdd0b61d300 at /Library/PrivilegedHelperTools/com.my.HelperToolRefusing TCCAccessRequest for service kTCCServiceSystemPolicyDownloadsFolder from client /Library/PrivilegedHelperTools/com.my.HelperTool in background sessionResetting permissions via tccutil didn't help. The app and the helper tool is successfully codesigned and notarized (but not sandboxed). Any tips how to satisfy TCC? Anything I can check? Any documentation beside WWDC 2019 – Advances in macOS Security?Btw. I'm on Catalina 10.15.4thanks a lot,Gary
6
0
4.2k
Mar ’22
NWProtocolTLS.Options init() supported default cipher suites iOS 13 ?
Hello,I have a local WebSocket server running inside an iOS app on iOS 13+. I'm using Swift NIO Transport Services for the server.I'm using NWProtocolTLS.Options from Network framework to specify TLS options for my server.I am providing my server as an XCFramework and want to let users to be able to specify different parameters when launching the server.For specifiying the TLS supported version, everything is working fine by using :public func sec_protocol_options_set_max_tls_protocol_version(_ options: sec_protocol_options_t, _ version: tls_protocol_version_t) public func sec_protocol_options_set_min_tls_protocol_version(_ options: sec_protocol_options_t, _ version: tls_protocol_version_t)But I also want to be able to specify some cipher suites. I saw that I can use :public func sec_protocol_options_append_tls_ciphersuite(_ options: sec_protocol_options_t, _ ciphersuite: tls_ciphersuite_t)But it seems that some cipher suites are enabled by default and I can't restrict the cipher suites just to the ones I want, I can just append others.NWProtocolTLS.Options class has an init() function which states "Initializes a default set of TLS connection options" on Apple documentation.So my question is, is there a way to know what TLS parameters this initialization does ? Especially the list of cipher suites enabled by default ? Because I can't find any information about it from my research. I used a tool to test handshake with my server to discover the cipher suites supported and enabled by default but I don't think it is a good way to be sure about this information.And is there a way to specify only cipher suites I want to be supported by my server by using NWProtocolTLS.Options ?Thank you in advance,Christophe
9
0
2.4k
Jun ’24
Apps/files do not open when the result is cached with es_respond_flags_result
Hi all,I have been able to reproduce a scenario where apps/files do not open when I subscribe to ES_EVENT_TYPE_AUTH_OPEN and set caching to true while authorizing the opening of a file by responding to es_respond_flags_result(,,,).In details, If I subscribe to ES_EVENT_TYPE_AUTH_OPEN event and set bool cache = true in es_respond_flags_result(,,,)es_handler_block_t file_cbk = ^(es_client_t *client, const es_message_t *msg) { log_event_message(msg); // just to log events to the console int32_t flag = msg->event.open.fflag; // getting the file-opening mask es_respond_result_t res = es_respond_flags_result(client, msg, flag, true); // simply allowing all files to open and cache the result if (ES_RESPOND_RESULT_SUCCESS != res) LOG_ERROR("es_respond_auth_result: %d", res); };Whatever application or file that I open leads me to some EPERM popup, "The Application cannot be opened" and complete unresponsiveness of the machine with occasional spinning beach balls. As you can see, I am not doing any sort of processing with the file event messages (apart from just logging to the console) - I'm simply allowing all file open operations and caching the results.This issue with es_respond_flags_result(,,,) only appears if I cache the event result; without caching everything works as expected. However, if I subscribe to ES_EVENT_TYPE_AUTH_EXEC event and respond using es_respond_auth_result(,,,) authorizing the execution of a process with the caching parameter set to true, everything seems to work gracefully.I am completely new to Objective C so there's a high chance of doing something wrong - please LMK if I am handling the event messages in an undesired fashion and suggest me the way it should be handled. If this is a known/duplicate issue, please point me to the relevant ticket or guide me on the way forward.Also added a 2 min screen recording illustrating the issue (Unlisted video): https://youtu.be/R9zSpHk72_QLooking forward to your help and support...Thanks!Uddalak
7
0
3.9k
Aug ’22
Is it possible to create a DH symmetric key from multiple shared secrets using CryptoKit ?
Hello,I'm currently trying (in Swift, iOS 13+) to reproduce an end to end communication mechanism inspired by apps like SignalApp or iMessage. But there is something I don't see how to do. When encrypting a new message the idea for a better forward secrecy and post-compromise security implies the use of not 1 but 3 or 4 DH shared secrets to compute the symmetric key (here is the part of the SignalApp protocol documentation that explains that part https://signal.org/docs/specifications/x3dh#sending-the-initial-message). But I don't think this is currently possible with CryptoKit since I don't see any way to combine multiple CryptoKit.SharedSecret together. Or am I missing something ?I could use a third party library for that of course, but I would rather not if it's possible.Thank you ! (and sorry for my english :s)
1
0
961
Mar ’23
Missing file read auth event in Endpoint Security Framework
The Endpoint Security framework provides open auth event. However certain application may just open a file to check size, access, but not read the content. Our use case is geared toward apply security when the application actually reads the content. Could Apple engineer confirm if there is any plan to support this? Had raised enhancement request long time back (Feedback FB6484629). Just thought of checking if there any update on the same. Any suggestions/comments?
3
0
1.4k
Jan ’22
Sign In With Apple not working with Xcode 12 beta on simulator ?
Running the sample "Juice" app, which demos the Sign In With Apple flow, doesn't seem to work with Xcode 12 beta and iOS 14 beta on the simulator (worked fine on the non-beta versions and on a real device with iOS 14 beta). Once the password for the device's Apple ID is entered, the wheel in the password field just keeps spinning. No error messages and nothing handed back over to the app from the ASAuthorizationController. Anyone else seeing this problem ? Are there any workarounds ?
207
5
107k
Feb ’26
Security threat due to insecure function "memcpy()" in GCDAsyncSocket.m
Hi, https://opensource.apple.com/source/HTTPServer/HTTPServer-11/CocoaHTTPServer/Vendor/CocoaAsyncSocket/GCDAsyncSocket.m.auto.html I am getting security threat in GCDAsyncSocket.m class file  There are 13 occurrences of memcpy() function which is an insecure function acc to security tool. Below is the issue description and reference links from security team. Issue description : Use of insecure functions/potential dangerous functions Reference link: CWE-676: Use of Potentially Dangerous Function This would explain why SECURITY TEAM is recommending the change of these functions. Please provide solution for this as soon as possible as it is very urgent. Thanks and Regards, Priya Mehndiratta
5
0
3.8k
Sep ’23
Signing with SecKeyCreateSignature and verification with OpenSSL
At my app I have a SecKey which I want to sign some Data with it, and at my sever I need to do the verification process, but this time with openSSL. I didn't find any common key or any steps to achieve this between Apple Security framework and OpenSSL. For example, I've tried the following: Signing (Apple Security): let signedStrCFData = SecKeyCreateSignature(key, .rsaSignatureRaw, plaintextData, &error) Verifying (OpenSSL): ret = RSAverify(NIDrsaSignature, (const unsigned char *)challenge, (unsigned int)strlen(challenge), challengeenc, challengeenc_size, rsa); Which key to choose is not really important to me (as long as it's a reasonable signing key), so I tried multiple types of keys, but I wasn't able to do it. Any idea what I'm missing here?
8
0
2.0k
Nov ’23
Different SSO behavior for ASWebAuthenticationSession in iOS 14
In our app we're performing authentication using ASWebAuthenticationSession. SSO seems to work fine in iOS 13 for different paths for the same domain but when running the same app in iOS 14, cookies don't seem to be attached to subsequent requests once authenticated in safari window. I'm not sure if it helps : Looking at the logging in instruments when running the app in iOS 14 device, I can see : 00:09.690.903 Default iOS B2c Sample (1691) CFNetwork Default iOS B2c Sample 0x1631f Faulting in NSHTTPCookieStorage singleton 00:09.690.929 Default iOS B2c Sample (1691) CFNetwork Default iOS B2c Sample 0x1631f Faulting in CFHTTPCookieStorage singleton 00:09.690.944 Default iOS B2c Sample (1691) CFNetwork Default iOS B2c Sample 0x1631f Creating default cookie storage with default identifier (Above logs don't happen in iOS 13) and later in iOS 14: 00:10.113.701 Debug iOS B2c Sample (1691) CFNetwork Default iOS B2c Sample 0x1631c Task <88E60E41-6B7B-4787-ABF6-B65C92C8FF4E>.<1> request https://testb2c.b2clogin.com/testb2c.onmicrosoft.com/b2c_1_susi/oauth2/v2.0/token is NOT allowed to set HSTS for main doc  In iOS 13 : 00:15.570.171 Debug iOSB2C (5320) CFNetwork Default iOSB2C 0x24045d Task <79A2078B-718D-4D4D-A46D-1FF1B2238431>.<6> request n/a is NOT allowed to set HSTS for main doc  00:23.139.303 Debug iOSB2C (5320) CFNetwork Default iOSB2C 0x24045d Task <88D45825-FB1E-4C38-8EFF-87A8528B61E3>.<7> request n/a is NOT allowed to set HSTS for main doc  Has anyone noticed similar issue with ASWebAuthenticationSession?
19
0
9.4k
Dec ’21
navigator.credentials.create returns an empty object
Hello, we trying to develop passwordless flow in the browser, but when we invoke navigator.credentials.create, it resolves an empty object {}. We acquired options from StrongKey server and parsed them in navigator options as was shown on wwdc20-10670 demo. An excerpt of source code is below: { &#9;&#9;publicKey: { &#9;&#9;&#9;&#9;rp: {name: queryParams.rpName}, &#9;&#9;&#9;&#9;user: { &#9;&#9;&#9;&#9;&#9;&#9;name: queryParams.userName, &#9;&#9;&#9;&#9;&#9;&#9;id: toUint8Array(queryParams.userId), &#9;&#9;&#9;&#9;&#9;&#9;displayName: queryParams.displayName &#9;&#9;&#9;&#9;}, &#9;&#9;&#9;&#9;pubKeyCredParams: [{type: "public-key", alg: -7}], &#9;&#9;&#9;&#9;challenge: toUint8Array(queryParams.challenge), &#9;&#9;&#9;&#9;authenticatorSelection: {authenticatorAttachment: "platform",}, &#9;&#9;&#9;&#9;attestation: "direct" &#9;&#9;} } The user is requested to proceed with TouchID/FaceID/etc. and everything looks as expected, but the returned value is empty. We have tested the flow in the latest Chrome, Safari and Safari for iOS. Has anyone encountered this behavior as well?
2
0
2.6k
Aug ’23
WebAuthn Authentication Experience on iOS
I'm interested in leveraging WebAuthn for an App that uses a web view for authentication. One of the open questions I'm grappling with is "what's the experience difference between WebAuthn on mobile vs. a native app experience?" The biggest difference in usability that I'm able to see from a few demos is in the authentication experience (the registration experience seems pretty similar). In the WebAuthn mobile experience, a user is prompted with "Do you want to sign in to 'XYZ@test.com' using a saved account?" with two options (one for a saved account and the second being "Account from Security Key"). I'd imagine this is different from mobile native experiences which immediately prompt Face/TouchID (less steps / friction). Is there any way to prevent / suppress that screen? For example, if I update my request to not support security keys, would a user skip the "account / security key" prompt and default to Face/TouchID (assuming there was only one registered account)? Or would iOS still default to this prompt and a user would select his/her account?
2
0
3.3k
Mar ’22
Correctly overriding TLS logic for IoT communication
Hi. I'm developing an application that should be able to connect to IoT devices in the local network. I want to use https with a self-signed certificate. As far as I understand it's against AST, but I could request an exception.  There are 2 things that I would need to change to make it work: Trust my self-signed Root CA - I'm planning to use it to issue certificate on each device with subjectAlternativeName = DNS:<deviceId>.device.mydomain.com that is not real DNS name. Alter logic to verify host - those devices don't have public DNS addresses and the application communicates with IoT devices using address in local network like 192.168.0.14. Because my application knows the exact id of the device (each IoT device is connected to the user account) if a server responds with a certificate issued by my Root CA I would check that <deviceId> in the certificate matches with the IoT device user is trying to connect to instead of checking hostname. In this scenario each device has its own unique key pair and even if someone disassembles and extracts private key from one device, it would not give them ability to intercept request from another device. Alternatively, aside from using plaintext http, I was thinking about giving my IoT devices certificates issued by trusted CA, like Let's Encrypt, and setting up DNS that would actually resolve <deviceId>.device.mydomain.com to its current address on local network, but there are 2 issues with that approach that I would like to avoid: Let's Encrypt has a quota of 50 certificates per week and I assume other Public CAs would have similar restrictions My backend server might not be aware of the actual local address if there is no connectivity between IoT device and backend server, whereas application can find it on the local network. I'm not an expert in iOS development and my project is written with react-native, but I managed to get some code working: #import <React/RCTBridgeModule.h> #import <React/RCTHTTPRequestHandler.h> #import <React/RCTLog.h> #import "RCTActiveDevice.h" @implementation RCTHTTPRequestHandler(iotTls) (void)URLSession:(NSURLSession *)session didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler { &#9;NSString *deviceId = [RCTActiveDevice getCurrentDeviceId]; &#9;if (deviceId && [challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) { &#9;&#9;SecTrustRef serverTrust = challenge.protectionSpace.serverTrust; &#9;&#9;SecCertificateRef issuerRootCa = SecTrustGetCertificateAtIndex(serverTrust, SecTrustGetCertificateCount(serverTrust) - 1); &#9;&#9;NSData *issuerRootCaData = CFBridgingRelease(SecCertificateCopyData(issuerRootCa)); &#9;&#9;NSString *deviceRootCaPath = [[NSBundle mainBundle] pathForResource:@"device_root_ca" ofType:@"crt"]; &#9;&#9;NSData *deviceRootCaData = [NSData dataWithContentsOfFile:deviceRootCaPath]; &#9;&#9;SecCertificateRef deviceRootCa = SecCertificateCreateWithData(NULL, (__bridge CFDataRef) deviceRootCaData); &#9;&#9; &#9;&#9;bool isDeviceCertificate = [deviceRootCaData isEqualToData:issuerRootCaData]; &#9;&#9;if (isDeviceCertificate) { &#9;&#9;&#9;NSString *domain = [NSString stringWithFormat:@"%@.device.mydomain.com", deviceId]; &#9;&#9;&#9;SecPolicyRef policy = SecPolicyCreateSSL(false, (__bridge CFStringRef) domain); &#9;&#9;&#9;SecTrustSetPolicies(serverTrust, (bridge CFArrayRef) [NSArray arrayWithObjects: (bridge id _Nonnull) (policy), nil]); &#9;&#9;&#9;SecTrustSetAnchorCertificates(serverTrust, (bridge CFArrayRef) [NSArray arrayWithObjects: (bridge id _Nonnull) (deviceRootCa), nil]); &#9;&#9;&#9;bool isDeviceTrusted; &#9;&#9;&#9;if (@available(iOS 12.0, *)) { &#9;&#9;&#9;&#9;isDeviceTrusted = SecTrustEvaluateWithError(serverTrust, nil); &#9;&#9;&#9;} else { &#9;&#9;&#9;&#9;SecTrustResultType result; &#9;&#9;&#9;&#9;SecTrustEvaluate(serverTrust, &result); &#9;&#9;&#9;&#9;isDeviceTrusted = (result == kSecTrustResultUnspecified || result == kSecTrustResultProceed); &#9;&#9;&#9;} &#9;&#9;&#9;if (isDeviceTrusted) { &#9;&#9;&#9;&#9;NSURLCredential *credential = [NSURLCredential credentialForTrust: serverTrust]; &#9;&#9;&#9;&#9;completionHandler(NSURLSessionAuthChallengeUseCredential, credential); &#9;&#9;&#9;&#9;return; &#9;&#9;&#9;} &#9;&#9;&#9;completionHandler(NSURLSessionAuthChallengeCancelAuthenticationChallenge, nil); &#9;&#9;} &#9;} &#9;completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]); } @end My question is this approach good and would I be able to get approval for my application to be included in the App Store?
6
0
1.6k
Feb ’23
SecAccessControlCreateWithFlags `.or` & `.and`
Can someone please shed some light on the usage of `.or` &amp; `.and` flags? Though I am able to get the accomplish the entended result using `.userPresence`, I am trying to wrap my head around how to use `.or` &amp; `.and`. Can someone please provide an example on correct usages of these options?
Replies
6
Boosts
1
Views
2.9k
Activity
Jul ’22
Check if "require password after sleep" enabled
Hello!I'm working on a security software showing basic security hygiene of managed computers and one of the parameters gathered is whether the screensaver is protected with password.On 10.12 I could read this settings from com.apple.screensaver plist, but starting from 10.13 this plist doesn't contain this value.I also don't want to use apple script because starting from Mojave it asks for special authorization, and also gives wrong result on 10.13.Are there any other options in achieving this?Thanks in advance!
Replies
1
Boosts
0
Views
755
Activity
Oct ’22
parsing DER format data using SecAsn1Decode
Hi,I'm working on the output of method `distinguishedNames` that available under challenge.protectionSpace when my application receieve callback from the server (didReceieveChallenge) of type NSURLAuthenticationMethodClientCertificate. In this case the server ask for certificate from the client that was signed by issuer from the issuersList provided by the server.The method challenge.protectionSpace.distinguishedNames returns as a DER encoded data, and I wish to decode it and get the issuer distiguished name.Since openssl is no longer native mac code, i turned to SecAsn1Decode and realized that it also expect to have a template of the DER format (SecAsn1Template).. so I pretty much need to have the formatted layout before I want to decode an instance formatted in this way.Conceptually, I'm not sure I understand why this template is really needed, because the DER format explain the format by itself.I've tested my assumption by copying the output of distinguishedNames and using asn.1 online converter to human readble text, and it revealed the format by itself.here's the input :30 81 8E 31 0B 30 09 06 03 55 04 06 13 02 49 4931 0F 30 0D 06 03 55 04 08 0C 06 62 62 62 62 626C 31 0C 30 0A 06 03 55 04 07 0C 03 54 4C 56 310B 30 09 06 03 55 04 0A 0C 02 54 53 31 1E 30 1C06 03 55 04 0B 0C 15 43 41 5F 63 65 72 74 69 6669 63 61 74 65 5F 73 65 72 76 65 72 31 1B 30 1906 03 55 04 03 0C 12 62 62 62 62 62 73 5F 4D 6163 42 6F 6F 6B 5F 50 72 6F 31 16 30 14 06 09 2A86 48 86 F7 0D 01 09 01 16 07 7A 40 7A 2E 63 6F6Dand the output :SEQUENCE (7 elem) SET (1 elem) SEQUENCE (2 elem) OBJECT IDENTIFIER 2.5.4.6 countryName (X.520 DN component) PrintableString II SET (1 elem) SEQUENCE (2 elem) OBJECT IDENTIFIER 2.5.4.8 stateOrProvinceName (X.520 DN component) UTF8String bbbbbl SET (1 elem) SEQUENCE (2 elem) OBJECT IDENTIFIER 2.5.4.7 localityName (X.520 DN component) UTF8String TLV SET (1 elem) SEQUENCE (2 elem) OBJECT IDENTIFIER 2.5.4.10 organizationName (X.520 DN component) UTF8String TS SET (1 elem) SEQUENCE (2 elem) OBJECT IDENTIFIER 2.5.4.11 organizationalUnitName (X.520 DN component) UTF8String CA_certificate_server SET (1 elem) SEQUENCE (2 elem) OBJECT IDENTIFIER 2.5.4.3 commonName (X.520 DN component) UTF8String bbbbbs_MacBook_Pro SET (1 elem) SEQUENCE (2 elem) OBJECT IDENTIFIER 1.2.840.113549.1.9.1 emailAddress (PKCS #9. Deprecated, use an altName extension instead) IA5String z@z.comSo perhaps anyone can thing of a good reason why is the template is needed ? and if so, how do i generate it for my specific example.Thanks !
Replies
3
Boosts
0
Views
1.9k
Activity
Jan ’22
Unable to paste copied data from iOS outlook to native contact app when Intune MAM policy is applied for data protection.
Hi,We have deployed the Intune MAM/MDM in our organisation for iPhone (iOS) and Android devices, in this policy we have enabled the data protection that user will not be able to paste copied data from policy managed app (e.g. MS Outlook, OneDrive, Teams etc).Now due to this we are not able to paste copied data in iOS contact apps, As per the Microsoft we have to exclude this iOS native contact apps by adding URL protocol in Intune MAM policy.We are requesting you to please share the URL protocol for iOS contact app so we can exclude this app.Ref:-https://docs.microsoft.com/en-us/intune/apps/app-protection-policy-settings-ios#data-transfer-exemptionshttps://docs.microsoft.com/en-us/intune/apps/app-protection-policies-exception (Refer section “iOS data transfer exceptions”)
Replies
2
Boosts
0
Views
2.6k
Activity
Jan ’22
Testing upcoming Safari cert validity changes
Per https://support.apple.com/en-us/HT211025Quoting:"In our ongoing efforts to improve web security for our users, Apple is reducing the maximum allowed lifetimes of TLS server certificates [to 398 days]" [...]"This change will not affect certificates issued from user-added or administrator-added Root CAs."Questions:What defines "user-added or administrator-added Root CAs"?How do we get our hands on a version of Safari now to test/prepare for this change? What version(s) of Safari honors this change?Note, I've asked a similar question on StackExchange: https://apple.stackexchange.com/questions/384033
Replies
17
Boosts
0
Views
4.9k
Activity
Feb ’23
Privileged helper can't access downloads folder on Catalina
Hey there,I'm having trouble with an macOS app and it's connected privileged helper tool. It looks like there is a problem with the new TCC - Files And Folders security layer. The console says pretty clear:-[TCCDAccessIdentity staticCode]: static code for: identifier /Library/PrivilegedHelperTools/com.my.HelperTool, type: 1: 0x7fdd0b61d300 at /Library/PrivilegedHelperTools/com.my.HelperToolRefusing TCCAccessRequest for service kTCCServiceSystemPolicyDownloadsFolder from client /Library/PrivilegedHelperTools/com.my.HelperTool in background sessionResetting permissions via tccutil didn't help. The app and the helper tool is successfully codesigned and notarized (but not sandboxed). Any tips how to satisfy TCC? Anything I can check? Any documentation beside WWDC 2019 – Advances in macOS Security?Btw. I'm on Catalina 10.15.4thanks a lot,Gary
Replies
6
Boosts
0
Views
4.2k
Activity
Mar ’22
NWProtocolTLS.Options init() supported default cipher suites iOS 13 ?
Hello,I have a local WebSocket server running inside an iOS app on iOS 13+. I'm using Swift NIO Transport Services for the server.I'm using NWProtocolTLS.Options from Network framework to specify TLS options for my server.I am providing my server as an XCFramework and want to let users to be able to specify different parameters when launching the server.For specifiying the TLS supported version, everything is working fine by using :public func sec_protocol_options_set_max_tls_protocol_version(_ options: sec_protocol_options_t, _ version: tls_protocol_version_t) public func sec_protocol_options_set_min_tls_protocol_version(_ options: sec_protocol_options_t, _ version: tls_protocol_version_t)But I also want to be able to specify some cipher suites. I saw that I can use :public func sec_protocol_options_append_tls_ciphersuite(_ options: sec_protocol_options_t, _ ciphersuite: tls_ciphersuite_t)But it seems that some cipher suites are enabled by default and I can't restrict the cipher suites just to the ones I want, I can just append others.NWProtocolTLS.Options class has an init() function which states "Initializes a default set of TLS connection options" on Apple documentation.So my question is, is there a way to know what TLS parameters this initialization does ? Especially the list of cipher suites enabled by default ? Because I can't find any information about it from my research. I used a tool to test handshake with my server to discover the cipher suites supported and enabled by default but I don't think it is a good way to be sure about this information.And is there a way to specify only cipher suites I want to be supported by my server by using NWProtocolTLS.Options ?Thank you in advance,Christophe
Replies
9
Boosts
0
Views
2.4k
Activity
Jun ’24
Apps/files do not open when the result is cached with es_respond_flags_result
Hi all,I have been able to reproduce a scenario where apps/files do not open when I subscribe to ES_EVENT_TYPE_AUTH_OPEN and set caching to true while authorizing the opening of a file by responding to es_respond_flags_result(,,,).In details, If I subscribe to ES_EVENT_TYPE_AUTH_OPEN event and set bool cache = true in es_respond_flags_result(,,,)es_handler_block_t file_cbk = ^(es_client_t *client, const es_message_t *msg) { log_event_message(msg); // just to log events to the console int32_t flag = msg-&amp;gt;event.open.fflag; // getting the file-opening mask es_respond_result_t res = es_respond_flags_result(client, msg, flag, true); // simply allowing all files to open and cache the result if (ES_RESPOND_RESULT_SUCCESS != res) LOG_ERROR("es_respond_auth_result: %d", res); };Whatever application or file that I open leads me to some EPERM popup, "The Application cannot be opened" and complete unresponsiveness of the machine with occasional spinning beach balls. As you can see, I am not doing any sort of processing with the file event messages (apart from just logging to the console) - I'm simply allowing all file open operations and caching the results.This issue with es_respond_flags_result(,,,) only appears if I cache the event result; without caching everything works as expected. However, if I subscribe to ES_EVENT_TYPE_AUTH_EXEC event and respond using es_respond_auth_result(,,,) authorizing the execution of a process with the caching parameter set to true, everything seems to work gracefully.I am completely new to Objective C so there's a high chance of doing something wrong - please LMK if I am handling the event messages in an undesired fashion and suggest me the way it should be handled. If this is a known/duplicate issue, please point me to the relevant ticket or guide me on the way forward.Also added a 2 min screen recording illustrating the issue (Unlisted video): https://youtu.be/R9zSpHk72_QLooking forward to your help and support...Thanks!Uddalak
Replies
7
Boosts
0
Views
3.9k
Activity
Aug ’22
Is it possible to create a DH symmetric key from multiple shared secrets using CryptoKit ?
Hello,I'm currently trying (in Swift, iOS 13+) to reproduce an end to end communication mechanism inspired by apps like SignalApp or iMessage. But there is something I don't see how to do. When encrypting a new message the idea for a better forward secrecy and post-compromise security implies the use of not 1 but 3 or 4 DH shared secrets to compute the symmetric key (here is the part of the SignalApp protocol documentation that explains that part https://signal.org/docs/specifications/x3dh#sending-the-initial-message). But I don't think this is currently possible with CryptoKit since I don't see any way to combine multiple CryptoKit.SharedSecret together. Or am I missing something ?I could use a third party library for that of course, but I would rather not if it's possible.Thank you ! (and sorry for my english :s)
Replies
1
Boosts
0
Views
961
Activity
Mar ’23
Missing file read auth event in Endpoint Security Framework
The Endpoint Security framework provides open auth event. However certain application may just open a file to check size, access, but not read the content. Our use case is geared toward apply security when the application actually reads the content. Could Apple engineer confirm if there is any plan to support this? Had raised enhancement request long time back (Feedback FB6484629). Just thought of checking if there any update on the same. Any suggestions/comments?
Replies
3
Boosts
0
Views
1.4k
Activity
Jan ’22
Sign In With Apple not working with Xcode 12 beta on simulator ?
Running the sample "Juice" app, which demos the Sign In With Apple flow, doesn't seem to work with Xcode 12 beta and iOS 14 beta on the simulator (worked fine on the non-beta versions and on a real device with iOS 14 beta). Once the password for the device's Apple ID is entered, the wheel in the password field just keeps spinning. No error messages and nothing handed back over to the app from the ASAuthorizationController. Anyone else seeing this problem ? Are there any workarounds ?
Replies
207
Boosts
5
Views
107k
Activity
Feb ’26
Security threat due to insecure function "memcpy()" in GCDAsyncSocket.m
Hi, https://opensource.apple.com/source/HTTPServer/HTTPServer-11/CocoaHTTPServer/Vendor/CocoaAsyncSocket/GCDAsyncSocket.m.auto.html I am getting security threat in GCDAsyncSocket.m class file  There are 13 occurrences of memcpy() function which is an insecure function acc to security tool. Below is the issue description and reference links from security team. Issue description : Use of insecure functions/potential dangerous functions Reference link: CWE-676: Use of Potentially Dangerous Function This would explain why SECURITY TEAM is recommending the change of these functions. Please provide solution for this as soon as possible as it is very urgent. Thanks and Regards, Priya Mehndiratta
Replies
5
Boosts
0
Views
3.8k
Activity
Sep ’23
Signing with SecKeyCreateSignature and verification with OpenSSL
At my app I have a SecKey which I want to sign some Data with it, and at my sever I need to do the verification process, but this time with openSSL. I didn't find any common key or any steps to achieve this between Apple Security framework and OpenSSL. For example, I've tried the following: Signing (Apple Security): let signedStrCFData = SecKeyCreateSignature(key, .rsaSignatureRaw, plaintextData, &error) Verifying (OpenSSL): ret = RSAverify(NIDrsaSignature, (const unsigned char *)challenge, (unsigned int)strlen(challenge), challengeenc, challengeenc_size, rsa); Which key to choose is not really important to me (as long as it's a reasonable signing key), so I tried multiple types of keys, but I wasn't able to do it. Any idea what I'm missing here?
Replies
8
Boosts
0
Views
2.0k
Activity
Nov ’23
Different SSO behavior for ASWebAuthenticationSession in iOS 14
In our app we're performing authentication using ASWebAuthenticationSession. SSO seems to work fine in iOS 13 for different paths for the same domain but when running the same app in iOS 14, cookies don't seem to be attached to subsequent requests once authenticated in safari window. I'm not sure if it helps : Looking at the logging in instruments when running the app in iOS 14 device, I can see : 00:09.690.903 Default iOS B2c Sample (1691) CFNetwork Default iOS B2c Sample 0x1631f Faulting in NSHTTPCookieStorage singleton 00:09.690.929 Default iOS B2c Sample (1691) CFNetwork Default iOS B2c Sample 0x1631f Faulting in CFHTTPCookieStorage singleton 00:09.690.944 Default iOS B2c Sample (1691) CFNetwork Default iOS B2c Sample 0x1631f Creating default cookie storage with default identifier (Above logs don't happen in iOS 13) and later in iOS 14: 00:10.113.701 Debug iOS B2c Sample (1691) CFNetwork Default iOS B2c Sample 0x1631c Task <88E60E41-6B7B-4787-ABF6-B65C92C8FF4E>.<1> request https://testb2c.b2clogin.com/testb2c.onmicrosoft.com/b2c_1_susi/oauth2/v2.0/token is NOT allowed to set HSTS for main doc  In iOS 13 : 00:15.570.171 Debug iOSB2C (5320) CFNetwork Default iOSB2C 0x24045d Task <79A2078B-718D-4D4D-A46D-1FF1B2238431>.<6> request n/a is NOT allowed to set HSTS for main doc  00:23.139.303 Debug iOSB2C (5320) CFNetwork Default iOSB2C 0x24045d Task <88D45825-FB1E-4C38-8EFF-87A8528B61E3>.<7> request n/a is NOT allowed to set HSTS for main doc  Has anyone noticed similar issue with ASWebAuthenticationSession?
Replies
19
Boosts
0
Views
9.4k
Activity
Dec ’21
navigator.credentials.create returns an empty object
Hello, we trying to develop passwordless flow in the browser, but when we invoke navigator.credentials.create, it resolves an empty object {}. We acquired options from StrongKey server and parsed them in navigator options as was shown on wwdc20-10670 demo. An excerpt of source code is below: { &#9;&#9;publicKey: { &#9;&#9;&#9;&#9;rp: {name: queryParams.rpName}, &#9;&#9;&#9;&#9;user: { &#9;&#9;&#9;&#9;&#9;&#9;name: queryParams.userName, &#9;&#9;&#9;&#9;&#9;&#9;id: toUint8Array(queryParams.userId), &#9;&#9;&#9;&#9;&#9;&#9;displayName: queryParams.displayName &#9;&#9;&#9;&#9;}, &#9;&#9;&#9;&#9;pubKeyCredParams: [{type: "public-key", alg: -7}], &#9;&#9;&#9;&#9;challenge: toUint8Array(queryParams.challenge), &#9;&#9;&#9;&#9;authenticatorSelection: {authenticatorAttachment: "platform",}, &#9;&#9;&#9;&#9;attestation: "direct" &#9;&#9;} } The user is requested to proceed with TouchID/FaceID/etc. and everything looks as expected, but the returned value is empty. We have tested the flow in the latest Chrome, Safari and Safari for iOS. Has anyone encountered this behavior as well?
Replies
2
Boosts
0
Views
2.6k
Activity
Aug ’23
WebAuthn Authentication Experience on iOS
I'm interested in leveraging WebAuthn for an App that uses a web view for authentication. One of the open questions I'm grappling with is "what's the experience difference between WebAuthn on mobile vs. a native app experience?" The biggest difference in usability that I'm able to see from a few demos is in the authentication experience (the registration experience seems pretty similar). In the WebAuthn mobile experience, a user is prompted with "Do you want to sign in to 'XYZ@test.com' using a saved account?" with two options (one for a saved account and the second being "Account from Security Key"). I'd imagine this is different from mobile native experiences which immediately prompt Face/TouchID (less steps / friction). Is there any way to prevent / suppress that screen? For example, if I update my request to not support security keys, would a user skip the "account / security key" prompt and default to Face/TouchID (assuming there was only one registered account)? Or would iOS still default to this prompt and a user would select his/her account?
Replies
2
Boosts
0
Views
3.3k
Activity
Mar ’22
Correctly overriding TLS logic for IoT communication
Hi. I'm developing an application that should be able to connect to IoT devices in the local network. I want to use https with a self-signed certificate. As far as I understand it's against AST, but I could request an exception.  There are 2 things that I would need to change to make it work: Trust my self-signed Root CA - I'm planning to use it to issue certificate on each device with subjectAlternativeName = DNS:<deviceId>.device.mydomain.com that is not real DNS name. Alter logic to verify host - those devices don't have public DNS addresses and the application communicates with IoT devices using address in local network like 192.168.0.14. Because my application knows the exact id of the device (each IoT device is connected to the user account) if a server responds with a certificate issued by my Root CA I would check that <deviceId> in the certificate matches with the IoT device user is trying to connect to instead of checking hostname. In this scenario each device has its own unique key pair and even if someone disassembles and extracts private key from one device, it would not give them ability to intercept request from another device. Alternatively, aside from using plaintext http, I was thinking about giving my IoT devices certificates issued by trusted CA, like Let's Encrypt, and setting up DNS that would actually resolve <deviceId>.device.mydomain.com to its current address on local network, but there are 2 issues with that approach that I would like to avoid: Let's Encrypt has a quota of 50 certificates per week and I assume other Public CAs would have similar restrictions My backend server might not be aware of the actual local address if there is no connectivity between IoT device and backend server, whereas application can find it on the local network. I'm not an expert in iOS development and my project is written with react-native, but I managed to get some code working: #import <React/RCTBridgeModule.h> #import <React/RCTHTTPRequestHandler.h> #import <React/RCTLog.h> #import "RCTActiveDevice.h" @implementation RCTHTTPRequestHandler(iotTls) (void)URLSession:(NSURLSession *)session didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler { &#9;NSString *deviceId = [RCTActiveDevice getCurrentDeviceId]; &#9;if (deviceId && [challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) { &#9;&#9;SecTrustRef serverTrust = challenge.protectionSpace.serverTrust; &#9;&#9;SecCertificateRef issuerRootCa = SecTrustGetCertificateAtIndex(serverTrust, SecTrustGetCertificateCount(serverTrust) - 1); &#9;&#9;NSData *issuerRootCaData = CFBridgingRelease(SecCertificateCopyData(issuerRootCa)); &#9;&#9;NSString *deviceRootCaPath = [[NSBundle mainBundle] pathForResource:@"device_root_ca" ofType:@"crt"]; &#9;&#9;NSData *deviceRootCaData = [NSData dataWithContentsOfFile:deviceRootCaPath]; &#9;&#9;SecCertificateRef deviceRootCa = SecCertificateCreateWithData(NULL, (__bridge CFDataRef) deviceRootCaData); &#9;&#9; &#9;&#9;bool isDeviceCertificate = [deviceRootCaData isEqualToData:issuerRootCaData]; &#9;&#9;if (isDeviceCertificate) { &#9;&#9;&#9;NSString *domain = [NSString stringWithFormat:@"%@.device.mydomain.com", deviceId]; &#9;&#9;&#9;SecPolicyRef policy = SecPolicyCreateSSL(false, (__bridge CFStringRef) domain); &#9;&#9;&#9;SecTrustSetPolicies(serverTrust, (bridge CFArrayRef) [NSArray arrayWithObjects: (bridge id _Nonnull) (policy), nil]); &#9;&#9;&#9;SecTrustSetAnchorCertificates(serverTrust, (bridge CFArrayRef) [NSArray arrayWithObjects: (bridge id _Nonnull) (deviceRootCa), nil]); &#9;&#9;&#9;bool isDeviceTrusted; &#9;&#9;&#9;if (@available(iOS 12.0, *)) { &#9;&#9;&#9;&#9;isDeviceTrusted = SecTrustEvaluateWithError(serverTrust, nil); &#9;&#9;&#9;} else { &#9;&#9;&#9;&#9;SecTrustResultType result; &#9;&#9;&#9;&#9;SecTrustEvaluate(serverTrust, &result); &#9;&#9;&#9;&#9;isDeviceTrusted = (result == kSecTrustResultUnspecified || result == kSecTrustResultProceed); &#9;&#9;&#9;} &#9;&#9;&#9;if (isDeviceTrusted) { &#9;&#9;&#9;&#9;NSURLCredential *credential = [NSURLCredential credentialForTrust: serverTrust]; &#9;&#9;&#9;&#9;completionHandler(NSURLSessionAuthChallengeUseCredential, credential); &#9;&#9;&#9;&#9;return; &#9;&#9;&#9;} &#9;&#9;&#9;completionHandler(NSURLSessionAuthChallengeCancelAuthenticationChallenge, nil); &#9;&#9;} &#9;} &#9;completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]); } @end My question is this approach good and would I be able to get approval for my application to be included in the App Store?
Replies
6
Boosts
0
Views
1.6k
Activity
Feb ’23