Jenkins "Security Realm" configuration keeps changing by itself

839 Views Asked by At

I'm on Jenkins 2.235.2 and without any user input every once in a while (like half an hour at most) the security settings just changes itself back to "Delegate to servlet container" instead of "Jenkins' own user database". I can change it back and the user database I have set up is untouched. Other settings are not magically changing themselves either, just this one in particular. What gives???

the setting in question

2

There are 2 best solutions below

2
Dmitriy Tarasevich On

M

While running jenkins in containers it is better to use persistant volume to save it's configuration. Also it's better to rebuild jenkins image after changing parameters in separate config files. This behavior could happen if you are using CM tools like ansible, puppet etc. or you are using jenkins configuration as code.

0
bowlesns On

I ran into this exact issue as well using the google-login plugin, and for me the configuration-as-code plugin was reverting the setting. I'm using the Jenkins helm chart and by default the chart uses that instead of the XML files. You can add the security realm setting to the JCasC securityRealm if that's how you are deploying Jenkins. Alternatively you can enable using XML and disable JCasC.