ADR-0131: per-profile client sign-in for several clients on one machine
Foundation / checks (ecs) (push) Successful in 2m21s
Foundation / checks (deploy) (push) Successful in 4m9s
Foundation / checks (tsan) (push) Successful in 9m48s
Foundation / checks (client) (push) Successful in 19m17s
Foundation / checks (network) (push) Successful in 19m44s
Foundation / checks (checks) (push) Successful in 42m37s
Foundation / checks (postgres) (push) Successful in 45m40s
Foundation / postgres-tools (push) Successful in 30s
Foundation / server-image (push) Successful in 3m13s
Foundation / image (push) Successful in 3m27s

Only one client per machine could sign in: the saved login lived under a single
Credential Manager name, and Keycloak ignores prompt=select_account, so the
browser reused its single sign-on session. --profile NAME keeps one saved login
per profile (the default name is unchanged), and authorization asks for
prompt=login so the browser shows the login form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-15 17:35:53 -04:00
co-authored by Claude Opus 5.5
parent 898c921da8
commit a97f0c3fea
10 changed files with 79 additions and 16 deletions
+8 -3
View File
@@ -252,6 +252,7 @@ int main(int argc, char** argv) try {
evo::client::ConnectForm form;
bool connect_now = false;
bool cellular_trial = false;
std::string auth_profile; // ADR-0131: one saved login per --profile.
for (int i = 1; i < argc; ++i) {
const std::string_view arg{argv[i]};
if (arg == "--version") { // Build identity for tester reports (ADR-0086).
@@ -267,7 +268,11 @@ int main(int argc, char** argv) try {
start_fixture = true;
else if (arg == "--cellular")
cellular_trial = true;
else if (arg == "--connect" && i + 1 < argc) {
else if (arg == "--profile" && i + 1 < argc) {
auth_profile = argv[++i];
if (auth_profile.empty() || !evo::client::auth_profile_valid(auth_profile))
return 2;
} else if (arg == "--connect" && i + 1 < argc) {
form.endpoint = argv[++i];
connect_now = true;
} else if (arg == "--server-name" && i + 1 < argc)
@@ -315,7 +320,7 @@ int main(int argc, char** argv) try {
" [--layer water|nitrogen|...|heat|moisture]\n"
" [--refresh-every 1..1000] [--pick X,Y] "
"[--screenshot FILE.bmp --frames N]\n"
" [--controls FILE] [--show-controls]\n"
" [--controls FILE] [--show-controls] [--profile NAME]\n"
"Without --fixture or --connect the launcher opens.\n",
stderr);
return 2;
@@ -458,7 +463,7 @@ int main(int argc, char** argv) try {
return nullptr;
};
// ADR-0131 browser sign-in (Windows); elsewhere the panel offers manual grants only.
evo::client::AuthClient auth{evo::client::native_auth_platform()};
evo::client::AuthClient auth{evo::client::native_auth_platform(auth_profile)};
bool auth_connect = false; // Connect when the requested grant arrives.
auto grant_requested = std::chrono::steady_clock::time_point{};
int drawn_organisms = -1;