Jenkins administrator password and jenkins administrator password

Source: Internet
Author: User
Tags asymmetric encryption

Jenkins administrator password and jenkins administrator password

Preface:Jenkins changed the administrator password. After reading all the tutorials on the Internet, all of them were replaced with a string of encrypted 111111 ciphertext. the password in the xml file, and the password is 111111! I think this is really perfunctory! So I studied the Jenkins password encryption method and how to modify the administrator password. Of course, by configuring Jenkins to allow users to register and register a user, it is also a good choice.

 

1. Jenkies Encryption Method

The Jenkins password uses the Java encryption and decryption tool jBCrypt. I was the first to come into contact with this encryption method. He was amazed at it! Every time the same plaintext is encrypted, this encryption method returns different results. How does one decrypt the same plaintext? It turns out that he uses the user's plaintext and the stored ciphertext to re-generate a string of ciphertext to judge. It has the following features:

About bcrypt:

 

1. bcrypt is an irreversible encryption algorithm and cannot obtain plaintext through ciphertext decryption.

 

2. Different from other symmetric or asymmetric encryption methods, bcrypt does not directly decrypt the plaintext, nor compares the ciphertext with the secondary encryption. Instead, it computes the plaintext and the stored ciphertext to another ciphertext, if the two ciphertext values are the same, the verification is successful.

 

3. Encryption results for the same plaintext are generally different. Add the Java source code
Import org. mindrot. jbcrypt. BCrypt;/*** Created by Administrator on login /6/2. * <p> * Description: */public class Test {public static void main (String [] args) {// This is the encryption method String hashed = BCrypt. hashpw ("nimda", BCrypt. gensalt (); System. out. println (hashed); // This is the decryption method if (BCrypt. checkpw ("nimda", hashed) System. out. println ("It matches"); else System. out. println ("It does not match ");}}

 

 

 

2Modify the admin password of Jenkins

 

3. Restart Jenkins to see the Modification result.

Http: // localhost: 8080/restart

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.