-
Notifications
You must be signed in to change notification settings - Fork 525
Description
Data in the attested_node_entries
and node_resolver_map_entries
tables is left in the database indefinitely. There are cases when this data may no longer be valuable to retain, such as when the rows correspond to an expired Agent that attested using a NodeAttestor
plugin that does not have a trust on first use security model, such as sshpop
or x509pop
. In those cases, the Agents corresponding to the spiffe_id
in those rows can safely re-attest with SPIRE Server even if this data is deleted from the database.
In long-running environments, this can result in a lot of stale data in the database that ultimately hurts SPIRE Server query performance. When the overall size of these tables expands beyond the maximum message size in gRPC, the only way to clean up this old data seems to be manually purging data in the database with SQL DELETE FROM
statements. It is not necessarily intuitive to an operator of SPIRE that they might need to manually clean up this data from the database.
It would be nice if SPIRE Server did some periodic purging of this old data for expired Agents that attested with a non-TOFU NodeAttestor
plugin to simplify the operational burden of monitoring the table sizes and manually purging the data on an ongoing basis.