You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/11/21 04:10:21 UTC

[GitHub] [apisix] jiahui1988 opened a new issue, #8365: bug: 导入自建证书后,通过接口查看为空!

jiahui1988 opened a new issue, #8365:
URL: https://github.com/apache/apisix/issues/8365

   ### Current Behavior
   
   1: 导入证书:
   <img width="1670" alt="image" src="https://user-images.githubusercontent.com/75962736/202963756-1bb07e5c-6e5f-414e-8a1a-eb5039343773.png">
   
   <img width="1613" alt="image" src="https://user-images.githubusercontent.com/75962736/202963437-544f3e4f-086a-46f7-aa2f-9f7008277377.png">
   
   
   2:查看证书:
        curl "http://127.0.0.1:9180/apisix/admin/ssls" -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1'
   
         {"list":[],"total":0}
   
   ### Expected Behavior
   
   _No response_
   
   ### Error Logs
   
   _No response_
   
   ### Steps to Reproduce
   
   随便生成一个整数,导入后就是这个效果
   
   ### Environment
   
   apisix:3.0


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] mscb402 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
mscb402 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321491192

   I think I know what happens. The apisix-dashboard currently does not support apisix 3.0.
   apisix 3.0 current change `/apisix/admin/ssl/{id}` to `/apisix/admin/ssls/{id}`. But the old version apisix-dashboard still upload the certificate to `/apisix/admin/ssl/`. So you can get a certificate from etcd but can't get one from APIs


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] mscb402 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
mscb402 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321523518

   > SNIS exists in the response struct. But `validity_start` and `validity_end` these two fields do not, These two fields are coming from apisix-dashboard.
   
   But you should set the SNIs manually when creating a certificate.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] mscb402 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
mscb402 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321471944

   Emm, this is so weird. Please waiting. Let me try it


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] mscb402 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
mscb402 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321497625

   Please try again. Using API to create a cert: https://apisix.apache.org/docs/apisix/admin-api/#ssl


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] jiahui1988 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
jiahui1988 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321463670

   <img width="1623" alt="image" src="https://user-images.githubusercontent.com/75962736/202967658-bcee2647-bc6c-4392-b8e2-a2d750427edf.png">
   2:点击配置


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] mscb402 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
mscb402 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321459161

   Look like it write to ETCD not correctly. Can you see the certificate after refreshing this webpage?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] jiahui1988 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
jiahui1988 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321465588

   > Look like it write to ETCD not correctly. Can you see the certificate after refreshing this webpage? It shouldn't be listed in the webpage If not written successfully.
   
   但是从前端console调试上看,是有相应的


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] jiahui1988 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
jiahui1988 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321463119

   > Can you see the certificate after refreshing this webpage
   
   刷新网页也是一样的。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] mscb402 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
mscb402 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321791314

   It might take a little more time


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] jiahui1988 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
jiahui1988 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321466705

   > Look like it write to ETCD not correctly. Can you see the certificate after refreshing this webpage? It shouldn't be listed in the webpage If not written successfully.
   
   dan但从前端console调试看是有响应的。
   <img width="1675" alt="image" src="https://user-images.githubusercontent.com/75962736/202968213-bb814ace-c7bb-4801-b699-0eb5f6fdb02b.png">
   那为啥调用这个接口,显示Key不存在呢?     curl "http://127.0.0.1:9180/apisix/admin/ssls/423343078246449861" -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1'
   
   {"message":"Key not found"}


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] jiahui1988 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
jiahui1988 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321471317

   > curl "http://127.0.0.1:9180/apisix/admin/ssl/423343078246449861" -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1'
   
   <img width="1260" alt="image" src="https://user-images.githubusercontent.com/75962736/202969175-6026e004-c594-4b4a-8188-84ed96677ba1.png">
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] jiahui1988 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
jiahui1988 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321463404

   > > Can you see the certificate after refreshing this webpage
   > 
   > 刷新网页也是一样的。
   
    1: 刷新网页


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] jiahui1988 closed issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
jiahui1988 closed issue #8365: bug: 导入自建证书后,通过接口查看为空!
URL: https://github.com/apache/apisix/issues/8365


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] jiahui1988 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
jiahui1988 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321492100

   >


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] mscb402 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
mscb402 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321602210

   You should copy the certificate file and replace the new line with `\n`, then post it to API
   <img width="1393" alt="image" src="https://user-images.githubusercontent.com/11229089/202994448-94366cfa-9234-49d2-8b47-ac3ba5c09f0e.png">
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] mscb402 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
mscb402 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321470622

   Sorry, I misunderstood. Look like writing to etcd is correct. But API access is wrong. Can you try access 
   ` curl "http://127.0.0.1:9180/apisix/admin/ssl/423343078246449861" -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1'`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] jiahui1988 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
