Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,17 @@ func (h *Migrate) Handle(ctx context.Context, a fleetapi.Action, ack acker.Acker
return err
}

// signed data contains secret reference
enrollmentToken := action.Data.EnrollmentToken

if signedData != nil {
if err := json.Unmarshal(signedData, &action.Data); err != nil {
return fmt.Errorf("failed to convert signed data to action data: %w", err)
}
}

action.Data.EnrollmentToken = enrollmentToken

if err := h.coord.Migrate(ctx, action, fleetgateway.RequestBackoff); err != nil {
// this should not happen, unmanaged agent should not receive the action
// defensive coding to avoid misbehavior
Expand Down
Loading