Skip to content

Use one consistent Router host override in Commander (KROUTER_URL has three shapes) - #2535

Draft
maksimu wants to merge 1 commit into
masterfrom
factory/w-f6gjej1bhdax9hgm-use-one-consistent-router-host-override-wqdbx42ah3
Draft

maksimu wants to merge 1 commit into
masterfrom
factory/w-f6gjej1bhdax9hgm-use-one-consistent-router-host-override-wqdbx42ah3

Conversation

@maksimu

@maksimu maksimu commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

KROUTER_URL was read in several places and each decided for itself what the value meant (a bare host with an optional port, or a full URL), so the same value gave different results depending on which code read it.

This adds one resolver, get_router_override() in keepercommander/constants.py, that accepts either shape, and uses it everywhere the variable was read: get_router_host and get_router_url, the DAG connections (ksm.py, commander.py, __init__.py) and the pam debug krouter help text.

New tests in unit-tests/pam/test_router_host_override.py cover both shapes for each reader. They fail without the change and pass with it.

… three shapes)

KROUTER_URL was read in several places and each decided for itself what the value meant (a bare host with an optional port, or a full URL), so the same value gave different results depending on which code read it.

This adds one resolver, `get_router_override()` in `keepercommander/constants.py`, that accepts either shape, and uses it everywhere the variable was read: `get_router_host` and `get_router_url`, the DAG connections (`ksm.py`, `commander.py`, `__init__.py`) and the `pam debug krouter` help text.

New tests in `unit-tests/pam/test_router_host_override.py` cover both shapes for each reader. They fail without the change and pass with it.
@maksimu
maksimu force-pushed the factory/w-f6gjej1bhdax9hgm-use-one-consistent-router-host-override-wqdbx42ah3 branch from fe9162f to af87bfa Compare November 17, 2026 20:35

This branch has not been deployed

No deployments
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