Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自定义扫描任务TOKEN没有展示到页面 #2646

Closed
LordofAvernus opened this issue Sep 30, 2024 · 2 comments
Closed

自定义扫描任务TOKEN没有展示到页面 #2646

LordofAvernus opened this issue Sep 30, 2024 · 2 comments
Assignees
Labels
bug Something isn't working publish-pre3 verified the issue all pr is verified
Milestone

Comments

@LordofAvernus
Copy link
Collaborator

LordofAvernus commented Sep 30, 2024

版本信息(Version)

3.2408.0

问题描述(Describe)

智能扫描06版本升级后,页面只能看到启动scanner的命令,无法直接获取到token。自定义扫描任务需要使用方自行对接,所以页面/接口均没有返回对应的TOKEN,导致执行上传SQL时无法通过校验

截图或日志(Log)

image

如何复现(To Reproduce)

  1. 创建自定义扫描任务
  2. 手动调用接口( /:project_name/audit_plans/:audit_plan_id/sqls/upload)上传SQL

问题原因

自定义扫描任务没有返回token

解决方案

  • 页面/接口提供token返回值
    --host=<IP> --port=<port> --project=default --audit_plan_id=3 --token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcG4iOiJjNGNhNDIzOGEwYjkyMzgyMGRjYzUwOWE2Zjc1ODQ5YiIsImV4cCI6MTc1NzQxNDczMSwiaXNzIjoiYWN0aW9udGVjaCBkbXMiLCJ1aWQiOiI3MDAyMDAifQ.S0hqwpdBCBHbXgeb1o3sTKmQdxoCeNs1k5hqiNSrOIQ
    临时解决方案:
    从数据库中instance_audit_plans表中查询到token字段

变更影响面

  • SQL管控配置-详情

受影响的模块或功能

  • SQL管控配置

外部引用的潜在问题或风险

版本兼容性

测试建议

@LordofAvernus LordofAvernus added the bug Something isn't working label Sep 30, 2024
@ColdWaterLW ColdWaterLW added this to the v3.2410.0 milestone Sep 30, 2024
@ColdWaterLW ColdWaterLW changed the title 自定义扫描任务TOKEN校验失败 自定义扫描任务TOKEN没有展示到页面 Oct 10, 2024
@littleniannian
Copy link
Collaborator

littleniannian commented Oct 21, 2024

@LordofAvernus

  • 智能扫描06版本升级后,页面只能看到启动scanner的命令,无法直接获取到token 这个描述的功能在页面的哪里?
  • 截图中的go run upload_sql是个什么功能?
  • 期望在哪个页面/接口返回token?

@taolx0
Copy link
Collaborator

taolx0 commented Nov 5, 2024

--host=127.0.0.1 --port=10000 --project=700300 --audit_plan_id=3 --token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcG4iOiJjODFlNzI4ZDlkNGMyZjYzNmYwNjdmODljYzE0ODYyYyIsImV4cCI6MTc2MjMyNDQzMSwiaXNzIjoiYWN0aW9udGVjaCBkbXMiLCJ1aWQiOiI3MDAyMDAifQ.kmikb_GfEo2rcO7wexpdsYsZJIyC4-OnytZDPM8wfMo

cus1

@taolx0 taolx0 added the verified the issue all pr is verified label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working publish-pre3 verified the issue all pr is verified
Projects
None yet
Development

No branches or pull requests

4 participants