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

Convert PEM format Curve25519 ECDH Keys with long length base64 string?
let privateKey = Curve25519.KeyAgreement.PrivateKey() let publicKey = privateKey.publicKey than what I do next? my requirement keys are like Public Key: -——BEGIN PUBLIC KEY-----MIIBMTCB6gYHKoZIzj0CATCB3gIBATArBgcqhkjOPQEBAiB/////////////////////////////////////////7TBEBCAqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqYSRShRAQge0Je0Je0Je0Je0Je0Je0Je0Je0Je0Je0JgtenHcQyGQEQQQqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq0kWiCuGaG4oIa04B7dLHdI0UySPU1+bXxhsinpxaJ+ztPZAiAQAAAAAAAAAAAAAAAAAAAAFN753qL3nNZYEmMaXPXT7QIBCANCAARMyjhxmqctNgQJS5yef637I1SMM+Yg9PZ6VKF83hgCDH13bayEHj8I1nEPVO5pfyqATxOcOQS110iA9QJTEpsI-----END PUBLIC KEY----- Private Key: -----BEGIN PRIVATE KEY-----MIICRwIBADCB6gYHKoZIzj0CATCB3gIBATArBgcqhkjOPQEBAiB/////////////////////////////////////////7TBEBCAqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqYSRShRAQge0Je0Je0Je0Je0Je0Je0Je0Je0Je0Je0JgtenHcQyGQEQQQqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq0kWiCuGaG4oIa04B7dLHdI0UySPU1+bXxhsinpxaJ+ztPZAiAQAAAAAAAAAAAAAAAAAAAAFN753qL3nNZYEmMaXPXT7QIBCASCAVMwggFPAgEBBCAOeSuzq+O1tPlhPZj4KZdfAq5Z0+yca15ukbUuwsyJQKCB4TCB3gIBATArBgcqhkjOPQEBAiB/////////////////////////////////////////7TBEBCAqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqYSRShRAQge0Je0Je0Je0Je0Je0Je0Je0Je0Je0Je0JgtenHcQyGQEQQQqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq0kWiCuGaG4oIa04B7dLHdI0UySPU1+bXxhsinpxaJ+ztPZAiAQAAAAAAAAAAAAAAAAAAAAFN753qL3nNZYEmMaXPXT7QIBCKFEA0IABG56w6jtAyb2T6oguKNN6HvLPQdT0Mms8gCepW51pobrDT/WfXJKfFr5fRuNalS+YkDQggoc7xtpYFin0ELidYw=-----END PRIVATE KEY-----
3
0
1.8k
Jan ’22
secure event input disabled from one application disables it system wide though other applications had enabled, How to handle it?
I have created two applications both calls EnableSecureEventInput api when launched to enable secure input (keyloggers should not capture keystrokes). But when one of these application calls DisableSecureEventInput it is disabled system wide and the other application also lost the secure input though it had called the enable api. isn't this buggy? or am i missing something here? I tried to look for the api's behaviour online but could not find any, except the technical note: https://developer.apple.com/library/archive/technotes/tn2150/_index.html#//apple_ref/doc/uid/DTS10004249 which is too old not having enough details. Please share any related docs
1
0
827
Jan ’22
Please tell me how to Register an Ad Network of SKAdNetwork
When I go to the following ad network registration page, I get a message that I do not have permission to view the page. (As a company, we are registered in the Apple developer program and I have been assigned the role of developer.) https://developer.apple.com/contact/request/ad-network-id/ How many permissions do I need to open the registration form and register? Thank you very much for your help.
0
0
463
Jan ’22
OpenSSL 3 FIPS on iOS
Hello All, Has anyone had any experience of using OpenSSL 3's FIPS Provider on iOS? We are evaluating the latest FIPS-140 release of OpenSSL for use within our apps, but we are struggling with packaging the Provider in such a way as would pass Apple's App review. We currently have the 'fips.dylib' file wrapped up in a signed Framework Bundle. It would be great to hear from anyone who has got OpenSSL 3 FIPS to work and through an App Review. Thanks
0
2
758
Jan ’22
Use of private key .pem in app.
I have an iOS app that uses an API requiring me to create a PoP token using a clientID (String), clientSecret (String) and a private key (.pem) file. I realize for security reasons, I should not store these in the app or in the code, but what is the recommended way for my app to store, access and use these items?
3
0
849
Jan ’22
Does ATS differ between TestFlight and Release builds?
Hi everyone, I hope I can provide enough context to receive helpful insight! I found that the release build of my iOS app (iOS 15) seems to be able to connect to my local dev server (running on localhost) without any changes to Info.release.plist. This is fairly surprising, although I found this link that describes how App Transport Security (ATS) differs between iOS 9/macOS 10.11 and iOS 10+/macOS 10.12+. Namely, "no longer need[ing] an exception for" .local domains, IP addresses, and unqualified domains. The above explains why Release builds can connect to local IP addresses, but doesn't explain the following questions: If connections to local IP addresses are allowed by ATS, why can't our Testflight build connect to a local IP address? What is different between the release build and Testflight build with regards to the above? They are being pulled from App Store and TestFlight respectively, and are configured by the same Info.release.plist from my observation. Forum thread 69591 appears to be related, but does not address these questions. Any insight and/or resources would be greatly appreciated! Cheers
1
0
534
Jan ’22
Login with Company IdP and new App Store Review Guideline 5.1.1
Hi everyone, in an email that came to me directly from apple, which refers to the aforementioned guidelines, the following is shown in the figure: Now in my app, the login is done directly on a third IdP, so I wanted to understand if the issue of user cancellation falls into this case or not, since as I said it is a user on a third IdP (ex Google, Microsoft, Private IdP etc.), and therefore the rule only applies to those apps that allow registration directly within it and not on an external IdP. I hope I was clear. Thank you
2
0
1.1k
Apr ’22
Certificate Signing Requests Explained
I regularly help developers with code signing problems and I find that a lot of those problems stem from a fundamental misunderstanding of how code signing requests work. This post is my attempt at explaining that. Note After posting this I then went on to write TN3161 Inside Code Signing: Certificates, which covers similar ground in a much more comprehensive way. I think this post still has value, but you should definitely start by reading TN3161. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" Certificate Signing Requests Explained I see a lot of folks confused by how code signing requests (CSRs) work, and that causes problems down the line. This is my attempt to explain the process and head off those problems. IMPORTANT This post covers the ‘classic’ certificate creation process described in Developer Account Help > Create certificates > Create a certificate signing request. Things work differently if you use Xcode to create your certificates, and very differently if you use cloud-managed certificates. Here’s a basic outline of the CSR process: You run Keychain Access and choose Certificate Assistant > Request a Certificate from a Certificate Authority. You run through the workflow as described in Developer Account Help > Create certificates > Create a certificate signing request. This does two things: It generates a public / private key pair in your keychain. To see these, run Keychain Access and select “login” on the left and Keys at the top. Look for keys whose names match the Common Name you entered in step 2. It prompts you to save a .certSigningRequest file (CSR). This contains a copy of the public key. You upload the CSR file to the developer web site. The developer web site issues you a certificate. In human terms this certificate says “Apple certifies that the subject of this certificate holds the private key that matches the public key embedded in this certificate.” Note The developer web site sets the subject information in the certificate based on your developer account. It ignores the subject information in the CSR. So, you can enter any information you want in step 2. This is a good way to distinguish between different keys in your keychain. For example, you might set the Common Name field in step 2 to include a unique identifier that allows you to easily identify the public / private key pair generated in step 3. You download the certificate and add it to your keychain. At this point your keychain contains a digital identity, that is, a certificate and the private key that matches the public key embedded in that certificate. To see this in Keychain Access, select “login” on the left and My Certificates at the top. What’s This My Certificates Thing? There’s an industry-wide terminology problem here. Folks use the term certificate to mean two different things: A digital identity, that is, a certificate and its matching private key An actual certificate This industry-wide confusion extends into the Apple ecosystem. For example: The Security framework gets this right, drawing a clear distinction between a digital identity (SecIdentity) and a certificate (SecCertificate). Keychain Access uses My Certificates for digital identities. Other user-facing apps use different terms. For example, Apple Configurator uses signing identity (yay for them!). OTOH, the help for Apple Mail uses the term personal certificate. Xcode and its documentation uses the term signing certificate to denote a digital identity that can be used for code signing. This terminological inexactitude causes all sorts of problems. For example, imagine you’re setting up a new Mac. You download your certificate from the developer web site and then wonder why you can’t sign your code. That’s because the developer web site gives you a certificate, not a digital identity. Indeed, the developer web site can’t give you a digital identity because it never got a copy of your private key [1]. [1] Again, we’re talking about the classic certificate creation process here; this statement is not true for cloud-managed certificates. Digital Identity Formation Apple platforms form a digital identity by: Extracting the public key from the certificate. Calculating a SHA-1 digest of that. Looking for a private key whose kSecAttrApplicationLabel attribute matches that SHA-1 hash. For more background on this, see my SecItem attributes for keys post. Note that it’s perfectly valid for multiple certificates to match against the same private key, yielding a digital identity for each certificate. You regularly see this when you renew a certificate. Looking Inside a CSR A CSR is a PEM file (PEM is short for Privacy-Enhanced Mail) with the CERTIFICATE REQUEST label: % cat CertificateSigningRequest.certSigningRequest -----BEGIN CERTIFICATE REQUEST----- MIICgjCCAWoCAQAwPTEcMBoGCSqGSIb3DQEJARYNZnJvZ0Bmcm9nLmNvbTEQMA4G … Ur9x5voYb6CafUBZMMiYw6aFXcgnsx4ZXxe8VEqNCarrQi+9tqitDD/bCuymT5Da 2+t64DGjpVM2lwtwqvH6Qh6QdPjkUw== -----END CERTIFICATE REQUEST----- To see inside, run the openssl tool as shown below: % openssl req -in CertificateSigningRequest.certSigningRequest -text -noout Certificate Request: Data: Version: 0 (0x0) Subject: emailAddress=mrgumby@opendoor.com, CN=Mr Gumby, C=US Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: 00:b1:b4:a0:15:4d:4a:d7:29:1d:ed:d6:b7:c2:7c: … 28:b9:8a:58:a4:04:63:fe:45:b2:4f:db:bd:93:20: 4e:8b Exponent: 65537 (0x10001) Attributes: a0:00 Signature Algorithm: sha256WithRSAEncryption 80:f9:0e:73:8e:42:d8:3c:e3:e0:06:54:13:d7:48:ef:a8:71: … 2f:74:e1:2e:cf:e7:ed:3e:64:b4:78:85:f4:ac:38:07:b1:15: 6b:3c:39:f9 For even more details, convert the file to DER form and then dump that as ASN.1: % openssl req -in CertificateSigningRequest.certSigningRequest -out CertificateSigningRequest.der -outform der % dumpasn1 -p -a CertificateSigningRequest.der SEQUENCE { SEQUENCE { INTEGER 0 SEQUENCE { SET { SEQUENCE { OBJECT IDENTIFIER emailAddress (1 2 840 113549 1 9 1) IA5String 'mrgumby@opendoor.com' } } SET { SEQUENCE { OBJECT IDENTIFIER commonName (2 5 4 3) UTF8String 'Mr Gumby' } } SET { SEQUENCE { OBJECT IDENTIFIER countryName (2 5 4 6) PrintableString 'US' } } } SEQUENCE { SEQUENCE { OBJECT IDENTIFIER rsaEncryption (1 2 840 113549 1 1 1) NULL } BIT STRING, encapsulates { SEQUENCE { INTEGER 00 B1 B4 A0 15 4D 4A D7 29 1D ED D6 B7 C2 7C 74 … 28 B9 8A 58 A4 04 63 FE 45 B2 4F DB BD 93 20 4E 8B INTEGER 65537 } } } [0] Error: Object has zero length. } SEQUENCE { OBJECT IDENTIFIER sha256WithRSAEncryption (1 2 840 113549 1 1 11) NULL } BIT STRING 80 F9 0E 73 8E 42 D8 3C E3 E0 06 54 13 D7 48 EF … ED 3E 64 B4 78 85 F4 AC 38 07 B1 15 6B 3C 39 F9 } I’m using the dumpasn1 tool, available here. To extract the public key from the CSR, run this command: % openssl req -in CertificateSigningRequest.certSigningRequest -noout -pubkey -out public.pem % cat public.pem -----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsbSgFU1K1ykd7da3wnx0 … FymGqUEcwfIISlG1C9VXyMRPzDcMrzjHm4i9qI9NliYouYpYpARj/kWyT9u9kyBO iwIDAQAB -----END PUBLIC KEY----- To further explore that key, use the techniques in my On Cryptographic Key Formats post. Revision History 2024-07-23 Updated to include a link to TN3161 Inside Code Signing: Certificates. 2022-11-03 First posted.
0
0
30k
Jul ’24
MFA on command line (for AWS cli etc)
Wondering if there's any way to access an MFA token for (for example) AWS that is saved in/generated by my iCloud keychain from the command line, perhaps by typing my keychain password or even using the fingerprint reader. Having to go to the System Preferences and auth there in order to see an MFA token so that I can use it on the command line is a pain in the butt, especially when I need to do it several times a day.
0
0
635
Jan ’22
createCredentialAssertionRequestWithChallenge: After canceling login it doesn't work again.
Hi everyone, my first post here: I am trying to integrate new macOS Monterey FIDO2 authentication into a macOS app and I have trouble with login issue. After making an assertion request (calling createCredentialAssertionRequestWithChallenge) the Sign In dialog appears. When you click on the cancel button and make another assertion request the dialog doesn't appear and the application window's close button turns gray and the window loses its focus. (please see the attached screenshots). This happens only when pressed cancel button on Sign In, canceling registration or authenticating sign-in or log-in are ok. Here is my code for authentication request:    ASAuthorizationPlatformPublicKeyCredentialProvider* credentialProvider = [[ASAuthorizationPlatformPublicKeyCredentialProvider alloc] initWithRelyingPartyIdentifier:@"myrelyingparty.com"];   ASAuthorizationRequest* request = [credentialProvider createCredentialAssertionRequestWithChallenge:challenge];   ASAuthorizationController* authorizationController = [[ASAuthorizationController alloc] initWithAuthorizationRequests:@[request]];       authorizationController.delegate = self;   authorizationController.presentationContextProvider = self;   [authorizationController performRequests];       [[NSApplication.sharedApplication mainWindow] makeKeyWindow];
3
0
1.2k
Mar ’22
[Face ID] Identify if faceid with mask is enabled
With the new feature enabled in ios beta 15.4, I can validate that faceID with mask works. We get a bool(matched/unmatched) response when using evaluatePolicy, which is not helpful in finding if faceid-with-mask was used. I want to disable the face id feature of the app when a non-secure way of authentication is enabled and I'm unable to find any documentation on this on LAPolicy's page. What would be the recommended way to go around finding if face id with mask is enabled? Any help with documentation would be appreciated. Thanks!
0
0
1k
Feb ’22
Convert PEM format Curve25519 ECDH Keys with long length base64 string?
let privateKey = Curve25519.KeyAgreement.PrivateKey() let publicKey = privateKey.publicKey than what I do next? my requirement keys are like Public Key: -——BEGIN PUBLIC KEY-----MIIBMTCB6gYHKoZIzj0CATCB3gIBATArBgcqhkjOPQEBAiB/////////////////////////////////////////7TBEBCAqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqYSRShRAQge0Je0Je0Je0Je0Je0Je0Je0Je0Je0Je0JgtenHcQyGQEQQQqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq0kWiCuGaG4oIa04B7dLHdI0UySPU1+bXxhsinpxaJ+ztPZAiAQAAAAAAAAAAAAAAAAAAAAFN753qL3nNZYEmMaXPXT7QIBCANCAARMyjhxmqctNgQJS5yef637I1SMM+Yg9PZ6VKF83hgCDH13bayEHj8I1nEPVO5pfyqATxOcOQS110iA9QJTEpsI-----END PUBLIC KEY----- Private Key: -----BEGIN PRIVATE KEY-----MIICRwIBADCB6gYHKoZIzj0CATCB3gIBATArBgcqhkjOPQEBAiB/////////////////////////////////////////7TBEBCAqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqYSRShRAQge0Je0Je0Je0Je0Je0Je0Je0Je0Je0Je0JgtenHcQyGQEQQQqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq0kWiCuGaG4oIa04B7dLHdI0UySPU1+bXxhsinpxaJ+ztPZAiAQAAAAAAAAAAAAAAAAAAAAFN753qL3nNZYEmMaXPXT7QIBCASCAVMwggFPAgEBBCAOeSuzq+O1tPlhPZj4KZdfAq5Z0+yca15ukbUuwsyJQKCB4TCB3gIBATArBgcqhkjOPQEBAiB/////////////////////////////////////////7TBEBCAqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqYSRShRAQge0Je0Je0Je0Je0Je0Je0Je0Je0Je0Je0JgtenHcQyGQEQQQqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq0kWiCuGaG4oIa04B7dLHdI0UySPU1+bXxhsinpxaJ+ztPZAiAQAAAAAAAAAAAAAAAAAAAAFN753qL3nNZYEmMaXPXT7QIBCKFEA0IABG56w6jtAyb2T6oguKNN6HvLPQdT0Mms8gCepW51pobrDT/WfXJKfFr5fRuNalS+YkDQggoc7xtpYFin0ELidYw=-----END PRIVATE KEY-----
Replies
3
Boosts
0
Views
1.8k
Activity
Jan ’22
secure event input disabled from one application disables it system wide though other applications had enabled, How to handle it?
I have created two applications both calls EnableSecureEventInput api when launched to enable secure input (keyloggers should not capture keystrokes). But when one of these application calls DisableSecureEventInput it is disabled system wide and the other application also lost the secure input though it had called the enable api. isn't this buggy? or am i missing something here? I tried to look for the api's behaviour online but could not find any, except the technical note: https://developer.apple.com/library/archive/technotes/tn2150/_index.html#//apple_ref/doc/uid/DTS10004249 which is too old not having enough details. Please share any related docs
Replies
1
Boosts
0
Views
827
Activity
Jan ’22
MRC usage in Objective C
is Manual Referencing Count in Objective C vulnerable to buffer overflow attacks ? or is non ARC applications vulnerable to bufferOverflow attacks?
Replies
2
Boosts
0
Views
756
Activity
Jan ’22
When will BSM Audit going to be removed
We know that BSM Audit was deprecated in macOS 11 Big Sur. Does Apple mention anywhere when will it be completely removed from macOS? Do we expect it to be removed in the next macOS release in 2022?
Replies
2
Boosts
0
Views
1.2k
Activity
Jun ’22
decrypt on swift
good morning, I saw one of your old post on decrypting on swift. can you guide me on how you achieved it. any sources will be very welcomed. thank you
Replies
1
Boosts
0
Views
816
Activity
Jan ’22
little bug in Monitoring System Events with Endpoint Security sample code
file auth_demo.c in sample code as following: static void handle_open_worker(es_client_t *x, const es_message_t *msg) { static const char *ro_prefix = "/usr/local/bin/"; //ro_prefix_length will always equal 7,since sizeof(char*)=8 static const size_t ro_prefix_length = sizeof(ro_prefix) - 1; ...... }
Replies
1
Boosts
0
Views
910
Activity
Jan ’22
Please tell me how to Register an Ad Network of SKAdNetwork
When I go to the following ad network registration page, I get a message that I do not have permission to view the page. (As a company, we are registered in the Apple developer program and I have been assigned the role of developer.) https://developer.apple.com/contact/request/ad-network-id/ How many permissions do I need to open the registration form and register? Thank you very much for your help.
Replies
0
Boosts
0
Views
463
Activity
Jan ’22
little bug in Monitoring System Events with Endpoint Security sample code
file auth_demo.c in sample code as following: static void handle_open_worker(es_client_t *x, const es_message_t *msg) { static const char *ro_prefix = "/usr/local/bin/"; //ro_prefix_length will always equal 7,since sizeof(char*)=8 static const size_t ro_prefix_length = sizeof(ro_prefix) - 1; ...... }
Replies
1
Boosts
0
Views
659
Activity
Jan ’22
How does the Cadano blockchain development work ?
having read about the Cardano upcoming upgrades on the roadmap, how does the toke development work? prerequisites needed .....
Replies
0
Boosts
0
Views
409
Activity
Jan ’22
OpenSSL 3 FIPS on iOS
Hello All, Has anyone had any experience of using OpenSSL 3's FIPS Provider on iOS? We are evaluating the latest FIPS-140 release of OpenSSL for use within our apps, but we are struggling with packaging the Provider in such a way as would pass Apple's App review. We currently have the 'fips.dylib' file wrapped up in a signed Framework Bundle. It would be great to hear from anyone who has got OpenSSL 3 FIPS to work and through an App Review. Thanks
Replies
0
Boosts
2
Views
758
Activity
Jan ’22
Having trouble getting the endpoint-security entitlement working
I got the permission from Apple (yay), and when I generate a profile on the portal, I can select it. But when I download it... it doesn't have it. Looking at the profile on the portal again, it says I have "Enabled Capabilities Endpoint Security, In-App Purchase". (Although how did that get there?)
Replies
17
Boosts
0
Views
2.9k
Activity
Jul ’23
Use of private key .pem in app.
I have an iOS app that uses an API requiring me to create a PoP token using a clientID (String), clientSecret (String) and a private key (.pem) file. I realize for security reasons, I should not store these in the app or in the code, but what is the recommended way for my app to store, access and use these items?
Replies
3
Boosts
0
Views
849
Activity
Jan ’22
Keychain Access
When trying to build an AR app to my Iphone 11 with Xcode (13.2.1) using Mac OS 12.1 the build fails. Codesign wants me to use the Apple Development keychain. No matter which password I use it fails.
Replies
5
Boosts
1
Views
16k
Activity
Sep ’23
Does ATS differ between TestFlight and Release builds?
Hi everyone, I hope I can provide enough context to receive helpful insight! I found that the release build of my iOS app (iOS 15) seems to be able to connect to my local dev server (running on localhost) without any changes to Info.release.plist. This is fairly surprising, although I found this link that describes how App Transport Security (ATS) differs between iOS 9/macOS 10.11 and iOS 10+/macOS 10.12+. Namely, "no longer need[ing] an exception for" .local domains, IP addresses, and unqualified domains. The above explains why Release builds can connect to local IP addresses, but doesn't explain the following questions: If connections to local IP addresses are allowed by ATS, why can't our Testflight build connect to a local IP address? What is different between the release build and Testflight build with regards to the above? They are being pulled from App Store and TestFlight respectively, and are configured by the same Info.release.plist from my observation. Forum thread 69591 appears to be related, but does not address these questions. Any insight and/or resources would be greatly appreciated! Cheers
Replies
1
Boosts
0
Views
534
Activity
Jan ’22
How do I enable Application Transport Security (ATS) restrictions
Hi all, How do I, Ensure ATS is enabled within the iOS mobile application so that confidential information sent between the application and the back end servers are secured and not to be intercepted by man­-in­the­-middle style attacks. Below is what I already set but still Fails for the penetration test.
Replies
1
Boosts
0
Views
910
Activity
Jan ’22
Login with Company IdP and new App Store Review Guideline 5.1.1
Hi everyone, in an email that came to me directly from apple, which refers to the aforementioned guidelines, the following is shown in the figure: Now in my app, the login is done directly on a third IdP, so I wanted to understand if the issue of user cancellation falls into this case or not, since as I said it is a user on a third IdP (ex Google, Microsoft, Private IdP etc.), and therefore the rule only applies to those apps that allow registration directly within it and not on an external IdP. I hope I was clear. Thank you
Replies
2
Boosts
0
Views
1.1k
Activity
Apr ’22
Certificate Signing Requests Explained
I regularly help developers with code signing problems and I find that a lot of those problems stem from a fundamental misunderstanding of how code signing requests work. This post is my attempt at explaining that. Note After posting this I then went on to write TN3161 Inside Code Signing: Certificates, which covers similar ground in a much more comprehensive way. I think this post still has value, but you should definitely start by reading TN3161. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" Certificate Signing Requests Explained I see a lot of folks confused by how code signing requests (CSRs) work, and that causes problems down the line. This is my attempt to explain the process and head off those problems. IMPORTANT This post covers the ‘classic’ certificate creation process described in Developer Account Help > Create certificates > Create a certificate signing request. Things work differently if you use Xcode to create your certificates, and very differently if you use cloud-managed certificates. Here’s a basic outline of the CSR process: You run Keychain Access and choose Certificate Assistant > Request a Certificate from a Certificate Authority. You run through the workflow as described in Developer Account Help > Create certificates > Create a certificate signing request. This does two things: It generates a public / private key pair in your keychain. To see these, run Keychain Access and select “login” on the left and Keys at the top. Look for keys whose names match the Common Name you entered in step 2. It prompts you to save a .certSigningRequest file (CSR). This contains a copy of the public key. You upload the CSR file to the developer web site. The developer web site issues you a certificate. In human terms this certificate says “Apple certifies that the subject of this certificate holds the private key that matches the public key embedded in this certificate.” Note The developer web site sets the subject information in the certificate based on your developer account. It ignores the subject information in the CSR. So, you can enter any information you want in step 2. This is a good way to distinguish between different keys in your keychain. For example, you might set the Common Name field in step 2 to include a unique identifier that allows you to easily identify the public / private key pair generated in step 3. You download the certificate and add it to your keychain. At this point your keychain contains a digital identity, that is, a certificate and the private key that matches the public key embedded in that certificate. To see this in Keychain Access, select “login” on the left and My Certificates at the top. What’s This My Certificates Thing? There’s an industry-wide terminology problem here. Folks use the term certificate to mean two different things: A digital identity, that is, a certificate and its matching private key An actual certificate This industry-wide confusion extends into the Apple ecosystem. For example: The Security framework gets this right, drawing a clear distinction between a digital identity (SecIdentity) and a certificate (SecCertificate). Keychain Access uses My Certificates for digital identities. Other user-facing apps use different terms. For example, Apple Configurator uses signing identity (yay for them!). OTOH, the help for Apple Mail uses the term personal certificate. Xcode and its documentation uses the term signing certificate to denote a digital identity that can be used for code signing. This terminological inexactitude causes all sorts of problems. For example, imagine you’re setting up a new Mac. You download your certificate from the developer web site and then wonder why you can’t sign your code. That’s because the developer web site gives you a certificate, not a digital identity. Indeed, the developer web site can’t give you a digital identity because it never got a copy of your private key [1]. [1] Again, we’re talking about the classic certificate creation process here; this statement is not true for cloud-managed certificates. Digital Identity Formation Apple platforms form a digital identity by: Extracting the public key from the certificate. Calculating a SHA-1 digest of that. Looking for a private key whose kSecAttrApplicationLabel attribute matches that SHA-1 hash. For more background on this, see my SecItem attributes for keys post. Note that it’s perfectly valid for multiple certificates to match against the same private key, yielding a digital identity for each certificate. You regularly see this when you renew a certificate. Looking Inside a CSR A CSR is a PEM file (PEM is short for Privacy-Enhanced Mail) with the CERTIFICATE REQUEST label: % cat CertificateSigningRequest.certSigningRequest -----BEGIN CERTIFICATE REQUEST----- MIICgjCCAWoCAQAwPTEcMBoGCSqGSIb3DQEJARYNZnJvZ0Bmcm9nLmNvbTEQMA4G … Ur9x5voYb6CafUBZMMiYw6aFXcgnsx4ZXxe8VEqNCarrQi+9tqitDD/bCuymT5Da 2+t64DGjpVM2lwtwqvH6Qh6QdPjkUw== -----END CERTIFICATE REQUEST----- To see inside, run the openssl tool as shown below: % openssl req -in CertificateSigningRequest.certSigningRequest -text -noout Certificate Request: Data: Version: 0 (0x0) Subject: emailAddress=mrgumby@opendoor.com, CN=Mr Gumby, C=US Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: 00:b1:b4:a0:15:4d:4a:d7:29:1d:ed:d6:b7:c2:7c: … 28:b9:8a:58:a4:04:63:fe:45:b2:4f:db:bd:93:20: 4e:8b Exponent: 65537 (0x10001) Attributes: a0:00 Signature Algorithm: sha256WithRSAEncryption 80:f9:0e:73:8e:42:d8:3c:e3:e0:06:54:13:d7:48:ef:a8:71: … 2f:74:e1:2e:cf:e7:ed:3e:64:b4:78:85:f4:ac:38:07:b1:15: 6b:3c:39:f9 For even more details, convert the file to DER form and then dump that as ASN.1: % openssl req -in CertificateSigningRequest.certSigningRequest -out CertificateSigningRequest.der -outform der % dumpasn1 -p -a CertificateSigningRequest.der SEQUENCE { SEQUENCE { INTEGER 0 SEQUENCE { SET { SEQUENCE { OBJECT IDENTIFIER emailAddress (1 2 840 113549 1 9 1) IA5String 'mrgumby@opendoor.com' } } SET { SEQUENCE { OBJECT IDENTIFIER commonName (2 5 4 3) UTF8String 'Mr Gumby' } } SET { SEQUENCE { OBJECT IDENTIFIER countryName (2 5 4 6) PrintableString 'US' } } } SEQUENCE { SEQUENCE { OBJECT IDENTIFIER rsaEncryption (1 2 840 113549 1 1 1) NULL } BIT STRING, encapsulates { SEQUENCE { INTEGER 00 B1 B4 A0 15 4D 4A D7 29 1D ED D6 B7 C2 7C 74 … 28 B9 8A 58 A4 04 63 FE 45 B2 4F DB BD 93 20 4E 8B INTEGER 65537 } } } [0] Error: Object has zero length. } SEQUENCE { OBJECT IDENTIFIER sha256WithRSAEncryption (1 2 840 113549 1 1 11) NULL } BIT STRING 80 F9 0E 73 8E 42 D8 3C E3 E0 06 54 13 D7 48 EF … ED 3E 64 B4 78 85 F4 AC 38 07 B1 15 6B 3C 39 F9 } I’m using the dumpasn1 tool, available here. To extract the public key from the CSR, run this command: % openssl req -in CertificateSigningRequest.certSigningRequest -noout -pubkey -out public.pem % cat public.pem -----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsbSgFU1K1ykd7da3wnx0 … FymGqUEcwfIISlG1C9VXyMRPzDcMrzjHm4i9qI9NliYouYpYpARj/kWyT9u9kyBO iwIDAQAB -----END PUBLIC KEY----- To further explore that key, use the techniques in my On Cryptographic Key Formats post. Revision History 2024-07-23 Updated to include a link to TN3161 Inside Code Signing: Certificates. 2022-11-03 First posted.
Replies
0
Boosts
0
Views
30k
Activity
Jul ’24
MFA on command line (for AWS cli etc)
Wondering if there's any way to access an MFA token for (for example) AWS that is saved in/generated by my iCloud keychain from the command line, perhaps by typing my keychain password or even using the fingerprint reader. Having to go to the System Preferences and auth there in order to see an MFA token so that I can use it on the command line is a pain in the butt, especially when I need to do it several times a day.
Replies
0
Boosts
0
Views
635
Activity
Jan ’22
createCredentialAssertionRequestWithChallenge: After canceling login it doesn't work again.
Hi everyone, my first post here: I am trying to integrate new macOS Monterey FIDO2 authentication into a macOS app and I have trouble with login issue. After making an assertion request (calling createCredentialAssertionRequestWithChallenge) the Sign In dialog appears. When you click on the cancel button and make another assertion request the dialog doesn't appear and the application window's close button turns gray and the window loses its focus. (please see the attached screenshots). This happens only when pressed cancel button on Sign In, canceling registration or authenticating sign-in or log-in are ok. Here is my code for authentication request:    ASAuthorizationPlatformPublicKeyCredentialProvider* credentialProvider = [[ASAuthorizationPlatformPublicKeyCredentialProvider alloc] initWithRelyingPartyIdentifier:@"myrelyingparty.com"];   ASAuthorizationRequest* request = [credentialProvider createCredentialAssertionRequestWithChallenge:challenge];   ASAuthorizationController* authorizationController = [[ASAuthorizationController alloc] initWithAuthorizationRequests:@[request]];       authorizationController.delegate = self;   authorizationController.presentationContextProvider = self;   [authorizationController performRequests];       [[NSApplication.sharedApplication mainWindow] makeKeyWindow];
Replies
3
Boosts
0
Views
1.2k
Activity
Mar ’22
[Face ID] Identify if faceid with mask is enabled
With the new feature enabled in ios beta 15.4, I can validate that faceID with mask works. We get a bool(matched/unmatched) response when using evaluatePolicy, which is not helpful in finding if faceid-with-mask was used. I want to disable the face id feature of the app when a non-secure way of authentication is enabled and I'm unable to find any documentation on this on LAPolicy's page. What would be the recommended way to go around finding if face id with mask is enabled? Any help with documentation would be appreciated. Thanks!
Replies
0
Boosts
0
Views
1k
Activity
Feb ’22