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

Clean up logging for cert generation #41473

Merged
merged 1 commit into from
May 14, 2024
Merged

Clean up logging for cert generation #41473

merged 1 commit into from
May 14, 2024

Conversation

zmb3
Copy link
Collaborator

@zmb3 zmb3 commented May 13, 2024

On a busy cluster, Teleport can issue hundreds or even thousands of TLS certificates in a short period of time. This can clutter the logs and make troubleshooting difficult.

  • Decrease the severity from INFO to DEBUG
  • Log only the common name, not the full subject

Before:

Generating TLS certificate 1.3.9999.1.15=#13046e6f6e65,1.3.9999.1.9=#13093132372e302e302e31,1.3.9999.1.7=#13097a61632d6c6f63616c,1.3.9999.1.2=#130e73797374656d3a6d617374657273,CN=zac,O=access+O=auditor+O=editor+O=requester,POSTALCODE={\"aws_role_arns\":null\,\"db_names\":null\,\"db_users\":null\,\"kubernetes_groups\":null\,\"kubernetes_users\":null\,\"logins\":[\"zmb\"]\,\"windows_logins\":[\"Administrator\"]},STREET=zac-local,L=zmb+L=doesnotexist+L=-teleport-internal-join dns_names:[] key_usage:5 not_after:2024-05-14 03:11:03.562838 +0000 UTC tlsca/ca.go:1200

After:

Generating TLS certificate common_name:zac dns_names:[] key_usage:5 not_after:2024-05-14 03:16:09.912425 +0000 UTC tlsca/ca.go:1201

On a busy cluster, Teleport can issue hundreds or even thousands
of TLS certificates in a short period of time. This can clutter
the logs and make troubleshooting difficult.

- Decrease the severity from INFO to DEBUG
- Log only the common name, not the full subject
@zmb3 zmb3 added the no-changelog Indicates that a PR does not require a changelog entry label May 13, 2024
Copy link
Contributor

@strideynet strideynet left a comment

Choose a reason for hiding this comment

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

Structured logging ftw 🚀

@zmb3 zmb3 added this pull request to the merge queue May 14, 2024
Merged via the queue into master with commit e101021 May 14, 2024
39 of 41 checks passed
@zmb3 zmb3 deleted the zmb3/generating-cert-log branch May 14, 2024 14:01
ptgott pushed a commit that referenced this pull request May 14, 2024
On a busy cluster, Teleport can issue hundreds or even thousands
of TLS certificates in a short period of time. This can clutter
the logs and make troubleshooting difficult.

- Decrease the severity from INFO to DEBUG
- Log only the common name, not the full subject
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Indicates that a PR does not require a changelog entry size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants