oic-auth plugin fails to export or import
See original GitHub issueYour checklist for this issue
🚨 Please review the guidelines for contributing to this repository. 💡 To better understand plugin compatibility issues, you can read more here
-
Create an issue on issues.jenkins-ci.org, set the component to the plugin you are reporting it against
-
Before creating an issue on Jenkins JIRA, check for an existing one via dashboard
-
Link to Jenkins JIRA 59035 issue
-
Ensure Jenkins JIRA issue has the label
jcasc-compatibility
-
Link to plugin’s GitHub repository
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:
- Created 4 years ago
- Comments:15 (10 by maintainers)
Top GitHub Comments
well this could be fixed in the plugin if they switched so only mandatory fields wherein the
@DataBoundConstructor
and the rest were@DataBoundSetter
opened an issue for the oic-auth plugin https://github.com/jenkinsci/oic-auth-plugin/issues/75