|
|
1 rok temu | |
|---|---|---|
| .github | 1 rok temu | |
| .mvn | 1 rok temu | |
| .vscode | 1 rok temu | |
| src | 1 rok temu | |
| .gitignore | 1 rok temu | |
| DEVELOPMENT.md | 1 rok temu | |
| Jenkinsfile | 1 rok temu | |
| LICENSE.md | 1 rok temu | |
| README.md | 1 rok temu | |
| SECURITY.md | 1 rok temu | |
| pom.xml | 1 rok temu |
A Jenkins plugin that enforces multi‑factor authentication (MFA) using TOTP Authenticator. This plugin adds an additional layer of security by requiring users to provide a time‑based one‑time password (TOTP) after entering their username and password.
✅ Enforces MFA for Jenkins users
✅ Integrates with Google Authenticator
✅ Configurable enforcement policies
✅ Easy to set up and manage through Jenkins UI
Build the plugin:
mvn clean package
After a successful build, you will find the .hpi file in the target/ directory.
Upload to Jenkins:
mfa-google-auth.hpi.Restart Jenkins if required.
| Setting | Description | Recommended Value |
|---|---|---|
| Exclude API tokens | Allows API access without MFA | Enable for CI/CD pipelines |
| MFA session duration (minutes) | Time before re-verification | 480 (8 hours) |
| Force reconfiguration | Require periodic MFA reset | 90 days |
When global MFA is enabled:
curl -X POST http://jenkins/configure \
-u admin:api_token \
-H "Content-Type: application/json" \
-d '{
"mfa": {
"enforceForAllUsers": true,
"excludeApiTokens": true,
"sessionDuration": 480
}
}'
For Admins:
For Users:
Solution:
/var/log/jenkins/mfa.logSolution:
2.479.3 or newerThis plugin is built with the Jenkins Plugin Parent POM.
To work on the plugin locally:
# Build and run tests
mvn clean verify
# Run Jenkins with the plugin
mvn hpi:run
Then open Jenkins at http://localhost:8080/jenkins/.
Security vulnerabilities should be reported following the Jenkins vulnerability reporting guidelines.
Please do not report security issues through GitHub issues or public discussions.
This project is licensed under the MIT License.