Skip to content

CasC allows duplicate entries for single valued Describables without warning. #2589

@jtnord

Description

@jtnord

Jenkins and plugins versions report

Environment

from jenkinsci/oic-auth-plugin#436 , otherwise unknown

What Operating System are you using (both controller, and any agents involved in the problem)?

N/A

Reproduction steps

  1. Create a config as code snippet with 2 different conflicting options for a describable.

e.g.

jenkins:
  securityRealm:
    oic:
      serverConfiguration:
        # Automatic config of endpoint
        wellKnown:
          wellKnownOpenIDConfigurationUrl: "https://myid.com/.well-known/openid-configuration"
        # Manual config of endpoint
        manual:
          authorizationServerUrl: "https://myid.com/authorize"
          issuer: "https://myid.com/"
          jwksServerUrl: "https://myid.com/jwks"
          tokenServerUrl: "https://myid.com/token"
          userInfoServerUrl: "https://myid.com/userInfo"
          useRefreshTokens: false
      # Credentials
      clientId: "myclient-01"
      clientSecret: "supersecret"
      # claims
  1. start Jenkins with this casc file

serverConfiguration is a single valued Describable, yet the config contains two conflicting values for the above.

Expected Results

the startup should error or warn as the configuration is invalid

Actual Results

no warning / error

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions