本文へ移動
cccskills
無料GitHub で公開日本語紹介

configuration-authentication-ui

Caddy認証ポータルのテンプレートやテーマ、言語、リンク、画像などを設定し、ブランド表示やカスタムCSS・JavaScriptを反映するスキルです。

原文原文の説明を見る

Configure portal UI templates, static assets, themes, languages, links, and custom CSS/JS/HTML. Use for branding and refresh-aware templates; transform-generated links belong to user transforms.

greenpau/caddy-securityスター 2,270(GitHub 2,270 + cccskills 0)

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • ポータルにロゴや案内リンクを表示したいとき
  • ログイン画面の言語やタイトルを調整したいとき
  • 独自CSSやJavaScriptを読み込みたいとき
  • 更新機能を保ってテンプレートを変更したいとき

日本語での紹介

できること

Caddyの認証ポータル内にあるuiブロックを設定し、画面の見た目や表示内容を調整します。テンプレート、メタデータ、静的画像、ロゴ、リンク、言語、テーマを指定でき、カスタムCSS・JavaScript・HTMLヘッダーの読み込みにも対応します。カスタムテンプレートでは、セッション更新用スクリプトや継続画面の動作を保つための条件も確認できます。ユーザー変換ルールから生成するリンクは、このUI設定ではなく専用スキルの対象です。

こんなときに便利

ポータルに組織のロゴや案内リンクを表示したいとき、ページの言語やタイトルを調整したいときに使えます。独自テンプレートやCSSを追加する場合に、更新機能やクロスデバイスログイン用画面との連携条件を確認するのにも向いています。

使い方の例

  • 「ポータルにロゴと社内ドキュメントへのリンクを追加して」
  • 「ログイン画面の言語とタイトルを設定して」
  • 「カスタムテンプレートに更新スクリプトを組み込んで」

注意点

静的アセットはファイルとして用意し、assets/で始まるURIを指定します。利用できるテーマはbasicです。言語は対応値を指定する必要があります。カスタムテンプレートでは更新スクリプトや継続画面の要件を保ち、複数ポータル間のアセット共有や再読み込み時の挙動も確認してください。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

含まれるファイル(4)

  • SKILL.md9.0 KB
  • agents/openai.yaml237 B
  • references/cross-device.md4.6 KB
  • references/localization.md7.1 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Configuration Authentication UI

Published UI contract

The selected embedded portal and OIDC pages supply their themed layouts and browser color preference behavior automatically. theme basic remains the only registered Caddy theme; do not invent theme dark or theme light. Profile assets include profile/favicon.svg and profile/logo.svg. Custom static PNG assets remain supported. Avoid pinning internal hashed assets when customizing templates; inspect the selected embedded UI. Conditional flow selection and profile policy editing need no extra UI setting; see authentication flows.

The embedded apps use <mount>/profile/ (User Profile), <mount>/operator/ (Security Manager) and <mount>/documents/ (File Vault). The profile shell is always available; its APIs retain their independent enablement. Security Manager requires the admin API and an administrator role. File Vault requires an enabled, initialized Documents API and an administrator or user role; the same roles permit profile access. The portal adds links for enabled apps the user may access. Only each enabled app's exact manifest.json is public; other assets require authorization. Keep the full portal mount when routing these apps: the library supplies the HTML base path and embedded assets without separate Caddy handlers.

Purpose

Use this skill for ui blocks inside authentication portal <name> blocks.

Read these files when details matter:

  • caddyfile_authn_ui.go for accepted Caddyfile UI syntax.
  • ../go-authcrunch/pkg/authn/ui/params.go for authcrunch UI parameters.
  • ../go-authcrunch/pkg/authn/portal.go for UI defaults, template loading, static assets, theme and language validation.
  • ../go-authcrunch/pkg/authn/ui/static.go for static asset loading and content-type handling.

The surrounding portal belongs to configuration-authentication. Transform-generated ui link entries belong to configuration-authentication-user-transforms; they are separate from static links in this UI block.

Supported UI Forms

