admiracloud / admiracloud/narnia
Properly handling staging and production certificates
- 主要語言
- JavaScript
- 星號
- 0
- 分支
- 0
- PR 合併指標
- 30 天內沒有已合併 PR
描述
When using the `--staging` flag in the command `narnia ssl vistaviva.com.br --generate --staging`, the `narnia` library seems to forget about the staging scenario and it wrongly saves the certificates and updates the Nginx configuration for the informed domain.
But what it should do instead is to not update Nginx config for the informed domain, nor it should save the certificates. If it needs to save the certificates because of possible needs like verification of the generated certs, it still should erase such certificates before concluding the staging test.
The problem becomes evident when we try to execute `narnia ssl vistaviva.com.br --generate` after a successful `narnia ssl vistaviva.com.br --generate --staging`, as per the following output:
```
root@independent ~ # narnia ssl vistaviva.com.br --generate --staging
Successfully generated certificate for vistaviva.com.br
root@independent ~ # narnia ssl vistaviva.com.br --generate
Certificate for vistaviva.com.br still valid for 89 days
```
When the user asks for a "production" certificate, it wrongly considers the staging certificate files as production ones and inform that `Certificate for vistaviva.com.br still valid for 89 days`.
Initially, I see two possible solutions:
- first solution: when asking for a production certificate, try to identify if the existing one is a "staging" one
- second solution: completely erase the staging certificate after successfully generating it, and do not update Nginx configuration for the specified domain I cordially ask for your help on this issue.
I'm inclined more towards the second one.
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。