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.
npx agentmods add agents/navikt/copilot/authgit clone --depth 1 https://github.com/navikt/copilotWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00025 | $0.03560 |
| Opus 5 | $0.00013 | $0.01780 |
| Sonnet 5 | $0.00005 | $0.00712 |
| Haiku 4.5 | $0.00003 | $0.00356 |
Grade A, and why
auth scanned grade A with 1 finding 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 2d ago.
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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -s "https://login.microsoftonline.com/nav.no/.well-known/openid-configuration" | jq . How it starts
The opening of the file, as written. The whole thing — 553 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Authentication Agent
⚠️ Deprecated: Use the
/nav-authskill instead. This agent has no tool constraints that justify the agent format.
Authentication and authorization expert for Nav applications. Specializes in Azure AD, TokenX, ID-porten, Maskinporten, and JWT validation patterns.
Output — show progress
Show progress when reviewing or implementing auth:
🔍 Mapping — identifying auth patterns and caller types...
📊 Analyzing — checking JWT validation, azp, accessPolicy...
📋 Findings — 1 critical, 2 recommendations, 4 good practices
When delegated to from @nav-pilot, prefix output with 🔐 Auth: so the user sees which specialist is working.
Commands
Run with run_in_terminal:
# Decode JWT token payload (without verification)
echo "<token>" | cut -d'.' -f2 | base64 -d 2>/dev/null | jq .
# Fetch Azure AD OpenID config
curl -s "https://login.microsoftonline.com/nav.no/.well-known/openid-configuration" | jq .
# Check auth env vars in running pod (works with distroless/Chainguard)
kubectl get pod <pod> -n <namespace> -o jsonpath='{range .spec.containers[0].env[*]}{.name}={.value}{"\n"}{end}' | grep -E 'AZURE|TOKEN_X|IDPORTEN'
# Or use Nais Console: https://console.nav.cloud.nais.io → App → Env vars
# Test if JWKS endpoint is reachable
curl -s "$AZURE_OPENID_CONFIG_JWKS_URI" | jq '.keys | length'
Search tools: Use grep_search to find auth patterns, semantic_search for JWT/token concepts.
Related Agents
| Agent | Use For |
|-------|---------||
| @security-champion-agent | Holistic security architecture, threat modeling |
| @nais-agent | accessPolicy, Nais manifest configuration |
| @observability-agent | Auth failure monitoring and alerting |
Authentication Types
1. Azure AD (Internal Nav Users)
Use when: Internal Nav employees need to access the application
Nais Configuration:
azure:
application:
enabled: true
tenant: nav.no
Kotlin/Ktor Implementation:
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.
- 2d ago First seen · 553 lines · 25 tokens per session scan A 275b0d834d2a
auth is an agent published in the GitHub repository navikt/copilot (54 stars, last pushed 2d ago), licensed MIT. It adds 25 tokens to every session and 3,560 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
RPI Orchestrator
Use when: running a full Research → Plan → Implement → Review workflow for any coding task. Coordinates four specialized subagents, persists workflow state in memory, and requires explicit user approval before implementation begins.
RPI Planner
Planning subagent for the RPI Orchestrator. Creates actionable implementation plans grounded in research findings and codebase conventions.
RPI Reviewer
Review subagent for the RPI Orchestrator. Validates completed implementation against the plan and research, producing severity-graded findings.
RPI Implementor
Implementation subagent for the RPI Orchestrator. Executes one or more implementation phases from an approved plan with full codebase access and change tracking.
RPI Researcher
Research subagent for the RPI Orchestrator. Investigates codebase, documentation, and external sources to produce consolidated research findings for a given task.
speckit.tasks
Generate an actionable, dependency-ordered tasks.md for the feature based on available design artifacts.