-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
Move proxy configuration form out of pluginManager screens as it is not related #8693
Move proxy configuration form out of pluginManager screens as it is not related #8693
Conversation
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.
While it's a good idea to move the proxy configuration out of the plugin manager, what motivates it getting its own top-level ManagementLink
? I would not expect that to be relevant regularly enough to justify the space it'll take up. Why not make it just another option in Configure System?
@POST | ||
public HttpResponse doProxyConfigure(StaplerRequest req) throws IOException, ServletException { | ||
Jenkins jenkins = Jenkins.get(); | ||
jenkins.checkPermission(Jenkins.ADMINISTER); |
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.
I think this should be Jenkins.MANAGE
as changing a proxy should not allow escallation of permissions to Administer
?
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 is a move of the current code. I didn't touch that. (
jenkins.checkPermission(Jenkins.ADMINISTER); |
Should it be change?
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.
Should it be change?
let's not do it here - can be done in a follow up as it may require some thought as to if it can be abused (I do not see a vector to escalate here - but at least it would require a security review)
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" | ||
xmlns:t="/lib/hudson" xmlns:f="/lib/form"> | ||
<l:layout title="${%Proxy Configuration}" permission="${app.SYSTEM_READ}"> | ||
|
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.
does this not need to set readOnly
mode so the fields show as disabled when the user misses the permission to change them?
<j:set var="readOnlyMode" value="${!app.hasPermission(app.MANAGE)}"/> |
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 mean modifying all config.groovy for ProxyConfiguration. This PR is only about moving the form not really changing how it works
Is there not something in the setup wizard that lets you setup a proxy if it detects you have no connection, does that not need some changes to call the changed API? jenkins/core/src/main/resources/jenkins/install/SetupWizard/proxy-configuration.jelly Lines 14 to 23 in 92aa498
|
Because I find the new icon really cute! Sounds a good idea to add another option in Configure System. I will change to this. |
@daniel-beck |
return true; | ||
} | ||
|
||
public static void saveProxyConfiguration(ProxyConfiguration pc) throws IOException { |
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.
I wonder if this method should be move this to the class ProxyConfiguration.
I'm tempted but so no strong opinion really
The same API will be still here. |
Changes Updated Proceed |
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.
Do we know if this affects CasC? I know there is special handling for proxy here in CasC
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.
How about naming this ProxyGlobalConfiguration?
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.
There is a class called ProxyConfiguration
which already some contains some logic about this.
So the idea was to have a name similar.
Anywat naming it's like color or codestyle or wine. Everybody may have his own taste preferences.
why not another name but someone may not like it or prefer something different,
This will eventually turn into an endless loop and definitely a waste of time.
Just to let you know, I will try to do a security review of this PR soonish |
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.
Thanks for this PR.
Two questions (non-blocking):
- The form is quite large, which was okay on it's own page but now on an instance with no plugins it takes up nearly a third of the system configuration page, is it worth hiding it behind a button like the administrative monitors?
- (inline)
doesn't bother me too much compared to what you get when you have plenty of plugins installed :) I'm not quite sure to follow " like the administrative monitors" where is the code for this? |
…ot related Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
0e6c77b
to
310bd6a
Compare
On the system configuration page: |
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.
Apologies for the delay. I've reviewed it and from a security standpoint, it looks fine.
the proxy is unusual as it does not configure Jenkins like the rest of the things in the You will likely need to configure the proxy to be able to other parts of the Jenkins config (like test connections etc). Whilst you can "apply" or do a 2 step "save" this could also be needed for some security realms hence I still believe this is better as a separate item. And then we have the discoverability. if it has its own icon it is obvious - it was burried in the plugin section for a while, if we move it and hide it behind a button for users with a few of plugins installed will they easily be able to discover the new location? I'm not going to die on this hill - but it seems like putting it into the the System page creates its own issues. |
I would expect most users would ctrl+F proxy, whether or not it's behind a button I don't think matters much. I don't think proxy configuration is important enough or distinct enough to get it's own page. |
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[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.
Thanks, re-tested looks good!
I don't think this is any different from any other option in Configure System? The same argument can be made for every option there.
Yes, if we do it like we did for the cloud config (leaving behind a placeholder, #4339 third screenshot).
This argument makes more sense to me. OTOH at least the form allows for it, while otherwise system config needs to be abandoned to set up the proxy first. Note that
is less relevant, security realms are on Configure Global Security, so separate from either. Unless you're saying admins changing security options cannot be expected to visit Configure System beforehand if their environment demands it? |
/label ready-for-merge This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback. Thanks! |
Signed-off-by: Olivier Lamy [email protected]
See JENKINS-72326.
Testing done
Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Desired reviewers
@mention
Before the changes are marked as
ready-for-merge
:Maintainer checklist