The Caddyfile ui parser supports templates, metadata, private links, static assets, themes, languages, logos, auto_redirect_url, and custom CSS, JavaScript, or HTML-header injection. Use parser-supported forms:

authentication portal myportal {
	ui {
		theme basic
		language en
		meta title "Example Authentication Portal"
		meta author "Example"
		meta description "Example sign-in portal"
		template login ui/login.template
		static_asset "assets/images/logo.png" "image/png" ui/logo.png
		logo url "/auth/assets/images/logo.png"
		logo description "Example"
		auto_redirect_url /auth/portal
		links {
			"My Identity" "/auth/whoami" icon "las la-user"
			"Docs" "https://docs.example.com/" target_blank
		}
	}
}

links entries use a title as the subdirective token and require a target URL. Optional keys are target_blank, icon <class>, and disabled.

Custom Assets

static_asset URIs must start with assets/; the content type is passed through as provided, and authcrunch loads the file from the filesystem path:

static_asset "assets/images/banner.jpg" "image/jpeg" ui/banner.jpg

Custom CSS and JavaScript are registered at fixed asset paths:

custom css path ui/custom.css
custom js path ui/custom.js

These become assets/css/custom.css and assets/js/custom.js. custom html header path <path> injects file content into the built-in templates immediately in the parser path. That injection mutates process-global template data; custom CSS/JS and static assets also use a global asset registry. Do not promise independent branding for portals registering the same asset paths or repeatable header injection across adaptations. Qualify coexistence and reload behavior before relying on that isolation; adaptation success alone does not prove it.

Do not invent UI directives from authcrunch struct fields unless caddyfile_authn_ui.go parses them. The Caddyfile parser does not currently support a top-level ui title or allow settings for role subdirective.

Cross-device Custom Templates

The selected embedded login template shows the cross-device action only when the portal enables it. Keep that action outside the ordinary provider-link visibility condition: a single local realm can hide ordinary links while still offering cross-device login. Preserve the dedicated request/confirmation pages and their embedded script instead of copying runtime assets into Caddy. Use configuration-authentication-cross-device to check explicit approval, matching-code/account display, navigation, cancellation and embedded-browser compatibility when customizing those pages. Read cross-device presentation for template hooks, clipboard feedback, keyboard focus, responsive layout and Caddy browser evidence.

Refresh-Aware Custom Templates

The built-in portal and session templates already load the matching embedded client. Custom portal templates must retain its conditional inclusion:

{{ if .Data.refresh_enabled }}
<script src="{{ pathjoin .ActionEndpoint "/assets/js/refresh.js" }}"
        data-base="{{ .ActionEndpoint }}"
        data-session="{{ .Data.refresh_session }}"
        data-expires="{{ .Data.refresh_expires }}"></script>
{{ end }}

Custom session continuation/confirmation templates use the action metadata:

<p id="session-message">{{ .Message }}</p>
{{ if eq .Data.session_action "logout" }}
<button id="session-logout" type="button">Sign out</button>
{{ end }}
<a href="{{ pathjoin .ActionEndpoint "/login" }}?fresh=1">Sign in</a>
<script src="{{ pathjoin .ActionEndpoint "/assets/js/refresh.js" }}"
        data-base="{{ .ActionEndpoint }}"
        data-action="{{ .Data.session_action }}"
        data-next="{{ .Data.session_next }}"></script>

These are fragments inside the corresponding HTML template, not Caddyfile syntax. Keep the served refresh.js name stable and use the library's AuthCrunchSession.refresh()/.logout() for custom controls. Do not substitute an independent client, inline credentials or mark untrusted return URLs safe. Session/expiry attributes are hints; the coordinator verifies signed access state before using them. Preserve the continuation page's CSP and no-store headers and offer fresh login when browser coordination is unavailable. See browser refresh for Web Locks, pending-state recovery, top-level navigation and Caddy TLS tests.

Languages

Use one language <code-or-English-name> value per line in the ui block:

ui {
	language fr
}