jiahui1988 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321448952

   1: etcd中查询存在证书
    
   <img width="656" alt="image" src="https://user-images.githubusercontent.com/75962736/202965195-89e3e625-3357-4cb5-8cc6-dd2bf01c56b9.png">
   
   2: 通过接口查询, 提示不存在key
   curl "http://127.0.0.1:9180/apisix/admin/ssls/423343078246449861" -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1'
   
   {"message":"Key not found"}


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] jiahui1988 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
jiahui1988 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321513712

   > Please try again. Using API to create a cert: https://apisix.apache.org/docs/apisix/admin-api/#ssl
   如果用这个api,响应中 没有"snis" ,"validity_start" "validity_end"等字段?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] jiahui1988 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
jiahui1988 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321583626

   > > SNIS exists in the response struct. But `validity_start` and `validity_end` these two fields do not, These two fields are coming from apisix-dashboard.
   > 
   > But you should set the SNIs manually when creating a certificate.
   
   原生的证书格式是:
   <img width="641" alt="image" src="https://user-images.githubusercontent.com/75962736/202993020-3b150631-21b8-4bad-b470-5d2b564acd99.png">
   类似这种多行的,貌似报错,需要将多行用\n来填充成一行?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] mscb402 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
mscb402 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321496719

   Using `/apisix/admin/ssls` to create a certificate isn't work? Now you can only create a certificate from API and get it from API.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] mscb402 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
mscb402 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321521677

   SNIS exists in the response struct. But `validity_start` and `validity_end` these two fields do not, These two fields are coming from apisix-dashboard.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] mscb402 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
mscb402 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321594420

   是的


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] gudieaofei commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
gudieaofei commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321788913

   When apisix-dashboard will support apisix 3?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] jiahui1988 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
jiahui1988 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321465847

   
   
   
   > Look like it write to ETCD not correctly. Can you see the certificate after refreshing this webpage? It shouldn't be listed in the webpage If not written successfully.
   
   但是从前端console调试上看,是有响应的


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] jiahui1988 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
jiahui1988 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321463833

   > 
   
   <img width="1680" alt="image" src="https://user-images.githubusercontent.com/75962736/202967755-eeac43c2-f2e4-45f2-a4c4-5918884f9ed6.png">
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] jiahui1988 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
jiahui1988 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321493875

   > I think I know what happens. The apisix-dashboard currently does not support apisix 3.0. apisix 3.0 current change `/apisix/admin/ssl/{id}` to `/apisix/admin/ssls/{id}`. But the old version apisix-dashboard still upload the certificate to `/apisix/admin/ssl/`. So you can get a certificate from etcd but can't get one from APIs
   
   不通过apisix-dashboard调用。而通过apisix的接口调用 /apisix/admin/ssls/{id},现在看也是拿不到数据的。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] jiahui1988 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
jiahui1988 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321493242

   > I think I know what happens. The apisix-dashboard currently does not support apisix 3.0. apisix 3.0 current change `/apisix/admin/ssl/{id}` to `/apisix/admin/ssls/{id}`. But the old version apisix-dashboard still upload the certificate to `/apisix/admin/ssl/`. So you can get a certificate from etcd but can't get one from APIs现在通过调用api /apisix/admin/ssls/{id}是不行的。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] jiahui1988 commented on issue #8365: bug: 导入自建证书后,通过接口查看为空!

Posted by GitBox <gi...@apache.org>.
jiahui1988 commented on issue #8365:
URL: https://github.com/apache/apisix/issues/8365#issuecomment-1321596216

   > yes
   
   貌似。利用API不能上传证书文件。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org