Skip to content

Ad-hoc tool to test TLS endpoints using node_key from nodes#875

Merged
javuto merged 1 commit into
developfrom
tool-test-tls-endpoints
Jul 2, 2026
Merged

Ad-hoc tool to test TLS endpoints using node_key from nodes#875
javuto merged 1 commit into
developfrom
tool-test-tls-endpoints

Conversation

@javuto

@javuto javuto commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add a small stdlib-only debugging script for exercising osctrl-tls endpoints with raw HTTP and dumping full request/response details.

What Changed

  • Added tools/debug_tls_endpoints.py
  • Added tools/test_debug_tls_endpoints.py

Behavior

  • Supports enroll, config, log, read, write, and all
  • Can read endpoint, host, and CA settings from osquery.flags
  • Can use osquery.secret for enroll when needed
  • Defaults to node_key + identifier for testing existing node flows without enrolling a new node
  • Dumps raw request URL, headers, JSON body, response status, headers, and body
  • Uses Python stdlib only, so no extra dependency install is needed

Why

Debugging TLS/osquery behavior was awkward and usually required either a real node enrollment or hand-building curl payloads. This gives us one small tool for replaying the same endpoint shapes the backend expects.

Validation

python3 -m unittest tools/test_debug_tls_endpoints.py
python3 tools/debug_tls

@javuto javuto added osctrl-tls osctrl-tls related changes 🛠️ tools Tools related issues labels Jul 2, 2026
Comment thread tools/debug_tls_endpoints.py Dismissed
@javuto javuto merged commit ac7cdb0 into develop Jul 2, 2026
7 checks passed
@javuto javuto deleted the tool-test-tls-endpoints branch July 2, 2026 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

osctrl-tls osctrl-tls related changes 🛠️ tools Tools related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants