Skip to content

fix(docker): register custom server public key in docker_ksm_utility - #2448

Merged
maksimu merged 1 commit into
smk-testfrom
fix/smk-docker-ksm-server-key
Oct 16, 2026
Merged

maksimu merged 1 commit into
smk-testfrom
fix/smk-docker-ksm-server-key

Conversation

@maksimu

@maksimu maksimu commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

docker_ksm_utility.py, which downloads and uploads config.json for the service-mode container, uses the KSM SDK directly and never imports keepercommander.rest_api, so the KEEPER_SERVER_PUBLIC_KEY fix from #2447 doesn't apply to it. Against SMK, every get_secrets call fails with encrypted transmission key is invalid.

This change registers the same env vars in the SDK's key table before creating the SecretsManager. It copies the logic rather than importing rest_api, so the script stays light. The swallowed UID-lookup exception is now printed, because before this the key error only appeared as a confusing title-lookup failure.

I checked locally that with the env vars set the SDK uses the SMK key for id 7. I haven't run it in a container against SMK. The container also needs the two env vars, REQUESTS_CA_BUNDLE with SMK's CA, and a hostname for SMK it can reach (the KSM config and file URLs currently say localhost).

@maksimu
maksimu marked this pull request as ready for review October 16, 2026 15:37
@maksimu
maksimu merged commit 88de2c9 into smk-test Oct 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant