I need to achieve the following behaviour in my App
When the app is run for the first time, prompt the user to authenticate by entering their administrative password.
Upon successful authentication, securely store the administrative password using macOS Keychain Access.
For subsequent executions of the same command, retrieve the stored password from the Keychain and use it to execute the privileged command without requiring the user to enter the administrative password again.
By implementing this approach, users will only need to authenticate once, and subsequent executions of the privileged command will be seamless without further authentication prompts.