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.

authorizationStrategy: unsecured still wants me to create an admin user

See original GitHub issue

I’m running a throwaway instance of Jenkins in a Docker container on a machine that’s only accessible to people who in principle would all have admin privileges anyway.

I’ve tried copying the configuration from UnsecuredAuthorizationStrategyConfiguratorTest.yml, but when I navigate to Jenkins the first thing I get is a prompt to create an admin user. Full jenkins.yaml:

plugins:
  required:
    blueocean: 1.13.1
    configuration-as-code: 1.7

jenkins:
  systemMessage: |
    Jenkins Docker image built from https://github.com/dmolesUC3/mrt-jenkins-docker
  mode: NORMAL
  numExecutors: 2
  scmCheckoutRetryCount: 2
  securityRealm:
    local:
      allowsSignup: false
  authorizationStrategy: unsecured

I tried

  securityRealm: none

but that just got me

java.lang.IllegalArgumentException: No hudson.security.SecurityRealm implementation found for none
Possible solution: Try to install 'configuration-as-code-support' plugin
	at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.findDescribableBySymbol(HeteroDescribableConfigurator.java:148)

What am I missing?

System information

  • Jenkins 2.150.3 (jenkins/jenkins:lts Docker image)
  • configuration-as-code version 1.7
  • macOS (as Docker host)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jetersencommented, Mar 6, 2019

I suggest your read the readme located here for some of the docker tips: https://github.com/jenkinsci/docker

2reactions
jetersencommented, Mar 6, 2019

To skip setup wizard, add this to your dockerfile.

ARG jenkins_home=/usr/share/jenkins/ref
RUN echo $JENKINS_VERSION | tee \
    $jenkins_home/jenkins.install.UpgradeWizard.state \
    $jenkins_home/jenkins.install.InstallUtil.lastExecVersion

Read the initial exception you posted again, it clearly tells you the solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jenkins Overall/Read permission - Stack Overflow
So Once we come back to jenkins in unsecured mode we need to delete the users and add a new user . Is...
Read more >
How do I start jenkins as an admin without having the need of ...
Expel the components authorization strategy and security realm. Start Jenkins. At the point when Jenkins returns, it will be in an unsecured ......
Read more >
Disable security in Jenkins to recover admin user
Remove the elements authorizationStrategy and securityRealm; Start Jenkins. When Jenkins comes back, it's in the unsecured mode where everyone ...
Read more >
How to still make an admin account if it says access denied in
Hello everyone I'm just wondering how to fix the access denied problem when your trying to create an admin account in computer management ......
Read more >
Disable Access Control - Jenkins
Administrators may accidentally set up a security realm or authorization strategy in such a way that they are no longer able to administer...
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