make sure core generates jwks #2278
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!2278
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2278/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: #1706
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/1706
Original created: 2025-10-05T18:04:55Z
Original updated: 2025-10-05T18:06:08Z
Original head: carverauto/serviceradar:k8s/kong_config_jwks
Original base: main
Original merged: 2025-10-05T18:06:06Z by @mfreeman451
PR Type
Enhancement
Description
Add RS256 JWT key generation for Core JWKS
Ensure JWT private key exists in configuration
Minor whitespace cleanup in ConfigMap
Diagram Walkthrough
File Walkthrough
configmap.yaml
Add RS256 JWT key generation logick8s/demo/base/configmap.yaml
serviceradar-cliif missingImported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/1706#issuecomment-3369224817
Original created: 2025-10-05T18:05:11Z
PR Compliance Guide 🔍
Below is a summary of compliance checks for this PR:
Private key handling
Description: The script generates or ensures presence of a JWT private key in configuration, so ensure
the ConfigMap does not embed or log private key material and that the resulting file is
stored with restricted permissions to prevent unauthorized access.
configmap.yaml [806-815]
Referred Code
🎫 No ticket provided
Codebase context is not defined
Follow the guide to enable codebase context checks.
No custom compliance provided
Follow the guide to enable custom compliance check.
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/1706#issuecomment-3369225406
Original created: 2025-10-05T18:06:04Z
PR Code Suggestions ✨
Explore these optional code suggestions:
Generate cryptographic keys before deployment
To prevent token invalidation on pod restarts, generate the JWT private key
during the deployment pipeline instead of at container startup. The key should
then be injected into the pod as a persistent Kubernetes Secret.
Examples:
k8s/demo/base/configmap.yaml [807-815]
Solution Walkthrough:
Before:
After:
Suggestion importance[1-10]: 9
__
Why: The suggestion correctly identifies a critical design flaw where ephemeral JWT keys are generated at container startup, leading to token invalidation on every pod restart, which severely impacts authentication stability.
Exit script on key generation failure
Add
exit 1after the error message for key generation failure to prevent theapplication from starting with an incomplete configuration.
k8s/demo/base/configmap.yaml [809-811]
Suggestion importance[1-10]: 9
__
Why: The suggestion correctly identifies a critical flaw where the script continues after a key generation failure, which would lead to a misconfigured and broken application state. Exiting on failure is the correct approach.