jenkinsci / jenkinsci/configuration-as-code-plugin

Fail casc config execution if it's impossible to resolve secret w/o default value

Open
#1,422 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.8k
Forks
756
Avg merge
9h 47m
Merged PRs (30d)
10

Description

Currently CasC [only raises a warning](https://github.com/jenkinsci/configuration-as-code-plugin/blob/f72058445c0250041303a73b5d8566140d337c67/plugin/src/main/java/io/jenkins/plugins/casc/SecretSourceResolver.java#L66) it it's impossible to resolve secret w/o default value. This may cause unexpected Jenkins misconfiguration w/o clear root cause for the administrator.

I would say that it's preferable to have Jenkins startup failed with clear message (current is ok) at the end of the system log.

In case when we apply CasC from UI - apply should be aborted & message shown to the user.

Contributor guide

Open the contributing guide

Research direction

Start with plugin/src/main/java/io/jenkins/plugins/casc/SecretSourceResolver.java at the warning referenced in the issue, then trace how unresolved secrets are handled during Jenkins startup and CasC application from the UI. Ensure an unresolved secret without a default stops each operation and preserves the existing clear message in the system log or UI.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.