Skip to content
cccskills
FreePublished on GitHub

configuration-sso-app

Configure a portal SAML single sign-on app in Caddy, including its AWS driver, role naming, metadata URLs, certificate, and PKCS8 private key. It helps check provider and portal settings while keeping external SAML login configuration separate.

OriginalShow the original description

Configure portal-provided SAML SSO apps, AWS role names, metadata, certificates, and PKCS8 keys. Use for sso provider blocks and their runtime limits; external SAML login providers are separate.

greenpau/caddy-security2,270 stars(GitHub 2,270 + cccskills 0)
Works withAWS

Run score Not tested

See how to install

Good for

  • Setting up a portal SAML SSO app
  • Checking AWS role names and portal provider settings
  • Preparing SAML metadata URLs and key files

Files included (2)

  • SKILL.md6.2 KB
  • agents/openai.yaml191 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

Configuration SSO App

Purpose

Use this skill to configure the SSO app feature, expressed in Caddyfile as sso provider <name>. This is the Single Sign-On with SAML app path, not OAuth login provider setup.

External OAuth/OIDC login belongs to configuration-oauth-providers. External saml identity provider <name> login belongs to configuration-saml-providers. Those are separate configurations, not prerequisites for an SSO app change.

The Caddyfile syntax is authoritative in caddyfile_sso_provider.go; the provisioning behavior is authoritative in the selected go-authcrunch module, especially pkg/sso/config.go, pkg/sso/provider.go, pkg/sso/request.go, pkg/sso/metadata.go, and pkg/authn/handle_http_apps_sso.go.

Shape

{
	security {
		local identity store localdb {
			realm local
			path assets/config/users.json
		}

		sso provider aws {
			entity_id caddy-authp-idp
			driver aws
			cert assets/sso/authp_saml.crt
			private key assets/sso/authp_saml.key
			location https://example.com/auth/apps/sso/aws
		}

		authentication portal myportal {
			enable identity store localdb
			enable sso provider aws
		}
	}
}

The provider name must be unique and must match the portal's enable sso provider <name> value.

Supported Fields

The current Caddyfile parser supports only these lines:

  • disabled
  • entity_id <name> mapped to authcrunch entity_id
  • driver aws mapped to authcrunch driver
  • cert <path> mapped to authcrunch cert_path
  • private key <path> mapped to authcrunch private_key_path
  • location <url> appended to authcrunch locations

Although driver is syntactically optional in the Caddyfile parser, generate driver aws. go-authcrunch rejects an empty driver and currently supports only aws.

At least one location <url> is required by the Caddyfile parser, even for a disabled provider. Multiple locations are allowed and become SAML SingleSignOnService entries in generated metadata. Authcrunch embeds each configured location verbatim, so use the externally reachable SSO POST URL, including any portal base-path prefix such as /auth.

The certificate file must be PEM with block type CERTIFICATE. The private key file must be PEM with block type PRIVATE KEY and parse as a PKCS8 private key. Do not use RSA PRIVATE KEY examples unless the underlying authcrunch parser changes.

If a provider is marked disabled, it is not added to the authcrunch configuration. Do not enable a disabled provider from a portal; authcrunch validation expects enabled portal SSO provider names to have matching provider configuration.

Portal URLs And Roles

The auth portal recognizes SSO app endpoints by the /apps/sso/<provider> path inside the portal route. With the common /auth portal base path used by this repo's configs and fixtures, external URLs are usually under /auth/apps/sso/<provider>:

/auth/apps/sso/aws
/auth/apps/sso/aws/metadata.xml
/auth/apps/sso/aws/assume/<account_id>/<role_name>

If the authenticate route is mounted at a different base path, keep that prefix in the external URL. go-authcrunch/pkg/sso/request.go parses the first /apps/sso/ segment in the request path, so /custom/apps/sso/aws and /auth/apps/sso/aws both map to provider aws.

Use <base-path>/apps/sso/<provider>/metadata.xml when a SAML service needs generated IdP metadata. The configured location values are embedded in that metadata as HTTP-POST SSO service locations.

Current authcrunch handling requires an authenticated portal session before serving the SSO menu, metadata, or assume-role endpoint. Despite the metadata handler comment, no admin role check is implemented for metadata in handle_http_apps_sso.go.

For AWS role selection, user roles must use this shape:

aws/<account_id>/<role_name>

For example, a local user might have:

roles authp/user aws/123456789012/Administrator

