-
Notifications
You must be signed in to change notification settings - Fork 385
[BEE-62243] Use AccessSpecifiedRepositories as default access strategy for GitHub App credentials
#890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BEE-62243] Use AccessSpecifiedRepositories as default access strategy for GitHub App credentials
#890
Conversation
src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubAppCredentials.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubAppCredentials.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubAppCredentials.java
Show resolved
Hide resolved
.../java/org/jenkinsci/plugins/github_branch_source/app_credentials/RunWithCredentialsTest.java
Show resolved
Hide resolved
dwnusbaum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good, but I added a few comments, and can you also update https://github.com/jenkinsci/github-branch-source-plugin/blob/master/docs/github-app.adoc#backwards-compatibility to account for the changes in this PR?
src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubAppCredentials.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubAppCredentials.java
Show resolved
Hide resolved
…bAppCredentials.java Co-authored-by: Devin Nusbaum <[email protected]>
There was a problem hiding this 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.
|
Hey, was this PR released? if not when it is planned to be released ? |
Hi! |
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
AccessSpecifiedRepositoriesas default access strategy instead ofAccessInferredOwner.The existing credentials is migrated to
AccessSpecifiedRepositories:In case of empty
ownerand 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
Reviewer checklist
Documentation changes
Users/aliases to notify