Omission or an exact empty value selects English. Codes and English language names are trimmed and case-insensitive at portal construction; adaptation preserves the literal value. Repeated declarations on separate lines use the last value. Extra arguments are rejected. Unsupported values fail construction; there is no request-specific Accept-Language negotiation or runtime placeholder resolution for this field.

Read localization for the supported languages, portal/OP propagation, escaped template and script messages, RTL behavior, custom-template limits and Caddy acceptance. Check the selected module's pkg/translate/language.go and data/messages.json when changing that contract.

Client Integration Patterns

Custom JavaScript can implement post-login behavior that auto_redirect_url cannot express, such as calling /whoami, checking the referrer from a /sandbox/ path, inspecting roles, and redirecting users to a role-specific dashboard. Treat such scripts as application code: review same-origin assumptions, JSON Accept headers, role checks, and failure behavior.

Fixtures

Use this fixture as the main example:

  • testdata/caddyfile_adapt/testcase_authenticate_with_ui.Caddyfile

Acceptance and qualification limits

The UI fixture proves parser/adapted JSON behavior. It does not qualify custom CSS/JS/HTML execution, missing-file failures, or simultaneous portal branding; this repository has no dedicated Caddy E2E coverage for those customizations. When changing them, verify served paths/content types, intended page inclusion, missing-input failure, and behavior across two portals and reload. Keep global asset/template effects visible rather than asserting per-portal isolation.

For custom refresh templates, preserve the embedded client's conditional script and metadata plus fresh-login recovery. Existing browser-refresh journeys cover the built-in templates; a custom template needs its own actual browser evidence.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

authentication-portal-api

無料概要あり

認証ポータルのログインやトークン更新、プロフィール、管理APIを利用するHTTPクライアントの仕様確認とトラブル対応を支援します。

  • ポータル向けJSONログインを実装したいとき
  • ブラウザーのトークン更新を調べたいとき
  • ネイティブ認証APIを扱いたいとき
greenpau/caddy-security2,2702026年10月28日 更新

break-fix-troubleshooting

無料概要あり

Caddyの認証・認可まわりで起きた設定や実行時の障害を、設定ファイル、ログ、バージョン、HTTPの証拠から切り分け、最小修正や調査報告にまとめます。

  • ログイン障害の原因を調べたいとき
  • OIDCやSAMLの失敗を切り分けたいとき
  • 最小限の設定修正を探したいとき
greenpau/caddy-security2,2702026年10月28日 更新

coding-directives

無料概要あり

caddy-securityのGoコードやCaddyモジュール、Caddyfileパーサー、HTTP連携の実装・レビューで、境界やライフサイクル、エラー処理の規約を確認するスキルです。

  • Caddyfileパーサーの変更をレビューしたいとき
  • CaddyモジュールやHTTP処理を実装したいとき
  • アプリの起動・終了処理を確認したいとき
greenpau/caddy-security2,2702026年10月28日 更新

configuration

無料概要あり

caddy-securityのCaddyfile全体を作成・点検し、認証方式に合う設定ガイドを選びながらsecurityアプリとHTTPルートを配線するスキルです。

  • Caddyfile全体を作成したいとき
  • 認証ポータルをルートに接続したいとき
  • 保護対象パスに認可ポリシーを設定したいとき
greenpau/caddy-security2,2702026年10月28日 更新

Caddyの認証ポータルとルートへの認証処理を設定し、利用するログイン元やリダイレクト先の信頼条件、更新機能などを組み立てるスキルです。

  • 認証ポータルを新しく構成したいとき
  • ログインに使うストアやプロバイダーを選びたいとき
  • 保護ルートをポータル認証につなぎたいとき
greenpau/caddy-security2,2702026年10月28日 更新

認証ポータルのCookie名や接頭辞、属性、ドメインを設定し、認可ポリシーが探すトークンCookieとの対応を整えます。

  • ポータルのCookie名を一括で変更したいとき
  • Cookie属性やドメインを調整したいとき
  • 更新トークン用Cookie名を上書きしたいとき
greenpau/caddy-security2,2702026年10月28日 更新

greenpau のスキルをすべて見る

このスキルの問題を報告する