Skip to content

Commit 82e661c

Browse files
Merge pull request #106 from aacevedoosorio/stac-23290
STAC-23290: Make a small reference to the commands that are helpful t…
2 parents 5b7bfec + 3c436e1 commit 82e661c

File tree

4 files changed

+30
-5
lines changed

4 files changed

+30
-5
lines changed
65.3 KB
Loading

docs/latest/modules/en/pages/setup/security/authentication/troubleshooting.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,9 @@ stackstate:
3232
Now run the `helm upgrade` command you used before but include this one extra yaml file (so `+helm upgrade .... --values debug-auth.yaml+`) to enable debug logging. No pods will be restarting, the logging configuration changes will be loaded automatically after about 30 seconds.
3333

3434
To disable the debug logging run the `+helm upgrade ....+` command again but omit the `--values debug-auth.yaml`. After 30 seconds the updated logging configuration is loaded and the debug logging stops.
35+
36+
37+
== Troubleshooting issues with permissions
38+
39+
* xref:/setup/security/rbac/rbac_permissions.adoc#_list_subjects_for_a_user[Inspect the user subjects] (user and roles) and verify the configuration depending on the authentication model being used.
40+
* xref:/setup/security/rbac/rbac_permissions.adoc#_show_granted_permissions[Inspect a subject permission] and verify the configuration depending on the authorization model being used.

docs/latest/modules/en/pages/setup/security/rbac/rbac_permissions.adoc

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,35 +176,42 @@ suse-observability-agent-clusterA | Observability
176176

177177
=== List subjects for a user
178178

179-
List all subjects that are assigned to the context:
179+
List all subjects that are assigned to the context, the first entry shown is the username, and potential roles the user has:
180180

181181
[,text]
182182
----
183183
sts user-session roles
184184
185-
keycloakoidc_group://suse-observability-instance-troubleshooter
185+
user-dkzwh
186+
keycloakoidc_group://suse-observability-instance-troubleshooter
186187
keycloakoidc_group://suse-observability-instance-observer
187188
keycloakoidc_group://suse-observability-cluster-observer
188189
keycloakoidc_group://suse-observability-instance-admin
189190
keycloakoidc_group://suse-observability-observer
190191
----
191192

192-
List all subjects that are assigned to a user, by providing their `api-token`:
193+
List all subjects that are assigned to a user, by providing their `api-token`(useful as the admin can help debug users with less privileges):
193194

194195
[,text]
195196
----
196197
sts user-session roles --api-token [api-token]
197198
198-
keycloakoidc_group://suse-observability-instance-admin
199+
u-3p775e7w7l
200+
keycloakoidc_group://suse-observability-cluster-observer
199201
----
200202

201203
=== Show granted permissions
202204

203-
Show the permissions granted to a specific role.
205+
Show the permissions granted to a specific user or role.
204206

205207
[,text]
206208
----
207209
sts rbac describe-permissions --subject [role-name]
210+
211+
PERMISSION | RESOURCE
212+
get-topology | cluster-name:rbac-t2
213+
get-traces | k8s.cluster.name:rbac-t2
214+
get-metrics | k8s:rbac-t2:__any__
208215
----
209216

210217
[NOTE]

docs/latest/modules/en/pages/setup/security/rbac/rbac_rancher.adoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,15 @@ To grant additional permissions beyond Recommended Access, create a custom Proje
144144
image::rancher-custom-role.png[Custom RoleTemplate for richer access]
145145

146146
You can specify any resource and verb combination defined in the xref:/setup/security/rbac/rbac_permissions.adoc[RBAC Permissions]. Note that the dashes (`-`) are dropped from resource names, so the permission `get-metric-bindings` becomes the Kubernetes RBAC resource `metricbindings` with the verb `get`.
147+
148+
== Troubleshooting
149+
150+
* Verify that the Rbac Agent for the cluster is able to communicate with the platform.
151+
152+
NOTE: the Rbac Agent must authenticate using service tokens.
153+
154+
* xref:/setup/security/rbac/rbac_permissions.adoc#_list_subjects_for_a_user[Inspect the user subjects] (user and roles).
155+
** Verify any roles configuration on the OIDC provider.
156+
* xref:/setup/security/rbac/rbac_permissions.adoc#_show_granted_permissions[Inspect the subject permission]
157+
** Verify that the relevant (Cluster)RoleBindings that match the user with a (Cluster)Role are present.
158+
** Inspect the (Cluster)Role to verify that it grants the correct permissions.

0 commit comments

Comments
 (0)