question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

oic-auth plugin fails to export or import

See original GitHub issue

Your checklist for this issue

🚨 Please review the guidelines for contributing to this repository. 💡 To better understand plugin compatibility issues, you can read more here

Plugin versions

oic-auth 1.6 configuration-as-code 1.27

Platform

Docker jenkins/jenkins:lts

Description

configuration-as-code/viewExport fails to display the oic-auth-plugin settings after manual configuration and it also fails to configure the plugin from yaml. jira issue JENKINS-59035

jenkins:
  agentProtocols:
  - "JNLP4-connect"
  - "Ping"
  disableRememberMe: false
  markupFormatter: "plainText"
  mode: NORMAL
  myViewsTabBar: "standard"
  numExecutors: 2
  primaryView:
    all:
      name: "all"
  projectNamingStrategy: "standard"
  quietPeriod: 5
  remotingSecurity:
    enabled: false
  scmCheckoutRetryCount: 0
  securityRealm: |-
    FAILED TO EXPORT
    hudson.model.Hudson#securityRealm: io.jenkins.plugins.casc.ConfiguratorException: Can't read attribute 'automanualconfigure' from org.jenkinsci.plugins.oic.OicSecurityRealm@55ca3037
      at io.jenkins.plugins.casc.Attribute._getValue(Attribute.java:392)
      at io.jenkins.plugins.casc.Attribute.getValue(Attribute.java:214)
      at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.describe(DataBoundConfigurator.java:283)
      at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$convertToNode$de0cd4f8$1(HeteroDescribableConfigurator.java:283)
      at io.vavr.CheckedFunction0.lambda$unchecked$52349c75$1(CheckedFunction0.java:201)
      at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.convertToNode(HeteroDescribableConfigurator.java:283)
      at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$describe$5(HeteroDescribableConfigurator.java:107)
      at io.vavr.control.Option.map(Option.java:373)
      at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:107)
      at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:55)
      at io.jenkins.plugins.casc.Attribute._describe(Attribute.java:260)
      at io.jenkins.plugins.casc.Attribute.describe(Attribute.java:239)
      at io.jenkins.plugins.casc.Configurator.describe(Configurator.java:161)
  slaveAgentPort: 50000

Using the below YAML with correct values to configure the plugin also fails

Example with dummy data:

securityRealm:
  oic:
    clientId: "asdasdsad"
    clientSecret: "asdasdasd"
    tokenServerUrl: "https://asdsad/"
    authorizationServerUrl: "https:/asdasdsad"
    scopes: "openid email"
    userNameField: "UserName"

Error

Aug 20 17:16:49 testbox01 java[28175]: Caused by: io.jenkins.plugins.casc.ConfiguratorException: jenkins: error configuring 'jenkins' with class io.jenkins.plugins.casc.core.JenkinsConfigurator configurator
Aug 20 17:16:49 testbox01 java[28175]: at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:670)
Aug 20 17:16:49 testbox01 java[28175]: at io.jenkins.plugins.casc.ConfigurationAsCode.checkWith(ConfigurationAsCode.java:702)
Aug 20 17:16:49 testbox01 java[28175]: at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:686)
Aug 20 17:16:49 testbox01 java[28175]: at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:585)
Aug 20 17:16:49 testbox01 java[28175]: at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:280)
Aug 20 17:16:49 testbox01 java[28175]: at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:272)
Aug 20 17:16:49 testbox01 java[28175]: ... 13 more
Aug 20 17:16:49 testbox01 java[28175]: Caused by: io.jenkins.plugins.casc.ConfiguratorException: oic: Failed to construct instance of class org.jenkinsci.plugins.oic.OicSecurityRealm.
Aug 20 17:16:49 testbox01 java[28175]: Constructor: public org.jenkinsci.plugins.oic.OicSecurityRealm(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,boolean,java.lang.Boolean,java.lang.String,java.lang.String,boolean,java.lang.String,java.lang.String,java.lang.String,java.lang.String) throws java.io.IOException.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
jetersencommented, Aug 21, 2019

well this could be fixed in the plugin if they switched so only mandatory fields wherein the @DataBoundConstructor and the rest were @DataBoundSetter

1reaction
CJHarmathcommented, Aug 21, 2019

opened an issue for the oic-auth plugin https://github.com/jenkinsci/oic-auth-plugin/issues/75

Read more comments on GitHub >

github_iconTop Results From Across the Web

Moodle in English: OAuth services
I am using Moodle 3.3 via Moodle Clouds' Moodle for schools service and have recently started to receive the message below several times...
Read more >
Blogger to WordPress Import Error: Google no longer supports ...
Google no longer supports OAuth 1.0. Since, this plugin has not been updated to work with new Google API, the import process cannot...
Read more >
Issues with import export data, 0x80040203 error
Solved: Hey all, So I've been stuck for a few days attempting to import data from one environment to another. I've tried using...
Read more >
Export-Import of config archive does not include OAuth clients
When doing an export of an archive configuration and then importing it into a new PingFederate instance, the OAuth clients do not import....
Read more >
Troubleshoot OAuth Connections - Tableau Help
In some cases, users may receive an error when attempting to connect with OAuth. The first sentence of the error message is: The...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found