Last modified by Boris Folgmann on 2025/10/28 11:09

From version 3.1
edited by Martin Gurnik
on 2025/10/28 09:37
Change comment: Uploaded new attachment "image2021-4-12_13-41-17.png", version {1}
To version 3.2
edited by Martin Gurnik
on 2025/10/28 09:39
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,0 +1,1 @@
1 +Creation of API Tokens for Technical Users
Parent
... ... @@ -1,0 +1,1 @@
1 +Rancher 2.WebHome
Content
... ... @@ -1,0 +1,22 @@
1 += Introduction =
2 +
3 +If you create a Technical User for Rancher2 in the DevOps Portal, the credentials can only be used to log in to the Rancher2 UI. To interact with the Rancher2 REST API (Basic HTTP Authentication with a username and password) you have to manually create an API Token for your Rancher2 tech user first.
4 +
5 += How to Create an API Token in Rancher2 =
6 +
7 +* If not done yet, set up a Technical User in the DevOps Portal for Rancher2 and assign it to the intended projects. Don't forget to record the password, you will not be able to see it later
8 +* Log in to Rancher2 with the credentials of the Technical User. Since you need a different browser session for that, it's recommended to open an anonymous window in your browser for that.
9 +* At the top of the page, click on the username ➡ Configure
10 +
11 + [[image:https://prd.sdc.t-systems.net/xwiki/wiki/devopsaas/download/Jenkins/Creation%20of%20API%20Tokens%20for%20Technical%20Users/WebHome/image2021-4-12_13-37-55.png?width=500&rev=1.1||alt="image2021-4-12_13-37-55.png" width="500"]]
12 +
13 +* On the Configure page, in the section API Token, click on "ADD NEW TOKEN".
14 +
15 +[[image:https://prd.sdc.t-systems.net/xwiki/wiki/devopsaas/download/Jenkins/Creation%20of%20API%20Tokens%20for%20Technical%20Users/WebHome/image2021-4-12_13-39-34.png?width=700&rev=1.1||alt="image2021-4-12_13-39-34.png" width="700"]]
16 +
17 +* Copy and record the created token for the intended use, then click SAVE.
18 +
19 +[[image:https://prd.sdc.t-systems.net/xwiki/wiki/devopsaas/download/Jenkins/Creation%20of%20API%20Tokens%20for%20Technical%20Users/WebHome/image2021-4-12_13-41-17.png?width=500&rev=1.1||alt="image2021-4-12_13-41-17.png" width="500"]]
20 +
21 +* Log out
22 +* Now Basic HTTP Authentication can be used with the username and the generated API Token (see [[https:~~/~~/www.jenkins.io/doc/book/system-administration/authenticating-scripted-clients/>>url:https://www.jenkins.io/doc/book/system-administration/authenticating-scripted-clients/]])