gpt4 book ai didi

Jenkins 用户权限在重启时被删除?

转载 作者:行者123 更新时间:2023-12-02 12:53:40 27 4
gpt4 key购买 nike

我希望有人能指出我在这里犯的一些小学生错误,因为我快要失去理智了。

  • 在 Red Hat 上全新安装 jenkins jenkins-1.590-1.1.noarch.rpm here
  • 我可以很好地设置构建作业,并且它们按预期运行并与 svn 交互
  • 我按照描述设置了用户访问权限 here on the jenkins wiki
  • 我可以随意登录和退出,所有作业仍然运行良好
  • 但是服务器重新启动后,我仍然可以登录,但我的所有访问权限都消失了(所有用户都会发生这种情况)

知道为什么权限会消失吗?

为了解决这个问题,我必须清除所有用户并重新设置它们,但这些在重新启动时会再次被删除。

提前致谢

编辑

我正在使用 Jenkins 自己的用户数据库,并尝试了基于矩阵的权限和基于项目的矩阵授权。

重新启动后,当我尝试访问 jenkins 配置页面时,出现错误“t143ahe 缺少总体/管理权限”

重启后我的config.xml是(看起来我确实按照这个进行管理):

<?xml version='1.0' encoding='UTF-8'?>
<hudson>
<disabledAdministrativeMonitors/>
<version>1.0</version>
<numExecutors>2</numExecutors>
<mode>NORMAL</mode>
<useSecurity>true</useSecurity>
<authorizationStrategy class="hudson.security.ProjectMatrixAuthorizationStrategy">
<permission>com.cloudbees.plugins.credentials.CredentialsProvider.Create:T143AHE</permission>
<permission>com.cloudbees.plugins.credentials.CredentialsProvider.Delete:T143AHE</permission>
<permission>com.cloudbees.plugins.credentials.CredentialsProvider.ManageDomains:T143AHE</permission>
<permission>com.cloudbees.plugins.credentials.CredentialsProvider.Update:T143AHE</permission>
<permission>com.cloudbees.plugins.credentials.CredentialsProvider.View:T143AHE</permission>
<permission>hudson.model.Computer.Build:T143AHE</permission>
<permission>hudson.model.Computer.Configure:T143AHE</permission>
<permission>hudson.model.Computer.Connect:T143AHE</permission>
<permission>hudson.model.Computer.Create:T143AHE</permission>
<permission>hudson.model.Computer.Delete:T143AHE</permission>
<permission>hudson.model.Computer.Disconnect:T143AHE</permission>
<permission>hudson.model.Hudson.Administer:T143AHE</permission>
<permission>hudson.model.Hudson.ConfigureUpdateCenter:T143AHE</permission>
<permission>hudson.model.Hudson.Read:T143AHE</permission>
<permission>hudson.model.Hudson.Read:anonymous</permission>
<permission>hudson.model.Hudson.RunScripts:T143AHE</permission>
<permission>hudson.model.Hudson.UploadPlugins:T143AHE</permission>
<permission>hudson.model.Item.Build:T143AHE</permission>
<permission>hudson.model.Item.Cancel:T143AHE</permission>
<permission>hudson.model.Item.Configure:T143AHE</permission>
<permission>hudson.model.Item.Create:T143AHE</permission>
<permission>hudson.model.Item.Delete:T143AHE</permission>
<permission>hudson.model.Item.Discover:T143AHE</permission>
<permission>hudson.model.Item.Read:T143AHE</permission>
<permission>hudson.model.Item.Workspace:T143AHE</permission>
<permission>hudson.model.Run.Delete:T143AHE</permission>
<permission>hudson.model.Run.Update:T143AHE</permission>
<permission>hudson.model.View.Configure:T143AHE</permission>
<permission>hudson.model.View.Create:T143AHE</permission>
<permission>hudson.model.View.Delete:T143AHE</permission>
<permission>hudson.model.View.Read:T143AHE</permission>
<permission>hudson.scm.SCM.Tag:T143AHE</permission>
</authorizationStrategy>
<securityRealm class="hudson.security.HudsonPrivateSecurityRealm">
<disableSignup>false</disableSignup>
<enableCaptcha>false</enableCaptcha>
</securityRealm>
<disableRememberMe>false</disableRememberMe>
<projectNamingStrategy class="jenkins.model.ProjectNamingStrategy$DefaultProjectNamingStrategy"/>
<workspaceDir>${ITEM_ROOTDIR}/workspace</workspaceDir>
<buildsDir>${ITEM_ROOTDIR}/builds</buildsDir>
<markupFormatter class="hudson.markup.EscapedMarkupFormatter"/>
<jdks/>
<viewsTabBar class="hudson.views.DefaultViewsTabBar"/>
<myViewsTabBar class="hudson.views.DefaultMyViewsTabBar"/>
<clouds/>
<slaves/>
<scmCheckoutRetryCount>0</scmCheckoutRetryCount>
<views>
<hudson.model.AllView>
<owner class="hudson" reference="../../.."/>
<name>All</name>
<filterExecutors>false</filterExecutors>
<filterQueue>false</filterQueue>
<properties class="hudson.model.View$PropertyList"/>
</hudson.model.AllView>
</views>
<primaryView>All</primaryView>
<slaveAgentPort>0</slaveAgentPort>
<label></label>
<nodeProperties/>
<globalNodeProperties/>
</hudson>

