[v11] Add usage events for certificate issuance and additional session types (#20662)#21192
Conversation
#20662) * Add usage events for certificate issuance and additional session types This adds a new usage event for certificate issuance, emitted whenever a new user certificate is generated. These events include an anonymized username, TTL, and basic info about which requests are present on the certificate (e.g. db/app/k8s requests). Additionally, this captures additional session event types from the audit log, including database, app, and desktop sessions, and also properly tags k8s exec sessions which were previously grouped together with SSH. * Add `SessionStartV2` events, add `is_bot` flag to cert events * Drop redundant `Event` prefix on `UsageCertificteIssued` event * Rename `CertificateIssuedEvent` -> `UserCertificateIssuedEvent`
espadolini
left a comment
There was a problem hiding this comment.
Blocking until we have the server side running in prod.
|
I'm needing to backport some more prehog changes. Do we need a prehog prod deployment to unblock this? @espadolini @timothyb89 |
There was some additional talk about holding off due to some possible proto changes in these new events, though IMO we should just update the .proto the regular way given it's already released in v12. Otherwise, yeah, we were (are?) waiting on a new prehog deployment. What do you think, @espadolini? |
|
v12 might be released but it's not currently in use; we should tweak the session kind for app session start to distinguish AWS console and TCP app access, and then backport that change together with this, IMO. It should be a Teleport-only change, so we don't need a two step thing. |
* Make UsageSessionStart more selective and granular for app access * Allow generic "app" kind for app.session.start app.session.start is consistently emitted, just not consistently stored * Avoid singling out aws app access * Use the same check as app access
#21606 was included in this backport
Backport of #20662 for branch/v11
This adds a new usage event for certificate issuance, emitted whenever a new user certificate is generated. These events include an anonymized username, TTL, and basic info about which requests are present on the certificate (e.g. db/app/k8s requests).
Additionally, this captures additional session event types from the audit log, including database, app, and desktop sessions, and also properly tags k8s exec sessions which were previously grouped together with SSH.
Add
SessionStartV2events, addis_botflag to cert eventsDrop redundant
Eventprefix onUsageCertificteIssuedeventRename
CertificateIssuedEvent->UserCertificateIssuedEventAlso includes the v11 backport for #21606