Skip to content
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

[JENKINS-33599] write file with admin password for installer #2138

Closed
wants to merge 3 commits into from
Closed

[JENKINS-33599] write file with admin password for installer #2138

wants to merge 3 commits into from

Conversation

kzantow
Copy link
Contributor

@kzantow kzantow commented Mar 17, 2016

To make finding the initial admin password easier, write it to a file and display the location of the file so the user knows exactly where to look. Also removed tracking in the user object, as this was just so the token was available across restarts (previously using a custom UserProperty).

This addresses: https://issues.jenkins-ci.org/browse/JENKINS-33599

@kzantow
Copy link
Contributor Author

kzantow commented Mar 17, 2016

@reviewbybees

@ghost
Copy link

ghost commented Mar 17, 2016

This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.

securityRealm.createAccount(SetupWizard.initialSetupAdminUserName, randomUUID);

// JENKINS-33599 - write to a file in the jenkins home directory
FileUtils.write(getInitialAdminPasswordFile(), randomUUID);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There may be IOException here.
Do you want to interrupt the installation in such case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oleg-nenashev yes, startup of the installer should fail if it can't read/write the file, that's the only way a user could really continue

@jglick
Copy link
Member

jglick commented Mar 17, 2016

You seem to be making deeper changes to how the initial admin user works than simply printing the password to a file in addition to printing it to the log. Those changes might be fine—they seem to make the code simpler—but it would be appropriate to explain them in the PR description.

@kohsuke
Copy link
Member

kohsuke commented Mar 19, 2016

I've taken this over and this is now in #2142

@kohsuke kohsuke closed this Mar 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants