-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow installer to prompt for keychain password #23
Comments
I am guessing that I have a logic failure in the installer somewhere that failed (at some point—if you retesting with an existing account, likely when a change was made to ensure the user's home directory is respected) to retain the password automatically generated for the service account's keychain. It should be possible to verify that the automatically generated password was accidentally regenerated (when compared to the keychain password) by doing the following as the service user (become the service user with
If the keychain cannot be unlocked, it means that the password stored in .keychain_pass is incorrect. If you know the keychain password, use it, otherwise it might be best to blow the service account away and run install.sh again. |
I am testing all of this in a VM so the script is always running for the first time against my pre-existing user. The key here is probably that I am running against an existing user (whereas the script assumes a new user).
I think we can save a lot of time if you reproduce my environment on your side. Can you please create a dummy user using the OSX gui and then try running the script against it? You should run into the same problems. |
Also, I assume you don't mean literally When I peek in that file I get:
and if I try unlocking the keychain with I don't see a point in the script where it was supposed to set the keychain to this password in the first place... |
The reality is that I built this on the assumption that users would want to use the same account that Jenkins, if installed normally on the system, uses. I see what's going on in your case. install.sh is assuming that the account did not have a login.keychain created for it outside of install.sh's control (at some point). I'll have to think about how I get around that. The login.keychain (when created by install.sh) gets a 20 character random password. When install.sh creates the login.keychain, it stores that password in .keychain_pass and rereads that file to prevent itself from changing the password if login.keychain already exists. The password ***** is a deliberately unusable password, preventing the service account from logging into the system, while still allowing |
My goal (which may or may not intersect with the goal of this script) is to create a user that is able to run unit tests inside the iOS simulator. While I expect the default installation to be secure (as you've done), I'd like the option to loosen the security (for troubleshooting purposes), allowing inbound password-protected SSH connections and local logins by the administrator (me). This has saved me countless hours in the past (troubleshooting passively through Jenkins is very time consuming). Do you mind supporting the latter using command-line options? If so, I'll file a separate issue for it. |
The installer should allow an option ( This will also need to be documented under a wiki page/readme section titled something like Using an Existing Account I'm not going to support creating a service account with a usable password, as that would be covered by using an existing account. |
I'm fine with that. So I guess we leave this issue open until you add this feature? |
Yes. In the meantime, you should be able to set the password in .keychain_pass to whatever you need it to be and then (re)start the service. On 8 Nov 2013, at 16:38, cowwoc [email protected] wrote:
Randall Wood |
The above pull request adds the This gets me past the keychain password, but now it's failing on:
I am getting the following prompt: |
the command fails with
security: SecKeychainUnlock login.keychain: The user name or passphrase you entered is not correct.
and pops up a dialog asking me to enter the password.It's not clear why the script expects the password to be equal to
${SLAVE_TOKEN}
which actually corresponds to the Slave's API token on the Jenkins master node (no relation to what is going on on the slave). Any ideas?2.. Later on, the code executes:
sudo -i -u ${SERVICE_USER} ${SERVICE_HOME}/security.sh set-password --password=${KEYSTORE_PASS} --account=${SERVICE_USER} --service=java_truststore
The same thing occurs: wrong password, followed by a pop up asking me to enter the password, but all of a sudden I am asked to change the password for keychain "Local Items". Why am I being asked to do this?
The text was updated successfully, but these errors were encountered: