Skip to content

Commit

Permalink
OCPBUGS#9364: create bounnd SA token externally
Browse files Browse the repository at this point in the history
  • Loading branch information
xenolinux committed Mar 27, 2023
1 parent d4e32c4 commit b8f974f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
5 changes: 5 additions & 0 deletions authentication/bound-service-account-tokens.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@ include::modules/bound-sa-tokens-about.adoc[leveloffset=+1]
// Configuring bound service account tokens using volume projection
include::modules/bound-sa-tokens-configuring.adoc[leveloffset=+1]

// Creating bound service account tokens outside the pod
include::modules/bound-sa-tokens-configuring-externally.adoc[leveloffset=+1]

[role="_additional-resources"]
.Additional resources

* xref:../nodes/nodes/nodes-nodes-rebooting.adoc#nodes-nodes-rebooting-gracefully_nodes-nodes-rebooting[Rebooting a node gracefully]
* xref:../authentication/understanding-and-creating-service-accounts.adoc#service-accounts-managing_understanding-service-accounts[Creating service accounts]
// TODO: Verify distros: openshift-enterprise,openshift-webscale,openshift-origin
27 changes: 27 additions & 0 deletions modules/bound-sa-tokens-configuring-externally.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Module included in the following assemblies:
//
// * authentication/bound-service-account-tokens.adoc

:_content-type: PROCEDURE
[id="bound-sa-tokens-configuring-externally_{context}"]
= Creating bound service account tokens outside the pod

.Prerequisites

* You have access to the cluster as a user with the `cluster-admin` role.
* You have created a service account. This procedure assumes that the service account is named `build-robot`.
.Procedure

* Create the bound service account token outside the pod by running the following command:
+
[source,terminal]
----
$ oc create token build-robot
----
+
.Example output
[source,terminal]
----
eyJhbGciOiJSUzI1NiIsImtpZCI6IkY2M1N4MHRvc2xFNnFSQlA4eG9GYzVPdnN3NkhIV0tRWmFrUDRNcWx4S0kifQ.eyJhdWQiOlsiaHR0cHM6Ly9pc3N1ZXIyLnRlc3QuY29tIiwiaHR0cHM6Ly9pc3N1ZXIxLnRlc3QuY29tIiwiaHR0cHM6Ly9rdWJlcm5ldGV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