Skip to content

[v15] Issue cert.create events during device authentication#40872

Merged
codingllama merged 2 commits intobranch/v15from
codingllama/backport/40848-v15
Apr 24, 2024
Merged

[v15] Issue cert.create events during device authentication#40872
codingllama merged 2 commits intobranch/v15from
codingllama/backport/40848-v15

Conversation

@codingllama
Copy link
Copy Markdown
Contributor

Backport #40848 to branch/v15.

Changelog: Issue cert.create events during device authentication

* Add DeviceExtensions to the events.Identity proto

* Update generated protos

* Issue cert.create events during device authentication
Comment thread lib/auth/auth.go
Comment on lines -2907 to -2923
eventIdentity := identity.GetEventIdentity()
eventIdentity.Expires = notAfter
if err := a.emitter.EmitAuditEvent(a.closeCtx, &apievents.CertificateCreate{
Metadata: apievents.Metadata{
Type: events.CertificateCreateEvent,
Code: events.CertificateCreateCode,
},
CertificateType: events.CertificateTypeUser,
Identity: &eventIdentity,
ClientMetadata: apievents.ClientMetadata{
//TODO(greedy52) currently only user-agent from GRPC clients are
//fetched. Need to propagate user-agent from HTTP calls.
UserAgent: trimUserAgent(metadata.UserAgentFromContext(ctx)),
},
}); err != nil {
log.WithError(err).Warn("Failed to emit certificate create event.")
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We got a conflict here, but the blocks look identical to me (compare with emitCertCreateEvent).

The other conflict was in the generated protos file.

@codingllama codingllama enabled auto-merge April 24, 2024 16:41
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from probakowski April 24, 2024 20:02
@codingllama codingllama added this pull request to the merge queue Apr 24, 2024
Merged via the queue into branch/v15 with commit 60ffe53 Apr 24, 2024
@codingllama codingllama deleted the codingllama/backport/40848-v15 branch April 24, 2024 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants