Folder credentials and its chicken-and-egg problem
See original GitHub issueHi CasC team, thanks for making this wonderful plugin! I am evaluating it to use it for my team.
I meet one blocking point: We want to use folder to group credentials (so we can separate CI and CD for security purpose), but:
- I don’t know how to configure credentials for folder
- I suspect that there is an chicken-and-egg problem that is not resolvable
Detail for point 1:
- I have tried to export CasC, but it contains no folder credentials.
- I have tried to look up the JSON schema, found no relating property
Detail for point 2:
- I use
job-dsl
to configure all jobs and folders. AFAIK, DSL’s depends on credentials (for git checkout) and folder credentials depends on DSL (to spin up the folder).
So this looks like a chicken-and-egg problem.
So my questions are:
- Has anyone in this community done this kind of setup before? If yes, would you please share a bit of examples?
- Is this doable in current version?
Context:
- Jenkins version: 2.164.1
- Plugin version: 1.7
- OS: Linux (official Jenkins image)
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
How to avoid a chicken and egg scenario with encrypting ...
The problem is dealing with password rests, since the users private key is encrypted with the users password if the user forgets their...
Read more >Terraform: chicken/egg problem - Maciej Matecki - Medium
The problem here is that for terraform block you cannot use resources or even variables. ... (don't forget to export AWS credentials).
Read more >Hyper-V: Revisiting the Chicken and the Egg Paradox
This, of course, raises two questions. First, why do we no longer have to worry about the chicken and the egg paradox? Second,...
Read more >On Demand Startups: 5 Ways to Solve the Chicken and Egg ...
Strategies To Solve The Chicken and Egg Problem for On Demand Startups · 1. Start Small · 2. Bring High Value Users on...
Read more >C header file The chicken or The egg problem - Stack Overflow
The way to resolve the conflict is by adding a forward declaration of an incomplete structure type. The struct type used in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@twz123: Here is my example of a Job DSL that creates such a folder. CasC only creates a seed job in my case which checksout the Job DSL here.
A bit strange why you need the “domainCredentials” encapsulated twice but this is the only way it is working for me. I figured it out this way by installing the plugins on my jenkins instance and then opening the documentation of the dynamic DSL. See https://github.com/jenkinsci/job-dsl-plugin/wiki/Dynamic-DSL how you can view it in your jenkins.
Sorry if my comment wasn’t clear @linkeal , we’re trying to create a folder credential using job-dsl (by querying credentials provided by CasC - as suggested by @zhming0), not attach a credential to a job.
Our credentials are currently created by CasC and exist globally (not at folder level). The reason we are using both CasC and JobDSL is CasC mounts our kubernetes secret. This means in our code we can create a credential referring to a secret using
${OUR_SECRET}
notation. But CasC offers no way to create folder credentials (@casz says this is a bad idea), so we must use job-dsl for this.