-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logins denied by RBAC rules no longer generate audit log entries #7652
Labels
bug
regression
test-plan-problem
Issues which have been surfaced by running the manual release test plan
Comments
timothyb89
added
bug
test-plan-problem
Issues which have been surfaced by running the manual release test plan
regression
labels
Jul 22, 2021
Closed
I looked into this a bit and found that the audit log isn't created because IsMFARequired returns an error before the ssh connection is attempted. Error returned by When I remove the MFA required check, I get: Error:
|
timothyb89
added a commit
that referenced
this issue
Jul 26, 2021
In Teleport v6.0 and earlier, audit log events were emitted when a user was denied node access by RBAC rules (e.g. missing login or label permissions). In Teleport v6.2, `isMFARequired` now ensures users have RBAC permissions for a node before login is ever attempted, the client never attempts to connect, and no audit event is emitted. This adds a new audit log event before `isMFARequired` would otherwise return an error to the user. Fixes #7652
timothyb89
added a commit
that referenced
this issue
Jul 28, 2021
This changes `isMFARequired` to return `false` rather than an error (e.g. not found) when a user is not authorized to access a particular resource. This defers the authorization denial until such time as the client actually attempts to connect. Before Teleport v6.2, clients would immediately attempt to connect to nodes, and if denied by RBAC rules, would print an "access denied" error. As of Teleport v6.2, clients first call `isMFARequired` and, if unauthorized, abort the connection and print a "node not found" error. As no connection is ever attempted, no audit log entry is generated. Fixes #7652
timothyb89
added a commit
that referenced
this issue
Aug 4, 2021
* Do not deny logins in `isMFARequired` This changes `isMFARequired` to return `false` rather than an error (e.g. not found) when a user is not authorized to access a particular resource. This defers the authorization denial until such time as the client actually attempts to connect. Before Teleport v6.2, clients would immediately attempt to connect to nodes, and if denied by RBAC rules, would print an "access denied" error. As of Teleport v6.2, clients first call `isMFARequired` and, if unauthorized, abort the connection and print a "node not found" error. As no connection is ever attempted, no audit log entry is generated. Fixes #7652 * Remove dead code * Ensure users are still asked for MFA if multiple nodes match. * Remove unnecessary debug log * Update lib/auth/auth.go Co-authored-by: Brian Joerger <[email protected]> * Improve clarity per review feedback * Fix improper error log Co-authored-by: Brian Joerger <[email protected]>
timothyb89
added a commit
that referenced
this issue
Aug 4, 2021
* Do not deny logins in `isMFARequired` This changes `isMFARequired` to return `false` rather than an error (e.g. not found) when a user is not authorized to access a particular resource. This defers the authorization denial until such time as the client actually attempts to connect. Before Teleport v6.2, clients would immediately attempt to connect to nodes, and if denied by RBAC rules, would print an "access denied" error. As of Teleport v6.2, clients first call `isMFARequired` and, if unauthorized, abort the connection and print a "node not found" error. As no connection is ever attempted, no audit log entry is generated. Fixes #7652 * Remove dead code * Ensure users are still asked for MFA if multiple nodes match. * Remove unnecessary debug log * Update lib/auth/auth.go Co-authored-by: Brian Joerger <[email protected]> * Improve clarity per review feedback * Fix improper error log Co-authored-by: Brian Joerger <[email protected]>
russjones
pushed a commit
that referenced
this issue
Jan 26, 2022
* Do not deny logins in `isMFARequired` This changes `isMFARequired` to return `false` rather than an error (e.g. not found) when a user is not authorized to access a particular resource. This defers the authorization denial until such time as the client actually attempts to connect. Before Teleport v6.2, clients would immediately attempt to connect to nodes, and if denied by RBAC rules, would print an "access denied" error. As of Teleport v6.2, clients first call `isMFARequired` and, if unauthorized, abort the connection and print a "node not found" error. As no connection is ever attempted, no audit log entry is generated. Fixes #7652 * Remove dead code * Ensure users are still asked for MFA if multiple nodes match. * Remove unnecessary debug log * Update lib/auth/auth.go Co-authored-by: Brian Joerger <[email protected]> * Improve clarity per review feedback * Fix improper error log Co-authored-by: Brian Joerger <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
regression
test-plan-problem
Issues which have been surfaced by running the manual release test plan
In 6.0.1, login attempts when denied by RBAC rules generated audit log entries.
Example in 6.0.1 when principal is missing from certificate:
...and the associated audit log entry:
Similarly, if denied by node labels, the user sees this:
... and an audit log entry is generated:
Now in 7.0.0-beta.3, the user sees the following message in both cases:
$ tsh ssh node ERROR: node "Node:\"node\" Login:\"tim\" " not found
In both cases, the proxy server logs the attempt as an authorization failure but no audit log is generated. Port forwarding attempts denied by RBAC rules do still generate audit log events in v7.0.0-beta.3.
v6.2.3 appears to behave the same as v7.0.0.
The text was updated successfully, but these errors were encountered: