The GitHub Authentication Plugin provides a means of using GitHub for authentication and authorization to secure Jenkins. GitHub Enterprise is also supported.
On this page:
Before configuring the plugin you must create a GitHub application registration.
The security realm in Jenkins controls authentication (i.e. you are who you say you are). The GitHub Authentication Plugin provides a security realm to authenticate Jenkins users via GitHub OAuth.
The authorization in Jenkins controls what your users can do (i.e. read jobs, execute builds, or have administer permissions, etc.). The GitHub OAuth Plugin supports multiple ways of configuring authorization.
Control user authorization using the Github Commiter Authorization Strategy. This is the simplest authorization strategy to get up and running. It handles authorization based on the git URL of a job and what type of access a user has to that project (i.e. Admin, read/write, read only).
There's a few ways to configure everyone on your team being an admin.
Control user authorization using Matrix-based security or Project-based Matrix Authorization Strategy. Project-base Matrix Authorization Strategy allows one to configure authorization globally per project and, when using Project-based Matrix Authorization Strategy with the Cloudbees folder plugin, per folder.
There are a few built-in authorizations to consider.
You can configure authorization based on GitHub users, organizations, or teams.
You can make Jenkins API calls by using a GitHub personal access token. One can still call the Jenkins API by using Jenkins tokens or use the Jenkins CLI with an SSH key for authentication. However, the GitHub OAuth plugin provides another way to call the Jenkins API by allowing the use of a GitHub Personal Access Token.
Here's an example using curl to start a build using parameters (username samrocketman and password using the personal access token).
Configuration management could be used to configure the security realm via the Jenkins Script Console. Here's a sample configuring plugin version 0.22.
Configuration management could be used to configure the authorization strategy via the Jenkins Script Console. Here's a sample configuring plugin version 0.22.
Skip to end of metadata Go to start of metadata