Skip to content
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

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

Merged
merged 2 commits into from Apr 24, 2024

Conversation

codingllama
Copy link
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 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
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 added this pull request to the merge queue Apr 24, 2024
Merged via the queue into branch/v15 with commit 60ffe53 Apr 24, 2024
35 checks passed
@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.

None yet

3 participants