Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

As a Jenkins administrator, how do I get a user's API token without logging in as them?

As an administrator, how do I get an API token for a user other than myself, without logging in as them? When I visit the user configuration page, all I see is that "Token is hidden", and I cannot change it either.

like image 983
Patrick Szalapski Avatar asked May 04 '16 18:05

Patrick Szalapski


People also ask

Where are Jenkins API tokens stored?

The Jenkins master authenticates the user against a users' database, in case of a username:password combination, or by comparing tokens with the local user's API token, stored in the user's config. xml file, in case of username:APItoken authentication.

How do I authenticate Jenkins API?

The Jenkins API uses HTTP BASIC authentication and requires a username as well as an API token to connect. Then click the box named "Show API Token", and copy the token to your clipboard. Perfect!! There we go!


1 Answers

There is a Jenkins System Property, jenkins.security.ApiTokenProperty.showTokenToAdmins . You need access to the master/OC process startup to change it.

Documented at the bottom of https://wiki.jenkins-ci.org/display/JENKINS/Features+controlled+by+system+properties

(We are going to do our best to leave this at false.)

like image 196
Patrick Szalapski Avatar answered Oct 13 '22 13:10

Patrick Szalapski