Skip to content

system-server-0.1.34

@hysyeah hysyeah tagged this 30 Apr 07:04
Avoid leaking access tokens, signatures, and authentication headers via
logs while preserving the existing log statements for debugging.

- Add pkg/utils/redact.go with RedactedHeader / DumpRequestRedacted /
  DumpRequestOutRedacted / DumpResponseRedacted helpers that strip
  Authorization, Cookie, X-Auth-Signature and similar sensitive headers
  and never include the request/response body.
- permission/v1alpha1/register.go: drop the SHA256 signature print which
  was effectively logging a valid request signature.
- permission/v1alpha1/access.go: stop logging the raw AccessTokenRequest
  (contained the bcrypt-compared Token); log only AppKey + timestamp.
- permission/v2alpha1/lldap.go & authn.go: stop printing the LLDAP
  token-verify response body / parsed claims.
- serviceproxy/v1alpha1/proxy.go & apiserver legacy handler: route
  request/response dumps through the redacting helpers (no body) and
  redact incoming header maps before logging.
- serviceproxy/v1alpha1/types.go: add ProxyRequest.SafeString() and use
  it in proxy/dispatcher logs so the access Token, AppKey-bound payload,
  and user-supplied Param/Data are never serialized into logs.

Made-with: Cursor
Assets 2
Loading