[JIRA] (JENKINS-51316) NullPointerException when clicking 'Generate Key'

30 views
Skip to first unread message

owen@nerdnetworks.org (JIRA)

unread,
May 15, 2018, 12:48:02 AM5/15/18
to jenkinsc...@googlegroups.com
Owen Mehegan created an issue
 
Jenkins / Bug JENKINS-51316
NullPointerException when clicking 'Generate Key'
Issue Type: Bug Bug
Assignee: Francis Upton
Components: ec2-plugin
Created: 2018-05-15 04:47
Environment: ec2 plugin 1.39
Priority: Minor Minor
Reporter: Owen Mehegan

When I click 'Generate Key' in the plugin configuration UI, I get a NullPointerException:

java.lang.NullPointerException
	at sun.invoke.util.ValueConversions.unboxBoolean(ValueConversions.java:103)
	at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)
	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
Caused: javax.servlet.ServletException
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:765)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
	at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
	at com.cloudbees.jenkins.support.slowrequest.SlowRequestFilter.doFilter(SlowRequestFilter.java:37)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:99)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.Server.handle(Server.java:564)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
	at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)
	at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
	at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

wallace@markovcorp.com (JIRA)

unread,
Jun 29, 2018, 1:03:01 PM6/29/18
to jenkinsc...@googlegroups.com
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

beletsky.andrew@gmail.com (JIRA)

unread,
Dec 4, 2018, 8:34:04 AM12/4/18
to jenkinsc...@googlegroups.com
Andrey Beletsky updated an issue
 
Change By: Andrey Beletsky
Priority: Minor Major
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

beletsky.andrew@gmail.com (JIRA)

unread,
Dec 4, 2018, 8:34:09 AM12/4/18
to jenkinsc...@googlegroups.com

maximmunin@yahoo.com (JIRA)

unread,
Aug 19, 2019, 1:59:04 PM8/19/19
to jenkinsc...@googlegroups.com

Is there any workaround available?

How you guys resolved the issue?

Thanks.

manuelramonleonjimenez@gmail.com (JIRA)

unread,
Jan 16, 2020, 7:27:08 AM1/16/20
to jenkinsc...@googlegroups.com
Ramon Leon assigned an issue to Ramon Leon
 
Change By: Ramon Leon
Assignee: Francis Upton Ramon Leon
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

manuelramonleonjimenez@gmail.com (JIRA)

unread,
Jan 16, 2020, 7:27:13 AM1/16/20
to jenkinsc...@googlegroups.com
Ramon Leon started work on Bug JENKINS-51316
 
Change By: Ramon Leon
Status: Open In Progress

manuelramonleonjimenez@gmail.com (JIRA)

unread,
Jan 16, 2020, 10:23:12 AM1/16/20
to jenkinsc...@googlegroups.com
Ramon Leon commented on Bug JENKINS-51316
 
Re: NullPointerException when clicking 'Generate Key'

My proposal here is to remove this functionality because:

  1. It's not a must-have, you can get a key with a lot of tools, AWS console for example
  2. It may imply a security issue
  3. The implementation has some issues
    • If you generate a private key and then you don't save the cloud, the private key keeps stored in AWS Key pairs without being used.
    • The keys are generated with the name hudson-n, if you have several running instances you cannot control which one is used on each instance.
    • The key is shown in the UI only once, before saving the form, you cannot see it anymore. And it's not advertised.
    • It's not recommended to show the key in the UI, it's better to allow the user to download it once.

msicker@cloudbees.com (JIRA)

unread,
Jan 16, 2020, 10:26:08 AM1/16/20
to jenkinsc...@googlegroups.com

This feature sounds redundant, and if it's causing exceptions, I'd say go for removing it.

FABRIZIO MANFREDI

fjfernandez@cloudbees.com (JIRA)

unread,
Jan 16, 2020, 10:30:08 AM1/16/20
to jenkinsc...@googlegroups.com

I agree with Matt Sicker and Ramon Leon and my vote is for removing it.

what's your thoughts here Raihaan Shouhell?

manuelramonleonjimenez@gmail.com (JIRA)

unread,
Jan 16, 2020, 1:43:07 PM1/16/20
to jenkinsc...@googlegroups.com

manuelramonleonjimenez@gmail.com (JIRA)

unread,
Jan 16, 2020, 1:43:07 PM1/16/20
to jenkinsc...@googlegroups.com

raihaan.shouhell@autodesk.com (JIRA)

unread,
Jan 16, 2020, 10:21:04 PM1/16/20
to jenkinsc...@googlegroups.com

I think its reasonable. This is definitely much better. Users must already go into the AWS Console to get their security groups and misc settings set up. We should leave that bit to AWS.

foundation-security-members@cloudbees.com (JIRA)

unread,
Jan 20, 2020, 6:47:15 AM1/20/20
to jenkinsc...@googlegroups.com
CloudBees Foundation Security updated Bug JENKINS-51316
 

The PR is merged and the new release is on GitHub, just pending Francisco Fernández to have access to deploy it on Artifactory.

Change By: CloudBees Foundation Security
Status: In Review Resolved
Resolution: Fixed

foundation-security-members@cloudbees.com (JIRA)

unread,
Jan 20, 2020, 6:47:21 AM1/20/20
to jenkinsc...@googlegroups.com
Comment: The PR is merged and the new release is on GitHub, just pending [~fcojfernandez] to have access to deploy it on Artifactory.

manuelramonleonjimenez@gmail.com (JIRA)

unread,
Jan 20, 2020, 6:50:08 AM1/20/20
to jenkinsc...@googlegroups.com

manuelramonleonjimenez@gmail.com (JIRA)

unread,
Jan 20, 2020, 6:51:09 AM1/20/20
to jenkinsc...@googlegroups.com
 

The PR is merged and the new release is on GitHub, just pending Francisco Fernández to have access to deploy it on Artifactory.

Change By: Ramon Leon
Status: Fixed but Unreleased Closed
Released As: ec2-1.49

manuelramonleonjimenez@gmail.com (JIRA)

unread,
Jan 22, 2020, 2:57:02 AM1/22/20
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages