Remove the committed connection string default and load secrets from Key Vault
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 10
- Forks
- 0
- Avg merge
- 2h 52m
- Merged PRs (30d)
- 20
Description
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-4LearnStack/Program.cs:32-33— throws only when the value is entirely absent
Proposed fix
- Remove the default from
appsettings.json; keep it inappsettings.Development.jsonor user secrets only. - Source the production connection string from Key Vault via managed identity, or use a passwordless Azure SQL connection with managed identity.
- 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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with LearnStack/appsettings.json:2-4 and LearnStack/Program.cs:32-33 to trace how the connection string is currently loaded and validated. Then review the production configuration path for Key Vault or managed identity. Done means no connection string remains in source control, production uses managed identity, and incomplete configuration produces a clear startup error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- cloud, database, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100