Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Remove the committed connection string default and load secrets from Key Vault

未关闭
#51 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
azure, csharp

调研方向

从 LearnStack/appsettings.json:2-4 和 LearnStack/Program.cs:32-33 开始,跟踪当前如何加载和验证连接字符串。然后检查使用 Key Vault 或 managed identity 的生产配置路径。完成标准是源代码管理中不再保留连接字符串,生产环境使用 managed identity,并且不完整的配置会产生明确的启动错误。

由索引模型根据 Issue 内容生成。

描述

enhancement

Tier 2 — configuration

Problem

appsettings.json ships a LocalDB connection string as the default. In production this is dead weight at best; at worst, if the environment variable is missing, the app starts and tries to reach a database that does not exist rather than failing loudly with a clear message.

Evidence
  • LearnStack/appsettings.json:2-4
  • LearnStack/Program.cs:32-33 — throws only when the value is entirely absent
Proposed fix
  1. Remove the default from appsettings.json; keep it in appsettings.Development.json or user secrets only.
  2. Source the production connection string from Key Vault via managed identity, or use a passwordless Azure SQL connection with managed identity.
  3. Fail fast at startup with an actionable message when configuration is incomplete.
Acceptance criteria
  • No connection string in source control
  • Production connects with managed identity
  • Missing configuration produces a clear startup error
主要语言
HTML
星标
10
派生
0
平均合并
2 小时 35 分钟
30 天内合并 PR
21

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

kasuken/LearnStack 的其他 Issue

查看 kasuken/LearnStack 的全部 Issue

相似的 Issue

更多 Cloud Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。