-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add proxy and user_agent labels to user login counter metric #60239
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
base: master
Are you sure you want to change the base?
Conversation
How can we ensure that an attacker doesn't break cloud monitoring by spamming tons of agents and causing Prometheus to fail? Are we going to drop them in cloud? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with Tiago, this seems like it could be a very high cardinality metric. cc @evanfreed.
github.com/gosuri/uitable v0.0.4 // indirect | ||
github.com/gravitational/license v0.0.0-20250329001817-070456fa8ec1 // indirect | ||
github.com/gravitational/roundtrip v1.0.2 // indirect | ||
github.com/gravitational/roundtrip v1.0.3 // indirect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see a tag for this but not a GH release. Do you plan on creating a new release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, I will draft release for this version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the concern about high cardinality on the user agent is worth addressing for scalability reasons, even if authenticated users could likely already cause trouble by connecting many agent versions (which we already record).
Could we parse the user agent for Teleport major version, and only accept reasonable values?
@tigrato in order to do that, you need a user from the cluster and must complete the login process. We would probably need to reset counters periodically as well |
Replaced Sprintf with string concatenation
cbec0d8
to
3cc147e
Compare
In this PR, added a user agent to the client tools request header. During login, it is passed through the proxy to the auth service. Additionally, information about the public proxy address is included so it can be recorded in metrics.
The
user_login_total
counter now has two labels: proxy and user_agent.proxy
label allows us to track which regions are used by customers during login.user_agent
label helps identify the client tools version in use, to detect any affected versions in future, and monitor the progress of client tools managed updates.Example:
Related: