GithubHelp home page GithubHelp logo

vandit1604 / casdoor-auth-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jenkinsci/casdoor-auth-plugin

0.0 0.0 0.0 23 KB

Jenkins authentication / SSO plugin based on Casdoor

Home Page: https://github.com/casdoor/casdoor

License: Apache License 2.0

Java 100.00%

casdoor-auth-plugin's Introduction

jenkins-casdoor-auth

About

This plugin incorporates SSO in Jenkins with Casdoor

Installation

TODO

Usage

You can refer to Casdoor Official Doc.

The following are some of the names in the configuration:

CASDOOR_HOSTNAME: Domain name or IP where Casdoor server is deployed.

JENKINS_HOSTNAME: Domain name or IP where Jenkins is deployed.

Step1. Deploy Casdoor and Jenkins

Firstly, the Casdoor and Jenkins should be deployed.

After a successful deployment, you need to ensure:

  1. Set Jenkins URL(Manage Jenkins -> Configure System -> Jenkins Location) to JENKINS_HOSTNAME. Jenkins URL
  2. Casdoor can be logged in and used normally.
  3. Set Casdoor's origin value (conf/app.conf) to CASDOOR_HOSTNAME. Casdoor conf

Step2. Configure Casdoor application

  1. Create or use an existing Casdoor application.
  2. Add a redirect url: http://JENKINS_HOSTNAME/securityRealm/finishLogin Casdoor Application Setting
  3. Add provider you want and supplement other settings.

Not surprisingly, you can get two values ​​on the application settings page: Client ID and Client secret like the picture above, we will use them in next step.

Open your favorite browser and visit: http://CASDOOR_HOSTNAME/.well-known/openid-configuration, you will see the OIDC configure of Casdoor.

Step3. Configure Jenkins

Now, you can install Casdoor plugin from the market or by uploading its jar file.

After completing the installation, go to Manage Jenkins -> Configure Global Security.

Suggestion: Back up the Jenkins config.xml file, and use it to recover in case of setup errors.

Jenkins' Setting

  1. In Security Realm, select "Casdoor Authentication Plugin".
  2. In Casdoor Endpoint, specify the CASDOOR_HOSTNAME noted above.
  3. In Client ID, specify the Client ID noted above.
  4. In Client secret, specify the Client secret noted above.
  5. In JWT Public Key, specify the public key used to validate JWT token. You can find the public key in Casdoor by clicking Cert at the top. After clicking edit your application, you can copy your public key in the following page. JWT Public Key
  6. Organization Name and Application Name is optional. You can specify your organization and application to verify users in other organizations and applications. If they are empty, the plugin will use the default organization and application.
  7. In the Authorization section, check “Logged-in users can do anything”. Disable “Allow anonymous read access”.
  8. Click save.

Now, Jenkins will automatically redirect you to Casdoor for authentication.

casdoor-auth-plugin's People

Contributors

abingcbc avatar hsluoyz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.