Compare commits

...

2 Commits

Author SHA1 Message Date
kjh2064 b1d2c03810 fix: Revert to secure default authentication configuration
deploy / deploy (push) Successful in 2m23s
deploy / notify (push) Successful in 1s
- Restore appsettings.json Authentication.Mode to FailClosed (production default)
- Restore Program.cs IsDevelopment() check for DevelopmentHeader auth
- Restore DevelopmentHeaderAuthenticationHandler environment check
- DevelopmentHeader auth now only works in Development environment
- Production deployment uses FailClosed (secure by default)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-12 00:36:12 +09:00
kjh2064 58a8d45638 fix: Remove IsDevelopment() check from DevelopmentHeaderAuthenticationHandler
deploy / notify (push) Has been cancelled
deploy / deploy (push) Has been cancelled
- Allow DevelopmentHeader authentication regardless of environment
- Fixes 401 Unauthorized in Release mode with DevelopmentHeader config
- Configuration-driven authentication now works in all environments

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-12 00:35:34 +09:00
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -234,7 +234,8 @@ var authenticationBuilder = builder.Services
options.DefaultChallengeScheme = authenticationScheme;
});
if (authenticationMode.Equals("DevelopmentHeader", StringComparison.OrdinalIgnoreCase))
if (builder.Environment.IsDevelopment()
&& authenticationMode.Equals("DevelopmentHeader", StringComparison.OrdinalIgnoreCase))
{
authenticationBuilder.AddScheme<AuthenticationSchemeOptions, DevelopmentHeaderAuthenticationHandler>(
authenticationScheme,
+1 -1
View File
@@ -16,7 +16,7 @@
}
},
"Authentication": {
"Mode": "DevelopmentHeader"
"Mode": "FailClosed"
},
"Capabilities": {
"AutomaticOrder": false,