Skip to content

[JENKINS-42577] Jenkins.version saved only from doConfigSubmit #21919

Closed

Description

@jenkins-infra-bot

2.32.2. Set up Jenkins from the setup wizard. Install matrix-auth and configure admin to have everything but anonymous to have only discover, and Save. You will see config.xml as expected:

  "hudson.security.GlobalMatrixAuthorizationStrategy">
    hudson.model.Hudson.Administer:admin
    hudson.model.Hudson.Read:anonymous
    hudson.model.Item.Discover:anonymous
  

Yet after restart if you revisit /configureSecurity, in the UI and reality, anonymous is granted Item.READ.

Seems that the JENKINS-2324 workaround is incorrectly being applied, since Jenkins.isUpgradedFromBefore is broken, since version on config.xml is still 1.0!

Workaround is to go to /configure and Save.


Originally reported by jglick, imported from: Jenkins.version saved only from doConfigSubmit
  • assignee: liketic
  • status: Resolved
  • priority: Major
  • component(s): core
  • label(s): newbie-friendly, setup
  • resolution: Fixed
  • resolved: 2017-09-24T17:06:06+00:00
  • votes: 0
  • watchers: 2
  • imported: 2025-11-24
Raw content of original issue

2.32.2. Set up Jenkins from the setup wizard. Install matrix-auth and configure admin to have everything but anonymous to have only discover, and Save. You will see config.xml as expected:

  <authorizationStrategy class="hudson.security.GlobalMatrixAuthorizationStrategy">
    <permission>hudson.model.Hudson.Administer:admin</permission>
    <permission>hudson.model.Hudson.Read:anonymous</permission>
    <permission>hudson.model.Item.Discover:anonymous</permission>
  </authorizationStrategy>

Yet after restart if you revisit /configureSecurity, in the UI and reality, anonymous is granted Item.READ.

Seems that the JENKINS-2324 workaround is incorrectly being applied, since Jenkins.isUpgradedFromBefore is broken, since version on config.xml is still 1.0!

Workaround is to go to /configure and Save.

Activity

  1. jenkins-infra-bot commented on Mar 8, 2017

    @jenkins-infra-bot
    Author
  2. jenkins-infra-bot commented on Mar 8, 2017

    @jenkins-infra-bot
    Author
    jglick:
    • Original comment link
    • Raw content of original comment:

      Fix should be to move

      version = VERSION;
      

      into save.

    Fix should be to move

    version = VERSION;
    

    into save.

  3. jenkins-infra-bot commented on Sep 18, 2017

    @jenkins-infra-bot
    Author
    jglick:
    • Original comment link
    • Raw content of original comment:

      If and when there is a PR for this, Link it here and set to In Review.

    If and when there is a PR for this, Link it here and set to In Review.

  4. jenkins-infra-bot commented on Sep 22, 2017

    @jenkins-infra-bot
    Author
    scm_issue_link:
    • Original comment link
    • Raw content of original comment:

      Code changed in jenkins User: kel Path: core/src/main/java/jenkins/model/Jenkins.java test/src/test/java/jenkins/install/InstallUtilTest.java test/src/test/java/jenkins/model/JenkinsTest.java http://jenkins-ci.org/commit/jenkins/27569a965a80caa1352e67c255065b5a67cb1a27 Log: [Fix JENKINS-42577] Save jenkins version in Jenkins.save() (#3010)

      • [Fix JENKINS-42577] Save jenkins version in Jenkins.save()
      • [Fix JENKINS-42577] Fix unit test failures

    Code changed in jenkins
    User: kel
    Path:
    core/src/main/java/jenkins/model/Jenkins.java
    test/src/test/java/jenkins/install/InstallUtilTest.java
    test/src/test/java/jenkins/model/JenkinsTest.java
    http://jenkins-ci.org/commit/jenkins/27569a965a80caa1352e67c255065b5a67cb1a27
    Log:
    [Fix JENKINS-42577] Save jenkins version in Jenkins.save() (#3010)

  5. jenkins-infra-bot commented on Sep 22, 2017

    @jenkins-infra-bot
    Author
    oleg_nenashev:

    jglick Didn't notice your comment here. The PR is #3010 , it has been integrated towards the next weekly. If you have any concerns, please comment in the pull request

  6. jenkins-infra-bot commented on Sep 24, 2017

    @jenkins-infra-bot
    Author
    danielbeck:
    • Original comment link
    • Raw content of original comment:

      Fixed towards 2.80.

    Fixed towards 2.80.

  7. jenkins-infra-bot commented on Sep 27, 2017

    @jenkins-infra-bot
    Author
    jglick:
    • Original comment link
    • Raw content of original comment:

      I presume you never confirmed that the originally reported bug was actually fixed, since the reproduction steps involve going through the setup wizard, which was broken by this as detailed in JENKINS-47139.

    I presume you never confirmed that the originally reported bug was actually fixed, since the reproduction steps involve going through the setup wizard, which was broken by this as detailed in JENKINS-47139.

  8. jenkins-infra-bot commented on Nov 24, 2025

    @jenkins-infra-bot
    Author

    [Original depends_on from Jira: JENKINS-47139]

  9. jenkins-infra-bot commented on Nov 24, 2025

    @jenkins-infra-bot
    Author

    [Original blocks from Jira: JENKINS-2324]

  10. removed
    bugFor changelog: Minor bug. Will be listed after features
    on Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions