docs: Add role configuration nuance to moderated sessions#32357
docs: Add role configuration nuance to moderated sessions#32357lsgunn-teleport wants to merge 1 commit intomasterfrom
Conversation
|
🤖 Vercel preview here: https://docs-13nnkhssa-goteleport.vercel.app/docs/ver/14.x |
| You should note that users who are assigned a role with a `join_sessions` allow policy are | ||
| implicitly allowed to list sessions. In most cases, `deny` statements take precedent. | ||
| However, if the `join_sessions` policy is set in a role, the `join_sessions` policy | ||
| overrides any explicit deny setting for listing sessions. |
There was a problem hiding this comment.
This makes it sound like they would be able to list all sessions. Is that actually the case?
My expectation is that a join_sessions policy should only override a deny rule for sessions that you are allowed to join.
There was a problem hiding this comment.
@jentfoo Can you clarify the intent here? Does join_sessions only allow you to join and list the sessions matching the allow rule?
There was a problem hiding this comment.
This makes it sound like they would be able to list all sessions. Is that actually the case?
This is accurate, any user with join_sessions can list sessions, even if list sessions is explicitly denied. This appears to be a one off in our RBAC where deny wont take precedent (at least the only one I know of so far).
We discussed this on the issue here: https://github.com/gravitational/security-findings/issues/26
There was a problem hiding this comment.
Yeah, but the role documented in the linked issue allows you to join all sessions for all roles.
I suspect if your join policy says "you can only join kube sessions for role foo" you might see different behavior.
There was a problem hiding this comment.
I am not sure, I have not tested that case
There was a problem hiding this comment.
Ok, let's hold this open until we understand the current behavior. I will try to get to testing it this afternoon.
There was a problem hiding this comment.
Ok, I confirmed the behavior and my expectation in the first comment matches the current behavior.
My expectation is that a join_sessions policy should only override a deny rule for sessions that you are allowed to join.
This is what happens.
So a join_sessions policy doesn't override an explicit deny for all sessions, it only overrides the deny rule for sessions that you have permission to join (which makes sense).
The UI bug is still present, I had to verify this via API.
|
🤖 Vercel preview here: https://docs-bqbdlmjhb-goteleport.vercel.app/docs/ver/14.x |
|
I found this not to be the case. Here's what I did:
Then I started two sessions: one as What I found:
tl;dr - it's hard to say if this PR is correct or not because we may have a UI bug. Without being able to see the active sessions page at all we can't tell if the listing would be allowed or not (though I suspect it would). cc @rudream for the UI portion |
|
@zmb3 to confirm in your testing did you actually verify the restriction at the API level? When I had tested the UI would hide the session list but they were accessible if requested. The would be easiest to see when accessed from a leaf cluster (as described in the linked issue). For that reason we were tracking it as a UI bug for artificially hiding this ability. |
|
@jentfoo I did not (there is no tsh or tctl command to list active sessions, so the only way to truly verify that would be to write a custom API integration). However, recall in our discussion on the linked issue that we were seeing different behavior in the root and leaf cluster, and only the leaf cluster was hiding the active sessions page. In my testing above, everything was done on a single cluster, which suggests that something may have changed since we originally looked at this. |
Actually it was reversed, the root would hide the sessions but the leaf would allow them to be shown in the UI. |
|
Ah okay, so maybe nothing has changed then. In any case, I don't think we can merge this docs update as-is. We either need to fix the issue and then confirm that the behavior described here is accurate or we need to update this to reflect today's behavior. |
|
@lsgunn-teleport I just followed up in #32357 (comment) The only adjustment needed is to adjust the comment about join_sessions overriding explicit deny rules. |
|
Closing in favor of #32991 |
|
🤖 Vercel preview here: https://docs-77ypeb65y-goteleport.vercel.app/docs/ver/14.x |

Content change based on https://github.com/gravitational/teleport.e/issues/1359:
When this list / deny issue is resolved, #32420 must also be updated.