Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-38468

Unable to save config when assertions are enables (-ea)

XMLWordPrintable

      I am unable to get config roundtrip test to work from plugins test harness as it, unlike plain old java -jar or ATH, turns on JVM assertions. The plugin itself verifies the login.conf path is a file in PluginImpl#changeLoginLocation but spnego have an explicit assertion verifying that new File(new URI(...)) exists though it fails to even instantiate the File as it effectively requires 'file:' prefix (it requires scheme to be considered absolute).

      java.lang.IllegalArgumentException: URI is not absolute
        at java.io.File.<init>(File.java:416)
        at net.sourceforge.spnego.SpnegoFilterConfig.loginConfExists(SpnegoFilterConfig.java:364)
        at net.sourceforge.spnego.SpnegoFilterConfig.<init>(SpnegoFilterConfig.java:117)
        at net.sourceforge.spnego.SpnegoFilterConfig.getInstance(SpnegoFilterConfig.java:314)
        at net.sourceforge.spnego.SpnegoAuthenticator.<init>(SpnegoAuthenticator.java:206)
        at com.sonymobile.jenkins.plugins.kerberossso.ioc.SpnegoKerberosAuthenticationFactory$SpnegoKerberosAuthenticator.<init>(SpnegoKerberosAuthenticationFactory.java:87)
        at com.sonymobile.jenkins.plugins.kerberossso.ioc.SpnegoKerberosAuthenticationFactory$SpnegoKerberosAuthenticator.<init>(SpnegoKerberosAuthenticationFactory.java:70)
        at com.sonymobile.jenkins.plugins.kerberossso.ioc.SpnegoKerberosAuthenticationFactory.getInstance(SpnegoKerberosAuthenticationFactory.java:60)
        at com.sonymobile.jenkins.plugins.kerberossso.KerberosSSOFilter.init(KerberosSSOFilter.java:98)
        at hudson.util.PluginServletFilter.addFilter(PluginServletFilter.java:75)
      

      It seems to be enforced by this assertion only as the code works with assertions off. As the SPNEGO looks quite dead, I will try to address this providing the prefixed form after the plugin validates the path.

            olivergondza Oliver Gondža
            olivergondza Oliver Gondža
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: