MCPcopy Create free account
hub / github.com/bytebase/bytebase / redactExchangeTokenResponse

Function redactExchangeTokenResponse

backend/api/v1/audit.go:616–621  ·  view source on GitHub ↗

redactExchangeTokenResponse drops the issued Bytebase access token. Logging it would give anyone with audit-log read access a valid API token for the workload identity. Returns an empty response so the audit entry still records that the call happened.

(r *v1pb.ExchangeTokenResponse)

Source from the content-addressed store, hash-verified

614// workload identity. Returns an empty response so the audit entry still
615// records that the call happened.
616func redactExchangeTokenResponse(r *v1pb.ExchangeTokenResponse) *v1pb.ExchangeTokenResponse {
617 if r == nil {
618 return nil
619 }
620 return &v1pb.ExchangeTokenResponse{}
621}
622
623func redactCreateUserRequest(r *v1pb.CreateUserRequest) *v1pb.CreateUserRequest {
624 if r == nil {

Callers 1

getResponseStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected