Skip to content
代码片段 群组 项目

feat: Avoid use the secret value in the DevOps scm verify API.

已合并 Calvin Yu requested to merge github/fork/mangoGoForward/fix/avoid-secret-value into master

Created by: mangoGoForward

Signed-off-by: mango xu.weiKyrie@foxmail.com

What type of PR is this?

/kind feature

What this PR does / why we need it:

Please see #2893 (closed)

Which issue(s) this PR fixes:

Fixes #2893 (closed)

Special notes for reviewers:

The request Payload screenshot like below:

image

Does this PR introduced a user-facing change?

None

Additional documentation, usage docs, etc.:

合并请求报告

合并者: avatar (2月 21, 2025 5:51下午 UTC)

Loading

动态

过滤活动
  • 批准
  • 指派人和审核者
  • 评论(来自机器人)
  • 评论(来自用户)
  • 提交和分支
  • 编辑
  • 标记
  • 锁定状态
  • 提及
  • 合并请求状态
  • 跟踪
  • Calvin Yu
  • Calvin Yu
  • 作者 Owner

    Created by: LinuxSuRen

    Review: Changes requested

    I got some problems when I test this PR manually.

    image

    image

    Sorry about I didn't provide clear information about the API. See https://github.com/kubesphere/ks-devops/pull/439

    The API takes secret and secretNamespace as the query parameters instead of payload.

    The second problem is that I didn't get any tips when there is an error code. It will make users feel confused.

    Sorry again for the inconvenience. I'll try to fix it based on your PR.

  • 作者 Owner

    Created by: mangoGoForward

    The API takes secret and secretNamespace as the query parameters instead of payload.

    Sorry, I have not noticed that the API use query parameters instead of payload, but the API method is POST, may use query body better.

    The second problem is that I didn't get any tips when there is an error code. It will make users feel confused.

    I will check.

  • 作者 Owner

    Created by: LinuxSuRen

    hi @mangoGoForward thanks for helping us to figure out the difference between the secret type. See the corresponding PR https://github.com/kubesphere/ks-devops/pull/487/files

  • 作者 Owner

    Created by: LinuxSuRen

    I found out the front-end still call the following API which expose the password

    image

  • 作者 Owner

    Created by: mangoGoForward

    I found out the front-end still call the following API which expose the password

    image

    Seems can hide in this API, we use scmType, secret name and namespaces to instead of data.password now.

  • 作者 Owner

    Created by: LinuxSuRen

    Seems can hide in this API, we use scmType, secret name and namespaces to instead of data.password now.

    It would be better.

  • 作者 Owner

    Created by: LinuxSuRen

    Give the upstream project go-scm does not support listing repositories from a user or organization for now. I guess this PR needs to be held.

    /hold

  • 作者 Owner

    Created by: LinuxSuRen

    Please feel free to use the following image if you want to help to test this PR:

    surenpi/ks-console:latest@sha256:449d6ffacf2ab3a9984b106cb93c028e152ca6ab508e6a6f1039167e6264b5ef
  • 作者 Owner

    Created by: LinuxSuRen

    Review: Approved

    I have tested it manually. It works well with the last commit. See the following screenshot:

    image

    /lgtm /approve

  • 作者 Owner

    Created by: ks-ci-bot

    LGTM label has been added.

    Git tree hash: 6699886bc150ae5c318730ee205cc20d459dba74

  • 作者 Owner

    Created by: LinuxSuRen

    /unhold

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • 注册登录再回复
    加载中