Challenge - 5 Problems
API Token Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Jenkins CLI: List API Tokens for a User
You run the following Jenkins CLI command to list API tokens for user 'alice'. What is the expected output?
Jenkins
java -jar jenkins-cli.jar -s http://jenkins.example.com/ who-am-i --username alice --password secret
Attempts:
2 left
💡 Hint
The command 'who-am-i' shows user identity, not API tokens.
✗ Incorrect
The 'who-am-i' command only confirms authentication and user identity. It does not list API tokens. If credentials are wrong, authentication fails.
🧠 Conceptual
intermediate1:30remaining
Purpose of Jenkins API Tokens
What is the main purpose of using API tokens in Jenkins instead of user passwords?
Attempts:
2 left
💡 Hint
Think about automation and security.
✗ Incorrect
API tokens let scripts and external tools authenticate securely without using the user's actual password, reducing risk if the token is compromised.
❓ Troubleshoot
advanced2:30remaining
Troubleshooting Jenkins API Token Revocation
After revoking an API token for user 'bob', his automation scripts still authenticate successfully. What is the most likely reason?
Attempts:
2 left
💡 Hint
Consider how authentication sessions work.
✗ Incorrect
Jenkins sessions may remain active after token revocation, so scripts using cached session cookies can still authenticate until the session expires or is invalidated.
🔀 Workflow
advanced3:00remaining
Securely Creating and Using Jenkins API Tokens
Which sequence correctly describes the secure workflow to create and use a Jenkins API token for automation?
Attempts:
2 left
💡 Hint
Follow the logical order of accessing UI and generating tokens.
✗ Incorrect
You must first log in, then go to your user profile to generate the token, then use it in scripts.
✅ Best Practice
expert3:00remaining
Best Practice for Managing Jenkins API Tokens in CI/CD Pipelines
What is the best practice for managing Jenkins API tokens securely in CI/CD pipeline configurations?
Attempts:
2 left
💡 Hint
Think about secure storage and access control.
✗ Incorrect
Using Jenkins Credentials plugin keeps tokens encrypted and access controlled, avoiding exposure in scripts or logs.