The selected authcrunch assume-role handler returns a placeholder response for <base-path>/apps/sso/<provider>/assume/.... Do not promise complete AWS federation behavior from configuration alone unless the handler implementation changes.

Review Checklist

Check generated SSO app entries against these code-backed constraints:

  • Use sso provider <name>, not oauth identity provider <name>.
  • Keep SSO provider names unique; authcrunch server provisioning rejects duplicates.
  • Include entity_id, driver aws, cert, private key, and at least one location.
  • cert points to a PEM certificate file.
  • private key points to a PKCS8 PEM private key file.
  • The location URL is the service endpoint that should appear in SAML metadata, including the portal base path, usually /auth/apps/sso/<provider> on the auth portal host.
  • The portal enables the same provider name with enable sso provider <name>.
  • The portal has at least one identity store or login identity provider; SSO app providers do not count as authentication backends.
  • Any AWS roles assigned to users use aws/<account_id>/<role_name>.
  • No unsupported provider fields are generated.

Fixtures

Use these examples:

  • caddyfile_sso_provider.go for accepted Caddyfile subdirectives.
  • caddyfile_sso_provider_test.go for parser examples and expected adapted JSON.
  • go-authcrunch/pkg/sso/config_test.go for authcrunch validation behavior.
  • go-authcrunch/pkg/sso/request_test.go for SSO URL parsing behavior.

The Caddy parser tests establish field mapping, not certificate loading or an AWS federation journey. This checkout has no app-side SAML SSO E2E. A local runtime check should verify that readable certificate/PKCS8 inputs produce the configured metadata URLs, unauthenticated requests redirect to login, and an authenticated session can obtain metadata. Report the assume-role placeholder as unavailable federation behavior; a successful HTTP 200 containing ASSUME ROLE is not an AWS login.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Build or troubleshoot HTTP clients for an authentication portal’s JSON login, token refresh, Documents, profile, and admin APIs. The skill explains request and response contracts, browser and native transports, and public signing-key discovery so clients can interact with the configured portal correctly.

  • Implement a JSON login client for a portal
  • Troubleshoot browser or native token refresh
  • Call profile, Documents, or admin endpoints
greenpau/caddy-security2.3KUpdated Oct 28, 2026

Investigate caddy-security deployment and runtime failures using configuration, logs, version details, and HTTP evidence. The skill helps identify a focused correction or document an unresolved issue with a useful handoff, while keeping observed facts separate from hypotheses and redacting secrets.

  • Diagnosing login, callback, or authorization failures
  • Finding a minimal correction for a Caddy configuration
  • Preparing a redacted break-fix issue report
greenpau/caddy-security2.3KUpdated Oct 28, 2026

Use these conventions to implement or review caddy-security Go code, Caddy modules, Caddyfile parsers, and HTTP integrations. Keep app boundaries and lifecycle behavior clear, delegate authentication logic to go-authcrunch, and handle errors and logs safely.

  • Reviewing a Caddyfile parser change
  • Adding a Caddy module or HTTP handler
  • Checking app lifecycle and cleanup behavior
greenpau/caddy-security2.3KUpdated Oct 28, 2026

configuration

FreeSummary

Build or review caddy-security Caddyfiles by starting with the security app and wiring authenticate or authorize routes to named portals and policies. Use its domain map to find focused guidance for the requested login, provider, storage, or integration setup.

  • Drafting a complete caddy-security Caddyfile
  • Wiring portal authentication into routes
  • Connecting authorization policies to protected paths
greenpau/caddy-security2.3KUpdated Oct 28, 2026

Configure Caddy authentication portals and connect them to protected routes. Select login backends, set trusted login and logout redirect rules, and wire portal behavior such as refresh and Documents storage while relying on focused skills for specialized settings.

  • Create a portal and connect it to protected routes
  • Choose which identity stores and providers can log in
  • Set trusted login and logout redirect destinations
greenpau/caddy-security2.3KUpdated Oct 28, 2026

Set authentication portal cookie names, prefixes, domains, paths, and browser attributes, including refresh-cookie overrides. The guidance explains naming precedence, validation, and how authorization policies must explicitly discover matching token cookies.

  • Giving portal cookies a shared prefix
  • Overriding one cookie name
  • Setting cookie paths and domains
greenpau/caddy-security2.3KUpdated Oct 28, 2026

See all skills by greenpau

Report a problem with this skill