AthenZ / k8s-athenz-sia

Apache License 2.0
1 stars 7 forks source link

expose cached token expires in metrics #72

Closed WindzCUHK closed 5 months ago

WindzCUHK commented 8 months ago

Description

TODO

changes

metrics

$ curl -sSi http://127.0.0.1:9999/metrics | grep token_expiry_timestamp
# HELP token_expiry_timestamp Expiry time in seconds since Unix epoch.
# TYPE token_expiry_timestamp gauge
token_expiry_timestamp{domain="domain1",role="role1",type="accesstoken"} 1.703606237e+09
token_expiry_timestamp{domain="domain1",role="role1",type="roletoken"} 1.703606237e+09
token_expiry_timestamp{domain="domain2",role="role2",type="accesstoken"} 1.703606352e+09

Type of change

Flags


Checklist

Checklist for maintainer

mlajkim commented 8 months ago

Note:

mlajkim commented 8 months ago

TODOs

Option 1: token_expiry_until_seconds{domain="domain1",role="role1",type="accesstoken"} 14400 token_expiry_until_seconds{domain="domain1",role="role1",type="roletoken"} 14400 token_expiry_until_seconds{domain="domain2",role="role2",type="accesstoken"} 14400

Option 2: tokens_expiry_earliest_seconds{domain=“domain1”,role=“role1",type=“accesstoken”} 8400

mlajkim commented 8 months ago

Performance; If performance affected, gotta give the options to modify

mlajkim commented 8 months ago

platform uses x509_cert_expires_in_seconds => access_token_expires_in_seconds role_token_expires_in_seconds

WindzCUHK commented 8 months ago

factor of metrics that affect performance

mlajkim commented 7 months ago

conclusion

mlajkim commented 5 months ago

Handled in the following:

Closed.