Skip to content

Fix proxy permission leak and redact sensitive error descriptions#4748

Open
huanghongbo-hhb wants to merge 12 commits into
koderover:mainfrom
huanghongbo-hhb:fix/sensitive-credential-leaks
Open

Fix proxy permission leak and redact sensitive error descriptions#4748
huanghongbo-hhb wants to merge 12 commits into
koderover:mainfrom
huanghongbo-hhb:fix/sensitive-credential-leaks

Conversation

@huanghongbo-hhb

@huanghongbo-hhb huanghongbo-hhb commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • restore the system admin check on the proxy list API
  • redact sensitive values from error descriptions before returning them to clients

Why

  • the proxy list endpoint could expose stored proxy credentials
  • downstream integration errors could leak credentials in URLs and raw error text

Risk / Compatibility

  • low risk: this only narrows proxy list access and masks secret values in error descriptions

Test

  • verified in UAT: non-admin proxyManage now returns 403, and Nacos/PingCode validation errors redact credentials

Contact


This change is Reviewable

Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
}

// TODO: Authroization leaks
// authorization checks

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要改这里,可能会有问题,造成普通用户无法使用代理,真的要改的话也要跟前端确认没问题后再改

nacosConfigs, err := commonservice.ListNacosConfig(j.jobSpec.NacosID, j.jobSpec.NamespaceID, j.jobSpec.GroupName, log.SugaredLogger())
if err != nil {
return fmt.Errorf("fail to list nacos config: %w", err)
return err

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

去掉描述是为什么?

Comment thread pkg/tool/nacos/error_humanizer.go Outdated
return e.cause
}

func humanizeNacosError(operation, serverAddr string, err error) error {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

日志里最好打印出来真实报错,否则debug难度增大

Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants