-
Notifications
You must be signed in to change notification settings - Fork 12
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
Fix Santa sync protocol for versions of Santa >= 2024.6 #53
Conversation
Starting to review this, going to propagate this to my test environment and will merge/approve once a sync occurs successfully. |
Testing confirmed to work on Santa versions prior to Test Logs: Last login: Sun Nov 17 11:12:41 on console
ryan_diers@small-xray-two-vm ~ % sudo santactl status
Password:
>>> Daemon Info
Mode | Monitor
Transitive Rules | Yes
Log Type | file
File Logging | Yes
USB Blocking | No
On Start USB Options | None
Watchdog CPU Events | 0 (Peak: 11.67%)
Watchdog RAM Events | 0 (Peak: 92.84MB)
>>> Cache Info
Root cache count | 28
Non-root cache count | 0
>>> Database Info
Binary Rules | 2964
Certificate Rules | 533
TeamID Rules | 12
SigningID Rules | 16
Compiler Rules | 295
Transitive Rules | 0
Events Pending Upload | 1
>>> Static Rules
Rules | 28
>>> Watch Items
Enabled | No
>>> Sync Info
Sync Server | https://rad-rudolph.XXX.XXX/
Clean Sync Required | No
Last Successful Full Sync | 2024/11/17 11:18:34 -0800
Last Successful Rule Sync | 2024/11/17 11:18:34 -0800
Push Notifications | Disconnected
Bundle Scanning | No
ryan_diers@small-xray-two-vm ~ % sudo santactl sync --clean-all
Password:
Preflight starting
Clean All sync requested by user
Performing request, attempt 1 (of 5 maximum)...
Server Trust: /O=(null)/OU=(null)/CN=rad-rudolph.XXX.XXX/SHA-1=XXX
Clean sync requested by server
Preflight complete
Event upload starting
Event upload complete
Rule download starting
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 16 rules
Performing request, attempt 1 (of 5 maximum)...
Received 0 rules
Processed 3116 rules
Rule download complete
Postflight starting
Performing request, attempt 1 (of 5 maximum)...
Postflight complete
Sync completed successfully
ryan_diers@small-xray-two-vm ~ % sudo santactl status
>>> Daemon Info
Mode | Lockdown
Log Type | file
File Logging | Yes
USB Blocking | No
On Start USB Options | None
Watchdog CPU Events | 0 (Peak: 11.67%)
Watchdog RAM Events | 0 (Peak: 113.69MB)
>>> Cache Info
Root cache count | 2
Non-root cache count | 0
>>> Database Info
Binary Rules | 2568
Certificate Rules | 522
TeamID Rules | 10
SigningID Rules | 16
Compiler Rules | 276
Transitive Rules | 0
Events Pending Upload | 2
>>> Static Rules
Rules | 28
>>> Watch Items
Enabled | No
>>> Sync Info
Sync Server | https://rad-rudolph.XXX.XXX/
Clean Sync Required | No
Last Successful Full Sync | 2024/11/17 11:26:24 -0800
Last Successful Rule Sync | 2024/11/17 11:26:24 -0800
Push Notifications | Disconnected
Bundle Scanning | No
ryan_diers@small-xray-two-vm ~ % sudo santactl version
santad | 2024.2 (build 605404402)
santactl | 2024.2 (build 605404402)
SantaGUI | 2024.2 (build 605404402)
ryan_diers@small-xray-two-vm ~ % sudo santactl version
santad | 2024.9 (build 674285143)
santactl | 2024.9 (build 674285143)
SantaGUI | 2024.9 (build 674285143)
ryan_diers@small-xray-two-vm ~ % sudo santactl sync --clean-all
Preflight starting
Clean All sync requested by user
Performing request, attempt 1 (of 5 maximum)...
Server Trust: /O=(null)/OU=(null)/CN=rad-rudolph.XXX.XXX/SHA-1=XXX
Clean sync requested by server
Preflight complete
Event upload starting
Event upload complete
Rule download starting
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 50 rules
Performing request, attempt 1 (of 5 maximum)...
Received 16 rules
Performing request, attempt 1 (of 5 maximum)...
Received 0 rules
Processed 3116 rules
Rule download complete
Postflight starting
Performing request, attempt 1 (of 5 maximum)...
Postflight complete
Sync completed successfully
ryan_diers@small-xray-two-vm ~ % sudo santactl sync
Preflight starting
Performing request, attempt 1 (of 5 maximum)...
Server Trust: /O=(null)/OU=(null)/CN=rad-rudolph.XXX.XXX/SHA-1=XXX
Preflight complete
Event upload starting
Performing request, attempt 1 (of 5 maximum)...
Uploaded 3 events
Event upload complete
Rule download starting
Performing request, attempt 1 (of 5 maximum)...
Received 0 rules
Performing request, attempt 1 (of 5 maximum)...
Received 0 rules
Rule download complete
Postflight starting
Performing request, attempt 1 (of 5 maximum)...
Postflight complete
Sync completed successfully
ryan_diers@small-xray-two-vm ~ % sudo santactl status
>>> Daemon Info
Mode | Lockdown
Log Type | file
File Logging | Yes
USB Blocking | No
On Start USB Options | None
Watchdog CPU Events | 0 (Peak: 1.33%)
Watchdog RAM Events | 0 (Peak: 55.80MB)
>>> Cache Info
Root cache count | 31
Non-root cache count | 0
>>> Database Info
Binary Rules | 2568
Certificate Rules | 522
TeamID Rules | 10
SigningID Rules | 16
CDHash Rules | 0
Compiler Rules | 276
Transitive Rules | 0
Events Pending Upload | 28
>>> Static Rules
Rules | 28
>>> Watch Items
Enabled | No
>>> Sync Info
Sync Server | https://rad-rudolph.XXX.XXX/
Clean Sync Required | No
Last Successful Full Sync | 2024/11/17 11:29:29 -0800
Last Successful Rule Sync | 2024/11/17 11:29:29 -0800
Push Notifications | Disconnected
Bundle Scanning | No |
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.
LGTM. Thanks again for shipping this update!
to: @natesinger @mike-flowers-airbnb
cc: @airbnb/rudolph-maintainers
Background
In the Santa 2024.6 release the parsing of the JSON in the sync protocol was handed to the protobuf library which uses the Protobuf to JSON mapping. This had the side effect of making Santa more strict about the protocol fields than it was before.
The
cursor
field in the RuleDownload request is expected to be an opaque field of that's a string. However Rudolph is currently serializing the cursor object into the field directly in the request and the response. This mismatch causes Rudolph to be incompatible with Santa for versions >= 2024.6.Changes
Cursor
field is handled by the RuleDownloadRequest
andResponse
structsCursor
structCursor
struct is first serialized to a json string then added to theResponse
struct.Testing
Manual Testing Steps
SyncBaseURL
santactl sync
from the terminal