Skip to content

Warn if memory keymanager is used with non-reattestable attestor#7139

Open
sorindumitru wants to merge 1 commit into
spiffe:mainfrom
sorindumitru:warn-reattestable
Open

Warn if memory keymanager is used with non-reattestable attestor#7139
sorindumitru wants to merge 1 commit into
spiffe:mainfrom
sorindumitru:warn-reattestable

Conversation

@sorindumitru

Copy link
Copy Markdown
Member

This could be useful for users.

Signed-off-by: Sorin Dumitru <sorin@returnze.ro>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an operational warning in the SPIRE Agent startup/manager initialization path to help users avoid a configuration that can strand the agent after restart (non-reattestable node attestation + in-memory key manager).

Changes:

  • Emit a warning when AttestationResult.Reattestable is false and the configured KeyManager plugin is memory

Comment thread pkg/agent/agent.go
Comment on lines +395 to +397
if !as.Reattestable && cat.GetKeyManager().Name() == "memory" {
a.c.Log.Warn("Node attestation is not reattestable and the 'memory' key manager is in use; if the agent process is restarted, it will be unable to obtain a new SVID and will need to be manually evicted to be able to re-attest.")
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think those fields are relevant here. We just want to communicate to the user that something is wrong about the deployment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants