Post

Replies

Boosts

Views

Activity

Reply to Custom lock screen
Here are the ideas and progress so far that I have tried with the lock screen with touch id. Using this sample code as a launching point for a POC, https://github.com/antoinebell/NameAndPassword. I modified it for looking into the touch id. GitHub - antoinebell/NameAndPassword: Updated version of the NameAndPassword 'SFAuthorizationPluginView'. Updated version of the NameAndPassword 'SFAuthorizationPluginView'. - GitHub - antoinebell/NameAndPassword: Updated version of the NameAndPassword 'SFAuthorizationPluginView'. github.com First of all, I found that this what I have to do in order to get a custom lock screen with that sample code. system.login.screensaver // this changes it to the ugly pop up window <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>class</key> <string>rule</string> <key>comment</key> <string>The owner or any administrator can unlock the screensaver, set rule to "authenticate-session-owner-or-admin" to enable SecurityAgent.</string> <key>created</key> <real>674211169.32046402</real> <key>modified</key> <real>674211169.32046402</real> <key>rule</key> <array> <string>authenticate-session-owner-or-admin</string> </array> <key>version</key> <integer>1</integer> </dict> </plist> authenticate: // this modifies the pop up window that also appears for authentication within the logged in state. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>class</key> <string>evaluate-mechanisms</string> <key>created</key> <real>674211169.32046402</real> <key>mechanisms</key> <array> <string>NameAndPassword:invoke</string> <string>builtin:reset-password,privileged</string> <string>builtin:authenticate,privileged</string> </array> <key>modified</key> <real>702745507.12304997</real> <key>shared</key> <true/> <key>tries</key> <integer>10000</integer> <key>version</key> <integer>1</integer> </dict> </plist> system.login.console // changes the login window altogether <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>class</key> <string>evaluate-mechanisms</string> <key>comment</key> <string>Login mechanism based rule. Not for general use, yet.</string> <key>created</key> <real>674211169.32046402</real> <key>mechanisms</key> <array> <string>builtin:prelogin</string> <string>builtin:policy-banner</string> <string>NameAndPassword:invoke</string> <string>builtin:login-begin</string> <string>builtin:reset-password,privileged</string> <string>loginwindow:FDESupport,privileged</string> <string>builtin:forward-login,privileged</string> <string>builtin:auto-login,privileged</string> <string>builtin:authenticate,privileged</string> <string>PKINITMechanism:auth,privileged</string> <string>builtin:login-success</string> <string>loginwindow:success</string> <string>HomeDirMechanism:login,privileged</string> <string>HomeDirMechanism:status</string> <string>MCXMechanism:login</string> <string>CryptoTokenKit:login</string> <string>PSSOAuthPlugin:login-auth</string> <string>loginwindow:done</string> </array> <key>modified</key> <real>702745507.11596596</real> <key>shared</key> <true/> <key>tries</key> <integer>10000</integer> <key>version</key> <integer>10</integer> </dict> </plist> Then I modified the code and put in a button according to https://www.hackingwithswift.com/read/28/4/touch-to-activate-touch-id-face-id-and-localauthentication and found that "canEvaluatePolicy" was returning false when tried in the locked state. Then I tried using PAM to use the touch id in lock screen according to this article: https://apple.stackexchange.com/questions/259093/can-touch-id-on-mac-authenticate-sudo-in-terminal I applied this concept by pasting auth sufficient pam_tid.so inside of /etc/pam.d/sudo at the top, but that didn't work. I also tried modifying system.login.screensaver like this to get the regular GUI to show: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>class</key> <string>rule</string> <key>comment</key> <string>The owner or any administrator can unlock the screensaver, set rule to "authenticate-session-owner-or-admin" to enable SecurityAgent.</string> <key>created</key> <real>674211169.32046402</real> <key>modified</key> <real>674211169.32046402</real> <key>rule</key> <array> <string>NameAndPassword:invoke</string> </array> <key>version</key> <integer>1</integer> </dict> </plist> But that didn't work either. Any ideas or suggestions? Thanks,
Topic: Privacy & Security SubTopic: General Tags:
May ’23
Reply to Custom lock screen
I just created the SFAuthorizationPluginView subclass. Is it supposed to be installed in /System/Library/CoreServices/SecurityAgentPlugins/ or is it ok to be put in /Library/CoreServices/SecurityAgentPlugins/ ?
Topic: Privacy & Security SubTopic: General Tags:
May ’23
Reply to Custom lock screen
Modern systems prevent third-party code, including authorisation plug-ins, from showing UI on top of the lock screen. The only way to present UI in that context is to build an authorisation plug-in based on SFAuthorizationPluginView. This sentence seems contradictory. Are you saying that it's impossible to put a custom UI on top of the lock screen even with the authorization plugin-in based on SFAuthorizationPluginView?
Topic: Privacy & Security SubTopic: General Tags:
May ’23
Reply to Bluetooth connection with Authorization Plugin
Here is the code:     switch peripheral.state {     case .unknown:       Log.i("Bluetooth state is unknown")       reset()     case .resetting:       Log.i("Bluetooth is resetting")       reset()     case .unsupported:       Log.w("Bluetooth is not supported on this device")       reset()     case .unauthorized:       Log.w("Bluetooth permission was not granted") // I keep getting this error. Both from when accessed from lock screen state and from logged out state.       reset()     case .poweredOff:       Log.i("Bluetooth is powered off")       reset()     case .poweredOn:       Log.i("Bluetooth is ready")       addServiceIfNeeded()     @unknown default:       Log.w("Unknown peripheral state", peripheral.state)     }   }
Aug ’22
Reply to Display Authorization plugin at the apple software update and the filevault
I have tried the following things of also replacing "loginwindow:login" with my own entry for system.login.filevault, but no luck. Any other ideas?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to Custom lock screen
Here are the ideas and progress so far that I have tried with the lock screen with touch id. Using this sample code as a launching point for a POC, https://github.com/antoinebell/NameAndPassword. I modified it for looking into the touch id. GitHub - antoinebell/NameAndPassword: Updated version of the NameAndPassword 'SFAuthorizationPluginView'. Updated version of the NameAndPassword 'SFAuthorizationPluginView'. - GitHub - antoinebell/NameAndPassword: Updated version of the NameAndPassword 'SFAuthorizationPluginView'. github.com First of all, I found that this what I have to do in order to get a custom lock screen with that sample code. system.login.screensaver // this changes it to the ugly pop up window <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>class</key> <string>rule</string> <key>comment</key> <string>The owner or any administrator can unlock the screensaver, set rule to "authenticate-session-owner-or-admin" to enable SecurityAgent.</string> <key>created</key> <real>674211169.32046402</real> <key>modified</key> <real>674211169.32046402</real> <key>rule</key> <array> <string>authenticate-session-owner-or-admin</string> </array> <key>version</key> <integer>1</integer> </dict> </plist> authenticate: // this modifies the pop up window that also appears for authentication within the logged in state. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>class</key> <string>evaluate-mechanisms</string> <key>created</key> <real>674211169.32046402</real> <key>mechanisms</key> <array> <string>NameAndPassword:invoke</string> <string>builtin:reset-password,privileged</string> <string>builtin:authenticate,privileged</string> </array> <key>modified</key> <real>702745507.12304997</real> <key>shared</key> <true/> <key>tries</key> <integer>10000</integer> <key>version</key> <integer>1</integer> </dict> </plist> system.login.console // changes the login window altogether <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>class</key> <string>evaluate-mechanisms</string> <key>comment</key> <string>Login mechanism based rule. Not for general use, yet.</string> <key>created</key> <real>674211169.32046402</real> <key>mechanisms</key> <array> <string>builtin:prelogin</string> <string>builtin:policy-banner</string> <string>NameAndPassword:invoke</string> <string>builtin:login-begin</string> <string>builtin:reset-password,privileged</string> <string>loginwindow:FDESupport,privileged</string> <string>builtin:forward-login,privileged</string> <string>builtin:auto-login,privileged</string> <string>builtin:authenticate,privileged</string> <string>PKINITMechanism:auth,privileged</string> <string>builtin:login-success</string> <string>loginwindow:success</string> <string>HomeDirMechanism:login,privileged</string> <string>HomeDirMechanism:status</string> <string>MCXMechanism:login</string> <string>CryptoTokenKit:login</string> <string>PSSOAuthPlugin:login-auth</string> <string>loginwindow:done</string> </array> <key>modified</key> <real>702745507.11596596</real> <key>shared</key> <true/> <key>tries</key> <integer>10000</integer> <key>version</key> <integer>10</integer> </dict> </plist> Then I modified the code and put in a button according to https://www.hackingwithswift.com/read/28/4/touch-to-activate-touch-id-face-id-and-localauthentication and found that "canEvaluatePolicy" was returning false when tried in the locked state. Then I tried using PAM to use the touch id in lock screen according to this article: https://apple.stackexchange.com/questions/259093/can-touch-id-on-mac-authenticate-sudo-in-terminal I applied this concept by pasting auth sufficient pam_tid.so inside of /etc/pam.d/sudo at the top, but that didn't work. I also tried modifying system.login.screensaver like this to get the regular GUI to show: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>class</key> <string>rule</string> <key>comment</key> <string>The owner or any administrator can unlock the screensaver, set rule to "authenticate-session-owner-or-admin" to enable SecurityAgent.</string> <key>created</key> <real>674211169.32046402</real> <key>modified</key> <real>674211169.32046402</real> <key>rule</key> <array> <string>NameAndPassword:invoke</string> </array> <key>version</key> <integer>1</integer> </dict> </plist> But that didn't work either. Any ideas or suggestions? Thanks,
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’23
Reply to Custom lock screen
I just created the SFAuthorizationPluginView subclass. Is it supposed to be installed in /System/Library/CoreServices/SecurityAgentPlugins/ or is it ok to be put in /Library/CoreServices/SecurityAgentPlugins/ ?
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’23
Reply to Custom lock screen
Modern systems prevent third-party code, including authorisation plug-ins, from showing UI on top of the lock screen. The only way to present UI in that context is to build an authorisation plug-in based on SFAuthorizationPluginView. This sentence seems contradictory. Are you saying that it's impossible to put a custom UI on top of the lock screen even with the authorization plugin-in based on SFAuthorizationPluginView?
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’23
Reply to Bluetooth connection with Authorization Plugin
Here is the code:     switch peripheral.state {     case .unknown:       Log.i("Bluetooth state is unknown")       reset()     case .resetting:       Log.i("Bluetooth is resetting")       reset()     case .unsupported:       Log.w("Bluetooth is not supported on this device")       reset()     case .unauthorized:       Log.w("Bluetooth permission was not granted") // I keep getting this error. Both from when accessed from lock screen state and from logged out state.       reset()     case .poweredOff:       Log.i("Bluetooth is powered off")       reset()     case .poweredOn:       Log.i("Bluetooth is ready")       addServiceIfNeeded()     @unknown default:       Log.w("Unknown peripheral state", peripheral.state)     }   }
Replies
Boosts
Views
Activity
Aug ’22
Reply to Bluetooth connection with Authorization Plugin
I think the problem has something to do with IOBluetoothHIDDriver being depracated. https://developer.apple.com/support/kernel-extensions
Replies
Boosts
Views
Activity
Aug ’22