Answer a question

I did setup jenkins with LDAP and i'm able to login. But when i stop the LDAP server I'm unable to login to jenkins using jenkin's local user account. Also always editing the config.xml is not a good idea to change security settings. Please help me.

Answers

What Ive done in a previous role - is a copy of Jenkins config that allows admin & a selection of other users access when LDAP is down.

When LDAP is down , I switch manually

mv config.xml config.ldap.xml
mv config.internal.xml config.xml 

Restart Jenkins ( https://stackoverflow.com/a/8077830/1935094 )

The config.internal.xml was setup before I configured LDAP. You could also backup your config.xml , configure Jenkins for internal user access , copy that off and copy back in your LDAP configured config.xml.

Anyway - the idea is that you can still get in , run jobs etc until LDAP is back.

Ive had thoughts about automating it , if LDAP is detected as down ( you could run a lookup periodically , then switch if need be...

Logo

CI/CD社区为您提供最前沿的新闻资讯和知识内容

更多推荐