-
Notifications
You must be signed in to change notification settings - Fork 486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make agent fail when getting unknown authority #4617
Make agent fail when getting unknown authority #4617
Conversation
…tries with spire server Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @MarcosDY! One small nit about error message, rest looks good.
pkg/agent/manager/manager.go
Outdated
@@ -285,6 +285,9 @@ func (m *manager) runSynchronizer(ctx context.Context) error { | |||
|
|||
err := m.synchronize(ctx) | |||
switch { | |||
case nodeutil.IsUnknownAuthorityError(err): | |||
m.c.Log.WithError(err).Info("Synchronize failed, non-recoverable error") | |||
return fmt.Errorf("agent SVID is signed by unknow authority: %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agent SVID or Server SVID?
I think the error message we print with %w
is going to be roughly the same as this one? Does it include any add'l information? Maybe the string should be something like failed to sync with SPIRE Server: %w
?
Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com>
* Make agent crash when getting an unknown authority error when sync entries with spire server Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com> Signed-off-by: Faisal Memon <fymemon@yahoo.com>
* Make agent crash when getting an unknown authority error when sync entries with spire server Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com>
Make agent fails when getting unknown authority trying to get authorized entries from spire-server.
This can happen when not using an upstream authority and the server crashes.
If the server crashes, and it is no able to load previous bundles, Server will sign new authorities. In this case, the agent will still have an agent SVID using the old bundle, and communication will be broken for ever.