Fixes from porting Supermarket: sign-in buttons, CORE_DOMAIN, skill gaps

An agent ported Supermarket with only the skill. coreapp signin now
presses a sign-in page's button (a form with only hidden fields; --form
picks one), every app gets CORE_DOMAIN, and the skill covers apps that
also run elsewhere, IMAGE_VERSION instead of build args, deriving keys
from APP_SECRET, the first admin, apps with their own client setup, and
that the groups claim is empty on today's Cores.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 18:22:42 -07:00
co-authored by Claude Opus 5.5
parent da767e2139
commit dcc72fe5da
7 changed files with 196 additions and 24 deletions
+10 -5
View File
@@ -14,8 +14,10 @@
# coreapp logs [-f] its log
# coreapp shell [command] a shell in its container, or run one command there
# coreapp signin [path] sign in to it with the Core's test account, as a
# browser would, starting at path (default /login);
# --cookies <file> keeps the app's cookies
# browser would, starting at path (default /login;
# a page whose button starts sign-in is pressed,
# --form <action> picks the form); --cookies <file>
# keeps the app's cookies
# coreapp signin --code for sign-in started in the browser's JavaScript:
# get a code for the app's callback from Authelia
# coreapp signin --remove-account
@@ -346,19 +348,22 @@ cmd_shell() {
# test-account) gets a new random password each time, given to the Core and
# to signin.py on stdin, and kept nowhere
cmd_signin() {
local path="" cookies="" code=0 domain password account issuer client pkce
local path="" cookies="" form="" code=0 domain password account issuer client pkce
while [[ $# -gt 0 ]]; do
case "$1" in
--code) code=1 ;;
--cookies)
[[ $# -ge 2 ]] || die "--cookies needs a file: coreapp signin --cookies <file> [path]"
cookies="$2"; shift ;;
--form)
[[ $# -ge 2 ]] || die "--form needs the form's action: coreapp signin --form /signin/core /signin"
form="$2"; shift ;;
--remove-account)
init_core; sync_installer
core "$REMOTE_INSTALLER/coreapps test-account --remove"
return ;;
/*) [[ -z "$path" ]] || die "One path: coreapp signin [path]"; path="$1" ;;
*) die "coreapp signin [--cookies <file>] [path], coreapp signin --code, or coreapp signin --remove-account (a path starts with /)" ;;
*) die "coreapp signin [--cookies <file>] [--form <action>] [path], coreapp signin --code, or coreapp signin --remove-account (a path starts with /)" ;;
esac
shift
done
@@ -380,7 +385,7 @@ cmd_signin() {
printf '%s' "$password" | python3 "$SIGNIN" --code "${pkce[@]}" \
"$issuer" "$client" "https://$NAME.$domain$SSO_CALLBACK" "$account"
else
printf '%s' "$password" | python3 "$SIGNIN" ${cookies:+--cookies "$cookies"} \
printf '%s' "$password" | python3 "$SIGNIN" ${cookies:+--cookies "$cookies"} ${form:+--form "$form"} \
"https://$NAME.$domain${path:-/login}" "$account"
fi
}