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

Consider adding a way to (optionally) track tokens #146

Closed
magmax opened this issue Jul 19, 2023 · 2 comments
Closed

Consider adding a way to (optionally) track tokens #146

magmax opened this issue Jul 19, 2023 · 2 comments

Comments

@magmax
Copy link

magmax commented Jul 19, 2023

Tracking tokens in order to monitor when they get old and should be renewed, or when they stop to be used and could be destroyed, is a must on security departments.

So, it would be great to be able to get such stats by using Prometheus, but requires a service to expose that data.

This applies for user and automation tokens.

Minimum data required:

  • type (automation/user)
  • creation timestamp
  • last used timestamp
@leklund
Copy link
Member

leklund commented Mar 20, 2024

This is a really interesting request. The exporter has always been focused on metrics from the real-time API but I can see why this sort of data would also be extremely useful. My initial instinct is that this would be its own service. I would guess that a lot of use cases for the exporter are using an automation token or a service limited token with a limited role so would not be able to read all tokens for a customer. With short lived tokens and browser tokens you also risk add a high level of cardinality to your prometheus metrics.

I like the idea but I don't think it fits well in the current fastly-exporter. However, one thing that would be fairly trivial to expose is the expiration time of the token being user for the exporter.

@leklund
Copy link
Member

leklund commented Apr 18, 2024

#164 Added a gauge metric with expiration time of the FASTLY_API_TOKEN used by the exporter. I don't think exporting expiration times for all tokens belongs here since this tool is focused on exporting real-time stats.

@leklund leklund closed this as completed Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants