fabric8-services / fabric8-auth

Identity and Access Management for fabric8 services
https://auth.openshift.io/api/status
Apache License 2.0
14 stars 26 forks source link

Add token cleanup worker #772

Closed sbryzak closed 5 years ago

sbryzak commented 5 years ago

Fixes #767

This PR introduces a token cleanup worker that runs inside a go routine. It routinely (once per hour) invokes a token cleanup routine that removes expired tokens after a configurable retention period, set by the AUTH_EXPIRED_TOKEN_RETENTION_HOURS configuration parameter, which has a default of 24 hours.

codecov[bot] commented 5 years ago

Codecov Report

Merging #772 into master will decrease coverage by 0.04%. The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #772      +/-   ##
==========================================
- Coverage   78.82%   78.77%   -0.05%     
==========================================
  Files          94       95       +1     
  Lines        8674     8722      +48     
==========================================
+ Hits         6837     6871      +34     
- Misses       1352     1363      +11     
- Partials      485      488       +3
Impacted Files Coverage Δ
configuration/configuration.go 84.65% <100%> (+0.11%) :arrow_up:
authorization/token/repository/token.go 72.36% <54.54%> (-1.4%) :arrow_down:
authorization/token/service/token_service.go 72.56% <58.33%> (-0.47%) :arrow_down:
authorization/token/worker/token_cleanup_worker.go 82.6% <82.6%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 752b668...9cdd82a. Read the comment docs.