RDKEMW-9393 : Dropbear is using prod Key to connect to devices running with prod build if DeviceType is Test#440
RDKEMW-9393 : Dropbear is using prod Key to connect to devices running with prod build if DeviceType is Test#440KTirumalaSrihari wants to merge 6 commits intodevelopfrom
Conversation
Remove condition to check if USE_DYNAMICKEYING is enabled or not.
|
All contributors have signed the CLA ✍️ ✅ |
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where dropbear SSH was incorrectly using production keys for test devices instead of development keys. The issue was caused by a check for an undefined USE_DYNAMICKEYING variable, which prevented the dev key selection logic from executing.
Changes:
- Removed the undefined
USE_DYNAMICKEYINGcheck from the device type conditional, allowing TEST devices to properly use dev authorization keys
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I have read the CLA Document and I hereby sign the CLA |
|
recheck |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
lib/rdk/start_ssh.sh:83
- If
tr181fails or returns an empty value here, the script falls into theelsebranch and logs that prod keys are being used, which is misleading and may cause TEST devices to come up with the wrong authorized_keys file. Consider explicitly handling an empty/unknownDEVICETYPE(e.g., retrytr181a few times and/or log an "unknown" case) so SSH behavior and logs are deterministic when the TR-181 value isn't available yet.
DEVICETYPE=$(tr181 -g Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Identity.DeviceType 2>/dev/null)
if [ "$DEVICETYPE" = "TEST" ]; then
USE_DEVKEYS="-f authorized_keys_dev"
echo " dropbear using dev authorization keys"
else
USE_DEVKEYS=""
echo " dropbear using prod authorization keys"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Reason for change:Dev Key should be used for SSH auth for Test Devices only,
Test Procedure: Device should be SSH'ble and dropbear should use keys as per DeviceType
Risks: Low
Priority: P1