Skip to content

PostFlightPayload unmarshalling errors #44

@cabillman

Description

@cabillman

In testing the latest moroz in our environment I noticed different santa clients encode the PostflightPayload differently.

Version 24.6 sends the following json: {"rules_received":"1","rules_processed":"1","machine_id":"xxxx"}

This ends up causing the client to hang retrying to the request 5 times while the server logs
{"caller":"mux.go:159","err":"json: cannot unmarshal string into Go struct field PostflightPayload.rules_received of type int","severity":"info","ts":"2025-05-06T17:31:01.853347761Z"}

I think this santa pull request is the culprit - google/santa#1415

I confirmed running santa client version 24.9 does solve this problem.

Do you have thoughts on making the server more robust so that it can handle both formats? I can try and put together a pull request.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions