juspay / nix-health

REPO MOVED https://github.com/juspay/omnix/tree/main/crates/nix_health
https://github.com/juspay/omnix/tree/main/crates/nix_rs
28 stars 2 forks source link

`nix-health` access-tokens health check #8

Open shivaraj-bh opened 9 months ago

shivaraj-bh commented 9 months ago

For unauthenticated requests, the rate limit allows for up to 60 requests per hour. Unauthenticated requests are associated with the originating IP address, and not the person making requests.

source: https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#rate-limiting

In an office setting I have observed this limit can be reached quickly due to the latter.

Solution: https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-access-tokens

Aside: can we avoid keeping the token as plain text in nix.conf?

srid commented 9 months ago

@shivaraj-bh What is the user-facing feature request here? (How would you describe this check on the documentation website for nix-health)?

Asking this way because, I'm not sure I understand what is being requested here.

shivaraj-bh commented 9 months ago

We could have a check, access-tokens, that is disabled by default, takes site addr as one of the attribute; if the respective access token for that site addr is present the check can return green.