Skip to content

Conversation

@jeromepochat
Copy link
Contributor

Description

#822 introduced new options to dynamically restricts access to the repositories. This comes with backward compatibility limitations.

This aims to improve backwards compatibility by using AccessSpecifiedRepositories as default access strategy instead of AccessInferredOwner.

The existing credentials is migrated to AccessSpecifiedRepositories:

  • the owner is set with the original credentials owner
  • the list of repository is set with empty list

In case of empty owner and when the credentials are used in a context where inference is supported, the inferred owner is used to compute permissions.

See JENKINS-76056 for further information.

Submitter checklist

  • Link to JIRA ticket in description, if appropriate.
  • Change is code complete and matches issue description
  • Automated tests have been added to exercise the changes
  • Reviewer's manual test instructions provided in PR description. See Reviewer's first task below.

Reviewer checklist

  • Run the changes and verify that the change matches the issue description
  • Reviewed the code
  • Verified that the appropriate tests have been written or valid explanation given

Documentation changes

  • Link to jenkins.io PR, or an explanation for why no doc changes are needed

Users/aliases to notify

@jeromepochat jeromepochat marked this pull request as ready for review September 9, 2025 08:24
@jeromepochat jeromepochat requested a review from a team as a code owner September 9, 2025 08:24
Copy link
Member

@dwnusbaum dwnusbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@dwnusbaum dwnusbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. One other thing I noticed is that I think the UI picks AccessInferredRepository as the default option when you create a new credential. Maybe we can/should set Extension.ordinal so that AccessSpecifiedRepositories is the default, or perhaps we need to create a Descriptor.doFill* method? Not sure without trying it out. Also I think AccessSpecifiedRepositories/help-owner.html could be updated to mention the new logic. I think help.html is ok though.

I labeled this as bug since we're trying to reduce the breakage from the earlier change, but I'm not really sure what the best label would be. I would maybe update the release notes to link to the earlier release to make it easier to see what is changing.

@dwnusbaum dwnusbaum added the bug label Sep 10, 2025
@jeromepochat jeromepochat merged commit 1afc22a into jenkinsci:master Sep 11, 2025
17 checks passed
@jeromepochat jeromepochat deleted the BEE-62243-update-migration-path branch September 11, 2025 14:28
@KyriosGN0
Copy link

Hey, was this PR released? if not when it is planned to be released ?

@jeromepochat
Copy link
Contributor Author

jeromepochat commented Nov 18, 2025

Hey, was this PR released?

Hi!
This was released in 1862.v1a_fc22a_d3788.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants