configuration-authentication-cookies

configuration-authentication-cookies is a skill for Codex from greenpau/caddy-security. It costs 34 tokens per session (3,735 once invoked), scanned A, original, Apache-2.0.

A configuration guide for the browser cookies used by an authentication portal, including their names, prefixes, domains, paths, security attributes, and refresh overrides. Cookies are small values that a browser sends back to a website to preserve session information.

In plain words
What is it for?
Use it to set consistent cookie names and prefixes, control where cookies apply, and coordinate session, redirect, identity, access, and refresh cookies.
Why use it?
It explains cookie roles and replacement behavior, helping prevent naming conflicts and incorrect token discovery between authentication and authorization.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to set consistent cookie names and prefixes, control where cookies apply, and coordinate session, redirect, identity, access, and refresh cookies.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/greenpau/caddy-security/configuration-authentication-cookies
About the project

caddy-security is a security application and set of plugins for Caddy v2, a web server, that handles user authentication and controls access to HTTP requests. It supports methods including local, LDAP, OpenID Connect, OAuth 2.0, SAML, JWT, and PASETO, and is used to protect web services behind Caddy.

greenpau/caddy-security · 2,263 stars · on GitHub · authcrunch.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add greenpau/caddy-security --skill configuration-authentication-cookies
Clone the repo
git clone --depth 1 https://github.com/greenpau/caddy-security

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for configuration-authentication-cookies

README.md
[![agentmods](https://agentmods.dev/badge/skills/greenpau/caddy-security/configuration-authentication-cookies/github.svg)](https://agentmods.dev/skills/greenpau/caddy-security/configuration-authentication-cookies)
Your own site
<a href="https://agentmods.dev/skills/greenpau/caddy-security/configuration-authentication-cookies"><img src="https://agentmods.dev/badge/skills/greenpau/caddy-security/configuration-authentication-cookies/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for configuration-authentication-cookies

Your own site · 80×15
<a href="https://agentmods.dev/skills/greenpau/caddy-security/configuration-authentication-cookies"><img src="https://agentmods.dev/badge/skills/greenpau/caddy-security/configuration-authentication-cookies.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,735 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00034 $0.03735
Opus 5.5 $0.00014 $0.01494
Sonnet 5.5 $0.00007 $0.00747
Haiku 4.5 $0.00003 $0.00374

Measured today against content hash 32c9cd9f6c18, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

configuration-authentication-cookies scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.codex/skills/configuration-authentication-cookies/SKILL.md · 359 lines

How it starts

The opening of the file, as written. The whole thing — 359 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Configuration Authentication Cookies

Contract and Sources

Portal cookie statements are collected in caddyfile_authn.go. The thin translation in caddyfile_authn_cookie.go preserves legacy Caddy spellings; pkg/authn/cookie/parser.NewCookieConfigFromDirectives in the AuthCrunch version selected by go.mod owns grammar, normalization, duplicates, and validation. PortalConfig.ConfigureCookies installs one complete validated snapshot. It replaces previous cookie settings, rather than merging individual lines. Portal construction wires the final access name into its grantor and validator.

Portal wiring belongs to configuration-authentication and policy behavior to configuration-authorization. Upstream source is read-only.

Set Every Default Name with One Prefix

authentication portal myportal {
    enable identity store localdb
    set cookie name prefix PORTAL
}

That one statement covers all ten roles:

Role Effective cookie name
Session ID PORTAL_SESSION_ID
Referer/redirect URL PORTAL_REDIRECT_URL
Sandbox ID PORTAL_SANDBOX_ID
Identity token PORTAL_ID_TOKEN
Access token PORTAL_ACCESS_TOKEN
Refresh token PORTAL_REFRESH_TOKEN
OIDC session ID PORTAL_OIDC_SESSION_ID
OIDC request ID PORTAL_OIDC_REQUEST_ID
SAML session ID PORTAL_SAML_SESSION_ID
Cross-device session ID PORTAL_CROSS_DEVICE_SESSION_ID

set cookie name prefix portal preserves the legacy uppercasing behavior. The shared spelling cookie prefix PORTAL preserves the supplied case. With neither statement, every role uses the same suffix with AUTHP_. For initialized Go configs, call SetCookieNamePrefix; assigning CookieNamePrefix directly does not rename already initialized fields.

The SAML session cookie binds a SAML login to its initiating browser. It uses host-only scope, path /, Secure, HttpOnly, SameSite=None and a 300-second lifetime. Its name participates in shared prefix, override and collision checks; changing its name does not weaken SAML state or assertion validation.

Read the full file on GitHub · 359 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 359 lines · 34 tokens per session scan A 32c9cd9f6c18

Subscribe to this mod's changes

configuration-authentication-cookies is a skill published in the GitHub repository greenpau/caddy-security (2,263 stars, last pushed today), licensed Apache-2.0. It adds 34 tokens to every session and 3,735 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-25.

Related

Other skills, from other repositories

auth-patterns

Use when implementing authentication (JWT, sessions, OAuth), authorization (RBAC, ABAC), password hashing, MFA, or security best practices for backend services.

MadAppGang/claude-code · 36 tokens

implementing-jwt-signing-and-verification

JSON Web Tokens (JWT) defined in RFC 7519 are compact, URL-safe tokens used for authentication and authorization in web applications. This skill covers implementing secure JWT signing with HMAC-SHA256.

xalgorix/xalgorix · 50 tokens

API Security Testing

Comprehensive API security testing based on OWASP API Security Top 10 including broken authentication, injection attacks, rate limiting, BOLA/BFLA vulnerabilities, and automated security scanning with ZAP and custom scripts.

PramodDutta/qaskills · 46 tokens

jwt

Development guide for the jwt JSON Web Token library for Go (github.com/kataras/jwt). Use this skill when signing or verifying JWTs, choosing a signing algorithm (HMAC, RSA, RSA-PSS, ECDSA, EdDSA), reading or validating standard or custom claims, setting expiry and clock-skew tolerance, rotating keys with a kid-based…

kataras/jwt · 107 tokens

configuring-oauth2-authorization-flow

Configure secure OAuth 2.0 authorization flows including Authorization Code with PKCE, Client Credentials, and Device Authorization Grant. This skill covers flow selection, PKCE implementation, token.

26zl/cybersec-toolkit · 44 tokens

theauth

Install and use theAuth (@glinr/theauth), the TypeScript auth SDK for AI agents and humans. Use when adding agent identity, scoped permissions, delegation, audit logs, human sign-in plugins, or an MCP OAuth 2.1 authorization server to a Node, Bun, Deno or edge project.

glincker/theauth · 67 tokens