Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Saml Pro

ASecurity

Deploy SAML SSO securely — assertion hardening, metadata management, and defense against signature and XML attacks.

2 stars
0 votes
0 copies
0 views
Added 9/29/2026
ai-agentsrustgotestingdebuggingsecurity

Security Analysis

A100/100

Scanned 9/29/2026

$npx -y skills add aicodedecode/awesome-muse-skills --skill saml-pro --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Saml Pro?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Saml Pro
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aicodedecode-saml-pro/badge)](https://www.skillsdirectory.com/skills/aicodedecode-saml-pro)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: saml-pro
description: Deploy SAML SSO securely — assertion hardening, metadata management, and defense against signature and XML attacks.
category: security
---

## Overview

SAML 2.0 remains the backbone of enterprise SSO, federating authentication between identity providers (IdPs) and service providers (SPs) via signed XML assertions. Its XML complexity is also its risk: signature-wrapping, XXE, and assertion-manipulation vulnerabilities have a long history. Defensive SAML practice is strict validation and minimal trust.

This skill covers secure SAML deployment: hardening assertions, managing metadata and certificates, and defending against the known vulnerability classes — from the defender's side.

SAML's XML complexity is a historical source of subtle vulnerabilities — which is why the defensive posture is radical simplicity: use a maintained library, validate strictly, trust minimally, and test the negative cases deliberately. Every SAML integration that 'just works' without negative testing is carrying unverified assumptions about what it rejects.

## When to use

- Implementing SAML SSO for enterprise applications (as SP or IdP).
- Reviewing an existing SAML integration flagged in a pentest or audit.
- Rotating SAML signing certificates without breaking SSO.
- Troubleshooting SSO failures securely (without weakening validation to "make it work").

## Core concepts

- **Trust model:** the SP trusts assertions signed by the IdP's key, for the expected audience, within validity windows. Every element of that trust must be validated — signature, issuer, audience, timestamps, conditions.
- **Assertion validation checklist:** valid XML signature over the expected elements, trusted signing certificate, correct Issuer, AudienceRestriction matching your entity ID, NotBefore/NotOnOrAfter enforced with small clock skew, and no duplicate or unexpected attributes trusted blindly.
- **Known attack classes (defend against):** signature wrapping (signature validates but assertion content differs — validate what you verify), XXE in XML parsing (disable external entities/DTD), assertion replay (enforce OneTimeUse / short validity + session tracking), and IdP key confusion.
- **Metadata:** exchange via signed, TLS-fetched metadata; pin expected entity IDs and certificates; treat metadata refresh as a security-sensitive process.
- **Certificate rotation:** dual-publish new certificates in metadata before cutover; monitor both; retire old only after confirming no traffic uses it.
- **AuthnContext:** request and honor appropriate assurance levels (e.g., require MFA context for sensitive apps); do not accept a weaker context than policy demands.

- **Single logout (SLO) complexity.** SLO across federated apps is notoriously fragile — decide explicitly whether you need it, and if so, test every binding; many deployments are safer with well-managed session lifetimes instead.
- **Attribute authority hardening.** If group memberships drive authorization, the IdP's attribute source (directory, HR system) is a security boundary — protect its provisioning pipeline accordingly.
- **Federation with external partners.** Cross-organization SAML multiplies trust complexity — pin metadata, limit attribute release, and review partner integrations on a schedule.

## Practical workflow

1. **Design the integration:** choose IdP/SP roles, define required attributes (minimal — NameID plus what the app needs), and the assurance level (MFA required?).
2. **Exchange metadata securely:** fetch over TLS, verify signatures where provided, and pin entity IDs. Never accept unsigned metadata from an untrusted channel.
3. **Implement strict validation:** use a well-maintained SAML library (never hand-rolled XML signature validation); enforce the full validation checklist; disable DTD/external entities in the XML parser.
4. **Harden the SP:** validate assertions before creating sessions; map attributes defensively (do not trust email as immutable identity without IdP guarantees); set sane session lifetimes independent of assertion validity.
5. **Test the negative cases:** expired assertions, wrong audience, tampered attributes, replayed assertions, and unsigned responses must all be rejected — test these in staging deliberately.
6. **Operate:** monitor SSO failures and anomalies (spikes in failures can indicate attacks or breakage); rotate signing certs with dual-publish; keep an IdP-initiated vs SP-initiated inventory and disable unused bindings.

### SAML validation checklist (SP side)

- [ ] XML signature valid, from the pinned IdP certificate, covering the assertion
- [ ] Issuer matches expected IdP entity ID; Audience matches SP entity ID
- [ ] Timestamps enforced (NotBefore/NotOnOrAfter, ≤5 min skew)
- [ ] InResponseTo matches the outstanding request (SP-initiated)
- [ ] OneTimeUse honored; replayed assertion IDs rejected
- [ ] XML parser hardened: no external entities, no DTD processing
- [ ] Attributes mapped minimally; privileged roles never derived from unvalidated attributes

### Sustaining the practice

- Re-run negative-case tests after every library or IdP upgrade
- Monitor federation metadata expiry and signature validity
- Review attribute mappings annually — apps accumulate trusted attributes over time
- Keep a runbook for IdP outages: how do users work when SSO is down?

### Metrics that prove it works

- Certificate-expiry incidents (target: zero, via dual-publish monitoring)
- SSO failure anomaly rate (spikes investigated)
- Negative-case test coverage in staging (rejection tests passing)
- Metadata freshness across all integrations

## Common pitfalls

- **Hand-rolled signature validation.** XML signature validation is notoriously subtle — use maintained libraries, never custom code.
- **Validating the signature but using unverified content.** Signature-wrapping attacks exploit exactly this gap: verify that what you validated is what you consume.
- **Ignoring AudienceRestriction.** Accepting assertions meant for another SP enables cross-application attacks.
- **Weakening validation to fix integration issues.** "Just disable audience checking until it works" becomes permanent. Fix the config, not the validation.
- **No certificate rotation plan.** Expired IdP/SP certs cause company-wide SSO outages. Dual-publish and monitor.
- **Trusting attributes for authorization blindly.** Group/role attributes drive access — ensure they come from the trusted IdP and cannot be self-asserted.
- **IdP-initiated SSO left enabled unused.** Every enabled binding is attack surface. Disable IdP-initiated flows where SP-initiated suffices.
- **Clock-skew failures blamed on users.** Intermittent SSO failures are often clock drift, not user error. Monitor skew and set sane tolerances.
- **Debugging by disabling validation in production.** Temporary validation bypasses for troubleshooting have a way of becoming permanent. Debug in staging with logging, never by weakening production checks.
- **Ignoring the NameID format.** Mismatched or unstable NameIDs cause account-linking bugs and potential impersonation. Pin the expected format and treat changes as security events.

Attribution

aicodedecodeaicodedecode
View sourceSee grades on GitHubMore from aicodedecode →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →