dotnet-api-security

Implements comprehensive API security for ASP.NET Core applications.

71|10|Updated Feb 11, 2026
One-click install
npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-api-security-wshaddix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-api-security
Source: https://github.com/wshaddix/dotnet-skills/tree/main/skills/dotnet-api-security
Command: npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-api-security-wshaddix

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the critical need to secure ASP.NET Core Web APIs by implementing robust authentication, authorization, and protection against common web vulnerabilities.

Core Features & Use Cases

  • Authentication: Implement ASP.NET Core Identity, OAuth/OIDC, and JWT bearer token authentication.
  • Authorization: Configure policy-based authorization and secure endpoints.
  • Security Headers & Policies: Set up CORS, Content Security Policy (CSP), and other security headers.
  • Rate Limiting: Protect APIs from abuse with various rate-limiting strategies.
  • Passkeys: Integrate modern passwordless authentication using WebAuthn.
  • Use Case: Secure a public-facing API by implementing JWT bearer authentication for authenticated users and rate limiting to prevent abuse, while also configuring CORS to allow specific frontend origins.

Quick Start

Configure JWT bearer authentication for your ASP.NET Core API using the provided code examples.

Frequently Asked Questions about dotnet-api-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement JWT bearer authentication in an ASP.NET Core Web API?

JWT bearer authentication in ASP.NET Core is implemented by configuring authentication middleware to validate token signatures and claims. This Skill provides code examples to set up JWT bearer tokens, securing API endpoints for authenticated users.

What is the best way to secure an ASP.NET Core API against brute-force attacks?

Securing an ASP.NET Core API against brute-force attacks is best achieved through rate limiting strategies. This Skill configures rate limiting to protect API endpoints from abuse and mitigate common vulnerabilities like cross-site scripting.

Can I use passkeys and WebAuthn for passwordless authentication in ASP.NET Core?

Yes, you can use passkeys and WebAuthn for passwordless authentication in ASP.NET Core. This Skill integrates modern WebAuthn passkeys alongside ASP.NET Core Identity, OAuth/OIDC, and JWT bearer tokens.

How do I configure CORS policies and CSP headers for a .NET API?

Configuring CORS policies and CSP headers for a .NET API involves setting up specific security middleware. This Skill implements Content Security Policy headers and CORS origins to protect public-facing APIs from cross-site scripting.

Does this Skill support policy-based authorization for ASP.NET Core endpoints?

Yes, this Skill supports policy-based authorization for ASP.NET Core endpoints. It configures authorization policies to secure endpoints, integrating seamlessly with JWT bearer authentication and ASP.NET Core Identity.