The login page says whose it is
Kanidm out of the box presents itself: its own name, its own mark. A neighbour landing on a login page that belongs to nobody in particular is right to hesitate about typing a password into it. The setup script now sets the vel's display name and logo on both the instance and the portal client. The logo comes from the content repo - the same images/logo.svg site.yaml already uses as the favicon - so the login page and the site are branded from one place, and the branding follows the content rather than this repo. Left alone deliberately: account recovery by email, and easter eggs. Both are decisions, not decoration, and the README says so. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -36,6 +36,27 @@ for g in kasserer styret komiteer nabohjelp arrangementer elvesti horingsinstans
|
||||
done
|
||||
$K system oauth2 update-claim-map-join $C groups array
|
||||
|
||||
# What a member sees when they land on the login page. Out of the box
|
||||
# Kanidm says "kanidm" and shows its own mark, which tells a neighbour
|
||||
# nothing about whose site they are signing in to - and a login page
|
||||
# that looks like it belongs to no one is the kind of thing people
|
||||
# rightly hesitate over.
|
||||
#
|
||||
# The logo comes from the content repo, because that is already where
|
||||
# this site's identity lives: the same file site.yaml uses as the
|
||||
# favicon. Branding follows the content, not this repo.
|
||||
$K system domain set-displayname "$SITE_NAME" || true
|
||||
$K system oauth2 set-displayname $C "$SITE_NAME" || true
|
||||
|
||||
logo=$(mktemp --suffix=.svg)
|
||||
if curl -sfL "$CONTENT_REPO/raw/branch/$CONTENT_BRANCH/images/logo.svg" -o "$logo" && [ -s "$logo" ]; then
|
||||
$K system domain set-image "$logo" svg || echo "note: could not set the instance logo"
|
||||
$K system oauth2 set-image $C "$logo" svg || echo "note: could not set the client logo"
|
||||
else
|
||||
echo "note: no images/logo.svg in the content repo - leaving the default mark"
|
||||
fi
|
||||
rm -f "$logo"
|
||||
|
||||
secret=$($K system oauth2 show-basic-secret $C 2>/dev/null | tail -1)
|
||||
sed -i "s|^OAUTH2_CLIENT_SECRET=.*|OAUTH2_CLIENT_SECRET=$secret|" .env portal.env
|
||||
|
||||
|
||||
Reference in New Issue
Block a user