1. Stop Jenkins

sudo systemctl stop jenkins

2. Disable All Jenkins Security Temporarily

#open jenkins config file
sudo mcedit /var/lib/jenkins/config.xml

#go to line 'useSecurity' and turn it to false
<useSecurity>false</useSecurity>

3. Start back Jenkins

sudo systemctl start jenkins

4. Enable Jenkins Global Security

  • Open Jenkins admin website, go to menu >> Manage Jenkins >> Config Global Security (http://some.jenkins.domain/configureSecurity)
  • Check ‘Enable security’
  • Under ‘Access Control’ >> ‘Security Realm
    • Check ‘Jenkin’s own user database’
    • Uncheck ‘Allow users to sign up’
  • Under ‘Access Control’ >> ‘Authorization
    • Check ‘Logged-in users can do anything’
    • Uncheck ‘Allow anonymous read access’
  • Note: Without Security Realm set, user may face this error “j_acegi_security_check” when logging in.

5. Enable HTML description (Optional)

  • Markup Formatter, choose ‘Safe HTML

6. Check ‘Prevent Cross Site Request Forgery exploits’ (Optional)

  • When ‘checked’, with Crumb Algorithm Default Crumb Issuer ‘checked’, Terminal Plugin won’t work (even with ‘Enable proxy compatibility ‘checked’)
  • When ‘uncheck’, Terminal Plugin works, but this Terminal Plugin only executes every single bash command one by one, can’t even ‘cd’ (change directory)!
Advertisements