我的用户特定 config.xml 是:

<user>
<fullName>scribe1010</fullName>
<properties>
<hudson.model.PaneStatusProperties>
<collapsed/>
</hudson.model.PaneStatusProperties>
<jenkins.security.ApiTokenProperty>
<apiToken>lnqauTbOZ0xuAK9qBuh6/UG3RRmzN4mxkiSADlYmQD7jkqN1XswzKmqEOLpvBVsG</apiToken>
</jenkins.security.ApiTokenProperty>
<com.cloudbees.plugins.credentials.UserCredentialsProvider_-UserCredentialsProperty plugin="credentials@1.18">
<domainCredentialsMap class="hudson.util.CopyOnWriteMap$Hash"/>
</com.cloudbees.plugins.credentials.UserCredentialsProvider_-UserCredentialsProperty>
<hudson.model.MyViewsProperty>
<views>
<hudson.model.AllView>
<owner class="hudson.model.MyViewsProperty" reference="../../.."/>
<name>All</name>
<filterExecutors>false</filterExecutors>
<filterQueue>false</filterQueue>
<properties class="hudson.model.View$PropertyList"/>
</hudson.model.AllView>
</views>
</hudson.model.MyViewsProperty>
<hudson.search.UserSearchProperty>
<insensitiveSearch>false</insensitiveSearch>
</hudson.search.UserSearchProperty>
<hudson.security.HudsonPrivateSecurityRealm_-Details>
<passwordHash>#jbcrypt:$2a$10$29UCLwZafb8TTSsGvsWYBunY034m1q.Wjgl5JfbCJR83Dcvvs1Dh2</passwordHash>
</hudson.security.HudsonPrivateSecurityRealm_-Details>
<hudson.tasks.Mailer_-UserProperty plugin="mailer@1.12">
<emailAddress>a.b@c.com</emailAddress>
</hudson.tasks.Mailer_-UserProperty>
<jenkins.security.LastGrantedAuthoritiesProperty>
<roles>
<string>authenticated</string>
</roles>
<timestamp>1416992003750</timestamp>
</jenkins.security.LastGrantedAuthoritiesProperty>
</properties>
</user>

注意:这里的角色被列为“已验证”,而不是“管理员”等......(不知道这是否是一个问题)。

编辑2我已升级到最新的rpm,但没有修复。

最佳答案

正如丹尼尔在评论中所建议的,将用户名限制为小写(以及可能的额外配置保存)已经达到了目的,并且权限现在在重新启动后仍然存在。

关于Jenkins 用户权限在重启时被删除?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27131560/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com