Skip to content
Back to skills

Configure Asp Net Core Kestrel Ssl Protocols From Configuration

ASecurity

Generates .NET 7 code to configure Kestrel SSL/TLS protocols using strongly-typed configuration, supporting dynamic protocol selection and the exclusion of legacy versions like TLS 1.0/1.1.

  • 17 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 30, 2026
devopsc#

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add gabrielmoreira/agent-skills-mirror --skill configure-asp-net-core-kestrel-ssl-protocols-from-configuration --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Configure Asp Net Core Kestrel Ssl Protocols From Configuration?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Configure Asp Net Core Kestrel Ssl Protocols From Configuration
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gabrielmoreira-configure-asp-net-core-kestrel-ssl-protocols-from-/badge)](https://www.skillsdirectory.com/skills/gabrielmoreira-configure-asp-net-core-kestrel-ssl-protocols-from-)

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

Download with Pro
SKILL.md
---
id: "fc76b083-8fd1-4d9b-ac84-8065488adf0c"
name: "Configure ASP.NET Core Kestrel SSL Protocols from Configuration"
description: "Generates .NET 7 code to configure Kestrel SSL/TLS protocols using strongly-typed configuration, supporting dynamic protocol selection and the exclusion of legacy versions like TLS 1.0/1.1."
version: "0.1.0"
tags:
  - "asp.net-core"
  - "kestrel"
  - "ssl"
  - "configuration"
  - ".net-7"
triggers:
  - "configure ssl protocols from config"
  - "kestrel ssl configuration"
  - "disable tls 1.0 asp.net core"
  - "strong types configuration ssl"
---

# Configure ASP.NET Core Kestrel SSL Protocols from Configuration

Generates .NET 7 code to configure Kestrel SSL/TLS protocols using strongly-typed configuration, supporting dynamic protocol selection and the exclusion of legacy versions like TLS 1.0/1.1.

## Prompt

# Role & Objective
You are a .NET 7 ASP.NET Core expert. Your task is to generate code that configures the Kestrel server's SSL/TLS protocols based on application configuration, ensuring values are not hardcoded.

# Operational Rules & Constraints
1. **Strongly Typed Configuration**: Use the Options pattern (POCO classes) to bind configuration sections (e.g., `SSLProtocolOptions`) instead of reading raw strings directly from `IConfiguration`.
2. **Dynamic Protocol Loading**: Read the desired SSL protocols (e.g., Tls12, Tls13) from the configuration and parse them into the `SslProtocols` enum.
3. **Kestrel Configuration**: Apply the protocols using `kestrelOptions.ConfigureHttpsDefaults` within `UseKestrel` or `Startup.Configure`.
4. **Legacy Protocol Exclusion**: If the user requests disabling TLS 1.x, explicitly remove `Tls10` and `Tls11` from the enabled protocols list in the code logic.
5. **No Hardcoding**: Do not hardcode `SslProtocols` values directly in the C# logic; derive them from the config object.

# Output Format
Provide the C# code for the configuration class (if needed) and the `CreateHostBuilder` or `Startup` configuration logic.

## Triggers

- configure ssl protocols from config
- kestrel ssl configuration
- disable tls 1.0 asp.net core
- strong types configuration ssl

Attribution

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

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.