[GH-ISSUE #947] [Bug] 宝塔WAF部署控制台证书失败 #649

Closed
opened 2026-03-03 01:04:57 +03:00 by kerem · 4 comments
Owner

Originally created by @NikoCat233 on GitHub (Sep 3, 2025).
Original GitHub issue: https://github.com/certimate-go/certimate/issues/947

软件版本 / Release Version

v0.3.26

缺陷描述 / Description

宝塔WAF版本为v6.4

Image

[2025-09-03 15:22:05]
ready to deploy certificate ...
config:
{"certificate":"K395xtaDsTy6vQb628z39#certificate","provider":"baotawaf-console","providerAccessId":"3bo3e6zroh0xpqg","skipOnLastSucceeded":true}
[2025-09-03 15:22:06]
sdk request 'bt.ConfigSetCert'
request:
{"certContent":"-----BEGIN CERTIFICATE-----\n\n-----END CERTIFICATE-----","keyContent":"-----BEGIN RSA PRIVATE KEY-----\n\n-----END RSA PRIVATE KEY-----"}
response:
{"code":-1}
[2025-09-03 15:22:06]
failed to deploy certificate
[2025-09-03 15:22:06]
failed to execute sdk request 'bt.ConfigSetCert': sdkerr: unexpected status code: 400, resp: {"code":-1,"res":"Token not provide","nonce":1756884126}

复现步骤 / Steps to reproduce

上述信息描述已完备

日志 / Logs

宝塔waf可见的日志
["2025-09-03 15:22:06","POST",400,"/api/config/set_cert","***",1,5394,81,"certimate"]

2025/09/03 15:22:06 [ERROR] token_md5: ec9eb0a0ce3152b9eb0de6ee7------d
2025/09/03 15:22:06 [ERROR] requestTime: 1756884125ec9eb0a0ce3152b9eb0de6ee7------d
2025/09/03 15:22:06 [ERROR] token_md5: 97b9983502478ff7e77a9f8e0------3 requestToken: 97b9983502478ff7e77a9f8e0------3

Certimate可见日志在上述已给出

其他 / Miscellaneous

No response

贡献 / Contribution

  • 我乐意为此贡献 PR! / I am interested in contributing a PR for this!
Originally created by @NikoCat233 on GitHub (Sep 3, 2025). Original GitHub issue: https://github.com/certimate-go/certimate/issues/947 ### 软件版本 / Release Version v0.3.26 ### 缺陷描述 / Description 宝塔WAF版本为v6.4 <img width="841" height="581" alt="Image" src="https://github.com/user-attachments/assets/d2e596b5-1515-450f-b1f6-4229ab46e93c" /> [2025-09-03 15:22:05] ready to deploy certificate ... config: {"certificate":"K395xtaDsTy6vQb628z39#certificate","provider":"baotawaf-console","providerAccessId":"3bo3e6zroh0xpqg","skipOnLastSucceeded":true} [2025-09-03 15:22:06] sdk request 'bt.ConfigSetCert' request: {"certContent":"-----BEGIN CERTIFICATE-----\n\n-----END CERTIFICATE-----","keyContent":"-----BEGIN RSA PRIVATE KEY-----\n\n-----END RSA PRIVATE KEY-----"} response: {"code":-1} [2025-09-03 15:22:06] failed to deploy certificate [2025-09-03 15:22:06] failed to execute sdk request 'bt.ConfigSetCert': sdkerr: unexpected status code: 400, resp: {"code":-1,"res":"Token not provide","nonce":1756884126} ### 复现步骤 / Steps to reproduce 上述信息描述已完备 ### 日志 / Logs 宝塔waf可见的日志 ["2025-09-03 15:22:06","POST",400,"/api/config/set_cert","***",1,5394,81,"certimate"] 2025/09/03 15:22:06 [ERROR] token_md5: ec9eb0a0ce3152b9eb0de6ee7------d 2025/09/03 15:22:06 [ERROR] requestTime: 1756884125ec9eb0a0ce3152b9eb0de6ee7------d 2025/09/03 15:22:06 [ERROR] token_md5: 97b9983502478ff7e77a9f8e0------3 requestToken: 97b9983502478ff7e77a9f8e0------3 Certimate可见日志在上述已给出 ### 其他 / Miscellaneous _No response_ ### 贡献 / Contribution - [ ] 我乐意为此贡献 PR! / I am interested in contributing a PR for this!
kerem 2026-03-03 01:04:57 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@NikoCat233 commented on GitHub (Sep 3, 2025):

api请求确实是正确的,感觉像是宝塔waf的问题,过会再看看

<!-- gh-comment-id:3248074497 --> @NikoCat233 commented on GitHub (Sep 3, 2025): api请求确实是正确的,感觉像是宝塔waf的问题,过会再看看
Author
Owner

@NikoCat233 commented on GitHub (Sep 3, 2025):

Image

宝塔waf暂未开放设置控制台证书接口。
通过api接口的验证后还会被验证Authorization Bearer,不符合api设计的预期,是宝塔waf的问题。

<!-- gh-comment-id:3248127326 --> @NikoCat233 commented on GitHub (Sep 3, 2025): <img width="841" height="635" alt="Image" src="https://github.com/user-attachments/assets/2f651dd1-bc39-46a7-bf46-f485468bcaca" /> 宝塔waf暂未开放设置控制台证书接口。 通过api接口的验证后还会被验证Authorization Bearer,不符合api设计的预期,是宝塔waf的问题。
Author
Owner

@NikoCat233 commented on GitHub (Sep 3, 2025):

等宝塔waf适配了

<!-- gh-comment-id:3248333639 --> @NikoCat233 commented on GitHub (Sep 3, 2025): 等宝塔waf适配了
Author
Owner

@bt-dev2 commented on GitHub (Sep 9, 2025):

#https://github.com/aaPanel/aaWAF/issues/113
已经兼容

<!-- gh-comment-id:3270997571 --> @bt-dev2 commented on GitHub (Sep 9, 2025): #https://github.com/aaPanel/aaWAF/issues/113 已经兼容
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/certimate#649
No description provided.