[JIRA] (JENKINS-50743) ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts
Title: Message Title Jesse Glick commented on JENKINS-50743 Re: ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts It took me a while to understand what is being discussed here. In summary: a custom Groovy script sets an unserializable value to some Jenkins global configuration; and thereafter every attempt to save that top-level settings object (e.g., a GlobalConfiguration) reports an error. Indeed restarting Jenkins would correct the situation (because it would load from the last version of the settings that were correctly serialized); you could also fix this without a restart simply by setting a valid object. I do not think there is anything else to say here—using system Groovy scripts is tantamount to writing a custom plugin, and no particular level of safety is guaranteed. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-50743) ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts
Title: Message Title Allan BURDAJEWICZ commented on JENKINS-50743 Re: ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts I have noticed that in this specific scenario, resaving the ToolProperty through the UI (by resaving the node from the UI for example) fixes the "in-memory" issue. Oleg Nenashev I understand this is not a defect, that Jenkins correctly rejects the proxy class. But maybe we could create a bug about the fact that it corrupts the groovy "in-memory" model, what's you opinion on that matter ? Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-50743) ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts
Title: Message Title Oleg Nenashev commented on JENKINS-50743 Re: ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts Allan BURDAJEWICZ yes, it can be technically prevented in this case. Not by Script Security, but by another engine Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-50743) ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts
Title: Message Title Allan BURDAJEWICZ commented on JENKINS-50743 Re: ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts Oleg Nenashev And that could be caused by any groovy class being rejected by the ClassFilter ? I mean that any user that trigger that kind of rejection via a groovy script could potentially impact the entire instance ? I wonder if that could be prevented / detected with script security (whether I would see the groovyProxy type in the signature to approve) Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-50743) ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts
Title: Message Title Oleg Nenashev commented on JENKINS-50743 Re: ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts Allan BURDAJEWICZ > Or does it also impact instantiation through traditional API (creating a node with the tool property from the UI) ? It should not. Keep in mind that Groovy script invocation impacts the in-memory model, and most likely you will not be able to reconfigure the tool properties from Web UI until the bogus property gets removed by restart or a manual edit Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-50743) ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts
Title: Message Title Allan BURDAJEWICZ commented on JENKINS-50743 Re: ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts > You will also need to restart the Jenkins instance to cleanup memory model from non-serializable objects Hi Oleg Nenashev could you elaborate on this ? In that example the instantiation of ToolLocationNodeProperty.ToolLocation is broken until we restart, but is it only impacting instantiation via Groovy script ? Or does it also impact instantiation through traditional API (creating a node with the tool property from the UI) ? Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-50743) ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts
Title: Message Title Oleg Nenashev updated an issue Jenkins / JENKINS-50743 ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts Change By: Oleg Nenashev Labels: JEP-200 JEP-200-rejected groovy Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-50743) ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts
Title: Message Title Oleg Nenashev resolved as Not A Defect Jenkins / JENKINS-50743 ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts Change By: Oleg Nenashev Status: Open Resolved Resolution: Not A Defect Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-50743) ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts
Title: Message Title Oleg Nenashev updated an issue Jenkins / JENKINS-50743 ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts Change By: Oleg Nenashev Component/s: core Component/s: _unsorted Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-50743) ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts
Title: Message Title Oleg Nenashev commented on JENKINS-50743 Re: ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts So, "toolLocation as List" creates a Groovy proxy class. If you replace it by "[toolLocation]", the script will work well. You will also need to restart the Jenkins instance to cleanup memory model from non-serializable objects. I consider it as not a defect, Jenkins behaves correctly by rejecting the proxy class Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-50743) ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts
Title: Message Title Oleg Nenashev commented on JENKINS-50743 Re: ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts My repro script: Unable to find source-code formatter for language: groovy. Available languages are: actionscript, html, java, _javascript_, none, sql, xhtml, xml import hudson.tools.*; import hudson.slaves.*; def dumb = Jenkins.instance.getComputer("dumb").node def gitToolDescriptor = Jenkins.getInstance().getDescriptor("hudson.plugins.git.GitTool") def toolLocation = new ToolLocationNodeProperty.ToolLocation(gitToolDescriptor, "foo", "bar") def toolLocationProperty = new ToolLocationNodeProperty(toolLocation as List) def evnp = new EnvironmentVariablesNodeProperty() dumb.nodeProperties.add(evnp) dumb.nodeProperties.add(toolLocationProperty) Jenkins.instance.addNode(dumb) createdNodes.add(slaveName) Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.
[JIRA] (JENKINS-50743) ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts
Title: Message Title Oleg Nenashev updated an issue Jenkins / JENKINS-50743 ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts Change By: Oleg Nenashev Summary: ToolLocationNodeProperty - JEP-200 issue when configuring tools from Groovy scripts Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-50743) ToolLocationNodeProperty
Title: Message Title Oleg Nenashev assigned an issue to Oleg Nenashev Jenkins / JENKINS-50743 ToolLocationNodeProperty Change By: Oleg Nenashev Assignee: Oleg Nenashev Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-50743) ToolLocationNodeProperty
Title: Message Title Oleg Nenashev commented on JENKINS-50743 Re: ToolLocationNodeProperty OK, will reproduce it. I do not see a reason why a groovy proxy class would be needed here Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-50743) ToolLocationNodeProperty
Title: Message Title Oleg Nenashev updated an issue Jenkins / JENKINS-50743 ToolLocationNodeProperty Change By: Oleg Nenashev Component/s: _unsorted Component/s: core Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-50743) ToolLocationNodeProperty
Title: Message Title Andres Mattos commented on JENKINS-50743 Re: ToolLocationNodeProperty Hi Oleg, thank you for your help. this is part of my groovy script: {{ def gitToolDescriptor = Jenkins.getInstance().getDescriptor("hudson.plugins.git.GitTool") def toolLocation = new ToolLocationNodeProperty.ToolLocation(gitToolDescriptor, dumb_slave.nameTool, dumb_slave.pathTool) def toolLocationProperty = new ToolLocationNodeProperty(toolLocation as List) def evnp = new EnvironmentVariablesNodeProperty(entryList) dumb.nodeProperties.add(evnp) dumb.nodeProperties.add(toolLocationProperty) Jenkins.instance.addNode(dumb) createdNodes.add(slaveName) }} Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-50743) ToolLocationNodeProperty
Title: Message Title Oleg Nenashev commented on JENKINS-50743 Re: ToolLocationNodeProperty From what I see you create a new property class in your Groovy script and then add it to Jenkins. If yes, it's not a defect IMHO. Groovy objects should not be serialized to the disk, and there is no reliable way to whitelist them. If you provide your System Groovy script, we could suggest how to solve that. Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-50743) ToolLocationNodeProperty
Title: Message Title Andres Mattos commented on JENKINS-50743 Re: ToolLocationNodeProperty Log Entry: WARNING: ToolLocationNodeProperty$ToolLocation1_groovyProxy in JRE might be dangerous, so rejecting; see https://jenkins.io/redirect/class-filter/ Apr 11, 2018 4:17:28 PM jenkins.util.groovy.GroovyHookScript execute WARNING: Failed to execute /var/lib/jenkins/init.groovy.d/dumb-slaves.groovy java.io.IOException: java.lang.RuntimeException: Failed to serialize hudson.model.Slave#nodeProperties for class hudson.slaves.DumbSlave at hudson.XmlFile.write(XmlFile.java:200) at jenkins.model.Nodes.persistNode(Nodes.java:160) at jenkins.model.Nodes.addNode(Nodes.java:142) at jenkins.model.Jenkins.addNode(Jenkins.java:2054) at jenkins.model.Jenkins$addNode$4.call(Unknown Source)
[JIRA] (JENKINS-50743) ToolLocationNodeProperty
Title: Message Title Andres Mattos updated an issue Jenkins / JENKINS-50743 ToolLocationNodeProperty Change By: Andres Mattos Labels: JEP-200 JEP - 200- rejected Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-50743) ToolLocationNodeProperty
Title: Message Title Andres Mattos updated an issue Jenkins / JENKINS-50743 ToolLocationNodeProperty Change By: Andres Mattos Labels: JEP-200-rejected Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-50743) ToolLocationNodeProperty
Title: Message Title Andres Mattos created an issue Jenkins / JENKINS-50743 ToolLocationNodeProperty Issue Type: Bug Assignee: Unassigned Attachments: Capture.PNG Components: core Created: 2018-04-11 16:03 Priority: Major Reporter: Andres Mattos I have just update Jenkins from v2.89.4 to v.2.107.1 I have a startup script to configure Jenkins's dumb Slaves. I'm geting the following error: Caused by: java.lang.UnsupportedOperationException: Refusing to marshal ToolLocationNodeProperty$ToolLocation1_groovyProxy for security reasons; see https://jenkins.io/redirect/class-filter/ Add Comment