Edge onboarding/502 error #2548
No reviewers
Labels
No labels
1week
2weeks
Failed compliance check
IP cameras
NATS
Possible security concern
Review effort 1/5
Review effort 2/5
Review effort 3/5
Review effort 4/5
Review effort 5/5
UI
aardvark
accessibility
amd64
api
arm64
auth
back-end
bgp
blog
bug
build
checkers
ci-cd
cleanup
cnpg
codex
core
dependencies
device-management
documentation
duplicate
dusk
ebpf
enhancement
eta 1d
eta 1hr
eta 3d
eta 3hr
feature
fieldsurvey
github_actions
go
good first issue
help wanted
invalid
javascript
k8s
log-collector
mapper
mtr
needs-triage
netflow
network-sweep
observability
oracle
otel
plug-in
proton
python
question
reddit
redhat
research
rperf
rperf-checker
rust
sdk
security
serviceradar-agent
serviceradar-agent-gateway
serviceradar-web
serviceradar-web-ng
siem
snmp
sysmon
topology
ubiquiti
wasm
wontfix
zen-engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
carverauto/serviceradar!2548
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2548/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from GitHub pull request.
Original GitHub pull request: #2109
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/2109
Original created: 2025-12-12T02:53:48Z
Original updated: 2025-12-12T04:07:31Z
Original head: carverauto/serviceradar:edge_onboarding/502_error
Original base: main
Original merged: 2025-12-12T04:07:28Z by @mfreeman451
User description
IMPORTANT: Please sign the Developer Certificate of Origin
Thank you for your contribution to ServiceRadar. Please note, when contributing, the developer must include
a DCO sign-off statement indicating the DCO acceptance in one commit message. Here
is an example DCO Signed-off-by line in a commit message:
Describe your changes
Issue ticket number and link
Code checklist before requesting a review
PR Type
Bug fix, Enhancement
Description
Fix sysmon bare-metal edge onboarding with mTLS defaults and improved error handling
Add sysmon metrics provider fallback logic to support multiple backend implementations
Enhance sysmon checker packages with optional endpoint metadata for certificate SANs
Improve edge package delivery error classification and logging for actionable diagnostics
Update sysmon default configs from SPIFFE to mTLS for bare-metal installations
Diagram Walkthrough
File Walkthrough
1 files
Add decryption error handling and logging3 files
Test decryption error response classificationTest sysmon mTLS defaults and decryption error classificationTest sysmon prefixed service name handling6 files
Add metrics provider resolution with fallback logicDefault sysmon checker to mTLS and add endpoint metadataSupport sysmon service name prefixes in gRPC processingAdd decrypt failed error typeImplement GetResults and StreamResults gRPC methodsAdd certificate ownership management for bare-metal4 files
Update proto path to use shared proto directoryUpdate proto dependency to shared locationChange default security mode from SPIFFE to mTLSChange example config from SPIFFE to mTLS defaults6 files
Improve mTLS token environment variable handlingFormat checker config generation codeFormat package download response parsingFormat mTLS bootstrap bundle extractionFormat host override URL parsing logicFormat token parsing test assertions4 files
Document sysmon bare-metal mTLS and onboarding changesAdd edge onboarding requirements for sysmon mTLSAdd sysmon bare-metal mTLS default requirementsTrack implementation tasks for sysmon mTLS defaults1 files
Add libc dependency for certificate ownershipImported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/2109#issuecomment-3644685675
Original created: 2025-12-12T02:54:22Z
PR Compliance Guide 🔍
Below is a summary of compliance checks for this PR:
No security concerns identified
No security vulnerabilities detected by AI analysis. Human verification advised for critical code.🎫 No ticket provided
Codebase context is not defined
Follow the guide to enable codebase context checks.
Generic: Meaningful Naming and Self-Documenting Code
Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting
Status: Passed
Generic: Robust Error Handling and Edge Case Management
Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation
Status: Passed
Generic: Secure Error Handling
Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.
Status: Passed
Generic: Secure Logging Practices
Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.
Status: Passed
Generic: Security-First Input Validation and Data Handling
Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities
Status: Passed
Generic: Comprehensive Audit Trails
Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.
Status:
Audit logging: New error branches add some logging but critical actions like package delivery
success/failure and decryption errors may not consistently include user/context
identifiers for full auditability across all added paths.
Referred Code
Compliance status legend
🟢 - Fully Compliant🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label
Imported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/2109#issuecomment-3644688295
Original created: 2025-12-12T02:55:41Z
PR Code Suggestions ✨
Explore these optional code suggestions:
Replace unsafe FFI with safe alternative
Replace the unsafe FFI call to
getpwnamwith a thread-safe alternative from theuserscrate to avoid potential race conditions.rust/edge-onboarding/src/bundle.rs [29-64]
Suggestion importance[1-10]: 7
__
Why: The suggestion correctly identifies a potential thread-safety issue with
getpwnamand proposes a safer, idiomatic Rust alternative using theuserscrate, which improves code robustness.Consolidate sysmon service name handling
The logic for identifying sysmon services is inconsistent between
pkg/core/metrics.goandpkg/core/edge_onboarding.go. This logic should becentralized into a shared helper function to ensure consistent behavior and
improve maintainability.
Examples:
pkg/core/metrics.go [1421-1422]
pkg/core/edge_onboarding.go [2809-2817]
Solution Walkthrough:
Before:
After:
Suggestion importance[1-10]: 6
__
Why: The suggestion correctly identifies an inconsistency in how sysmon-like services are identified between
pkg/core/metrics.goandpkg/core/edge_onboarding.go, which could lead to future bugs and maintenance issues.