mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
revert(coderd): "Merge commit from fork" (#25273)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
5b87d7b74f
commit
9400eaa957
@@ -8,8 +8,6 @@ import (
|
||||
|
||||
"github.com/mitchellh/mapstructure"
|
||||
|
||||
"cdr.dev/slog/v3"
|
||||
|
||||
"github.com/coder/coder/v2/coderd/awsidentity"
|
||||
"github.com/coder/coder/v2/coderd/azureidentity"
|
||||
"github.com/coder/coder/v2/coderd/database/dbauthz"
|
||||
@@ -40,17 +38,9 @@ func (api *API) postWorkspaceAuthAzureInstanceIdentity(rw http.ResponseWriter, r
|
||||
VerifyOptions: api.AzureCertificates,
|
||||
})
|
||||
if err != nil {
|
||||
// Log the full error for operators but return only a
|
||||
// generic message to the caller. Errors from the
|
||||
// certificate fetch path may contain fragments of
|
||||
// internal HTTP responses, so exposing them would be
|
||||
// an information disclosure risk.
|
||||
api.Logger.Warn(ctx, "azure identity validation failed",
|
||||
slog.Error(err),
|
||||
)
|
||||
httpapi.Write(ctx, rw, http.StatusUnauthorized, codersdk.Response{
|
||||
Message: "Invalid Azure identity.",
|
||||
Detail: "Signature verification failed.",
|
||||
Detail: err.Error(),
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user