← Back to plugin index

Remember-Me Token Clean-up Task

Description

Task to clean up either lifetime or idle timeout expired Remember-Me tokens. Idle timeout expired tokens will only be removed when renewed once.

In order to minimize database locks, the task doesn't delete all expired tokens in one transaction but deletes the tokens in configurable batches.

It is recommended to schedule this task with a daily interval during a time with little traffic. Depending on the total number of tokens and the number of deletable Remember-Me tokens, the task might take some time but a proper "Batch Size" will keep row locks at a minimum.

Type name
RememberMeTokenCleanupTask
Class
com.airlock.iam.servicecontainer.app.application.configuration.task.rememberme.RememberMeTokenCleanupTaskConfig
May be used by
Properties
Remember-Me Settings (rememberMeConfig)
Description
Configuration defining the Remember-Me settings used for clean-up.
Attributes
Plugin-Link
Mandatory
Assignable plugins
Batch Size (batchSize)
Description

During clean-up, tokens are deleted in batches of this size. This makes sure that any row locks on the database are very short-lived, not affecting parallel token modifications. This value should not be set too high to prevent very long running transactions.

Token clean-up will repeat deleting this number of tokens until all expired tokens have been cleaned up. Therefore, this task can take some time when a lot of expired tokens are present.

This size should be chosen so that every batch does not take longer than 5 seconds. The average runtime of the batches can be found in the task's logs.

Attributes
Integer
Optional
Default value
1000
YAML Template (with default values)

type: RememberMeTokenCleanupTask
id: RememberMeTokenCleanupTask-xxxxxx
displayName: 
comment: 
properties:
  batchSize: 1000
  rememberMeConfig: