Skip to content

Commit 169da5f

Browse files
Provide CloudWatch query to help customer identify clients sending requests to global STS endpoint (#624)
Co-authored-by: Geoffrey Cline <gcline@amazon.com>
1 parent 925d078 commit 169da5f

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

latest/bpg/security/iam.adoc

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,22 @@ in a terminal window:
4949

5050
[source,bash]
5151
----
52-
aws eks get-token --cluster-name <cluster_name>
52+
aws eks get-token --cluster-name <cluster_name> --region <region>
53+
----
54+
55+
The output should resemble this:
56+
57+
[source,json]
58+
----
59+
{
60+
"kind": "ExecCredential",
61+
"apiVersion": "client.authentication.k8s.io/v1alpha1",
62+
"spec": {},
63+
"status": {
64+
"expirationTimestamp": "2024-12-20T17:38:48Z",
65+
"token": "k8s-aws-v1.aHR0cHM6Ly9zdHMudXMtd2VzdC0yLmFtYXpvbmF3cy5jb20vP0FjdGlvbj1HZ...."
66+
}
67+
}
5368
----
5469

5570
You can also get a token programmatically. Below is an example written
@@ -119,6 +134,18 @@ ClusterRoleBindings. They are similar to IAM Roles in that they define a
119134
set of actions (verbs) that can be performed against a collection of
120135
Kubernetes resources (objects).
121136

137+
=== CloudWatch query to help users identify clients sending requests to global STS endpoint
138+
139+
Run CloudWatch query below to get sts endpoint. If stsendpoint equals to "sts.amazonaws.com", then it is a global STS endpoint. If stsendpoint equals like "sts.<region>.amazonaws.com", then it is a regional STS endpoint.
140+
141+
----
142+
fields @timestamp, @message, @logStream, @log,stsendpoint
143+
| filter @logStream like /authenticator/
144+
| filter @message like /stsendpoint/
145+
| sort @timestamp desc
146+
| limit 10000
147+
----
148+
122149
=== Cluster Access Manager
123150

124151
Cluster Access Manager, now the preferred way to manage access of AWS

0 commit comments

Comments
 (0)