indigo-iam / iam

INDIGO Identity and Access Management Service
https://indigo-iam.github.io/
Other
102 stars 43 forks source link

Move cleanup tasks from MitreID into IAM codebase #721

Closed enricovianello closed 3 weeks ago

enricovianello commented 7 months ago

Cleanup tasks were defined and a bit hardcoded into MitreID codebase. Those tasks can now be configured and are contained into IAM codebase.

Property name (Environment variable name) Property description Property default value
task.tokenCleanupPeriodMsec IAM_TOKEN_CLEANUP_PERIOD_MSEC Interval between 2 executions of token removal task 300000 (ms)
task.tokenCleanupCount IAM_TOKEN_CLEANUP_COUNT (New) Amount of access and refresh expired tokens to be deleted each time the task runs 100
task.approvalCleanupPeriodMsec IAM_APPROVAL_CLEANUP_PERIOD_MSEC Interval between 2 executions of expired sites removal task. 300000 (ms)
task.deviceCodeCleanupPeriodMsec IAM_DEVICE_CODE_CLEANUP_PERIOD_MSEC Interval between 2 executions of expired codes for device code removal task. 300000 (ms)
task.authorizationCodeCleanupPeriodMsec IAM_AUTHORIZATION_CODE_CLEANUP_PERIOD_MSEC (New) Interval between 2 executions of expired authorization codes removal task. 300000 (ms)
task.authorizationCodeCleanupCount IAM_AUTHORIZATION_CODE_CLEANUP_COUNT (New) Amount of expired authorization codes to be deleted each time the task runs 100
task.authenticationHolderCleanupPeriodMsec IAM_AUTHENTICATION_HOLDER_CLEANUP_PERIOD_MSEC (New) Interval between 2 executions of the task dedicated to remove the unused AuthenticationHolder entries. 300000 (ms)
task.authenticationHolderCleanupCount IAM_AUTHENTICATION_HOLDER_CLEANUP_COUNT (New) Amount of AuthenticationHolder entries to be deleted each time the task runs 100

This PR also adds more missing foreign keys.

sonarcloud[bot] commented 5 months ago

Quality Gate Failed Quality Gate failed

Failed conditions
55.4% Coverage on New Code (required ≥ 85%)
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

enricovianello commented 3 weeks ago

This work will be rebooted soon in a more general porting of MitreID OAuth framework implementation + model entities on IAM codebase.