Emit an Audit log event when a Bot or Instance fails to join#40329
Emit an Audit log event when a Bot or Instance fails to join#40329strideynet merged 9 commits intomasterfrom
Conversation
#40729 added some logging for failed join attempts. Are we now going to log things twice? Does this take any of those changes into account? |
I've already resolved the conflicts with this PR, I've removed those log lines in favour of my ones, and added any details that were missing from mine. I feel it still makes sense to move ahead with my PR since 40729 did not add an audit log event, and for our cloud customers, they do not have access to the logs of Teleport. The audit log is therefore the only way we can provide feedback about misconfigured joins. I'll hold off merging until you've had a chance to see/respond to this :) |
|
@strideynet See the table below for backport results.
|
* Emit audit event on instance/bot join failure * Add audit log on failure to azure and iam join methods * Tidy up a lil bit * Add missing icon to EventTypeCell.tsx * Regenerate snapshot * Correct status code * Add host_id and node_name to the join audit log * Remove "unknown" default values
* Emit audit event on instance/bot join failure * Add audit log on failure to azure and iam join methods * Tidy up a lil bit * Add missing icon to EventTypeCell.tsx * Regenerate snapshot * Correct status code * Add host_id and node_name to the join audit log * Remove "unknown" default values
* Emit audit event on instance/bot join failure * Add audit log on failure to azure and iam join methods * Tidy up a lil bit * Add missing icon to EventTypeCell.tsx * Regenerate snapshot * Correct status code * Add host_id and node_name to the join audit log * Remove "unknown" default values
…40329) (#40814) * Emit an Audit log event when a Bot or Instance fails to join (#40329) * Emit audit event on instance/bot join failure * Add audit log on failure to azure and iam join methods * Tidy up a lil bit * Add missing icon to EventTypeCell.tsx * Regenerate snapshot * Correct status code * Add host_id and node_name to the join audit log * Remove "unknown" default values * Fix broken snapshots
…40329) (#40816) * Emit an Audit log event when a Bot or Instance fails to join (#40329) * Emit audit event on instance/bot join failure * Add audit log on failure to azure and iam join methods * Tidy up a lil bit * Add missing icon to EventTypeCell.tsx * Regenerate snapshot * Correct status code * Add host_id and node_name to the join audit log * Remove "unknown" default values * Fix badly generatd snapshots
…40329) (#40815) * Emit an Audit log event when a Bot or Instance fails to join (#40329) * Emit audit event on instance/bot join failure * Add audit log on failure to azure and iam join methods * Tidy up a lil bit * Add missing icon to EventTypeCell.tsx * Regenerate snapshot * Correct status code * Add host_id and node_name to the join audit log * Remove "unknown" default values * fix backport * Regenerate bad snapshot
Currently, a failed join is not audit logged or even logged. This makes it really hard to determine why a join failed or to detect a malicious join attempt. This PR introduces an audit log event which is emitted when a join fails for any reason.
For join methods that support returning the attributes of the joining identity, these will also show in the audit log. Not all join methods support this yet, and we ought to return to those and add the appropriate methods so they do surface this information which is extremely useful in diagnosing problems with joining and allow rules.
changelog: Adds a new Audit log event that is emitted when an Agent or Bot request to join the cluster is denied.
Closes #17948