-
Notifications
You must be signed in to change notification settings - Fork 463
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
Device certificate does not renew #5787
Comments
Similar to the edge CA, the device ID certificate is not reissued unless requested. This can be manually triggered by |
@onalante-msft are you saying that iotedge will not automatically renew the decice ID cert after it expires? |
@onalante-msft, after some testing, I think it is related to: Azure/iot-identity-service#300. On my EST Server, I see the error messages:
And IoT Edge keeps trying to renew (and fail). |
@curua2008 Yes, unfortunately this is the current state of affairs. @ksaye That is the tracking issue for this feature, you are correct. The reason why |
This issue is being marked as stale because it has been open for 30 days with no activity. |
I think this issue is important to be addressed because at least based on our testing, there is no other way to recover other than to restart the runtime. Restart of the Edge Agent or Edge Hub modules does not seem to be enough. I collected some relevant logs here when the system is in a state where the device id certificate is expired. Interestingly, the Edge Hub was still able to connect to the IoT Hub (I don't understand why), but any module deployments failed. Restart of Edge Agent worked from the Azure portal but as mentioned, this didn't trigger recovery (renewal of the device id certificate). In our case, the EST server credentials were valid (even when the device id certificate had expired) so restarting the runtime triggered reprovision via DPS (we have The challenge in the recovery is that if someone doesn't have SSH or other remote access to the devices, it might be difficult to trigger the recovery behavior. |
We have implemented a configurable auto-renewal of the device ID and EST identity certs. The option is available here for device identity certs: And here for EST identity certs: Note that this feature isn't released yet and will go in a future release. However, you can try it out now by downloading the latest packages from iot-identity-service. |
Expected Behavior
When using EST certificate providers like GlobalSign or DigiCert, IoT Edge should renew the Device ID certificate when it expires.
This happens when we have the device certificate setting in confim.toml as show below:
Current Behavior
iotedge was able to obtain a device certificate from EST server as shown below
Device certificate expired after 2 days
No certificate renewal happens
and i noticed several error in iotedge system logs as below after the certificate expired.
Steps to Reproduce
Provide a detailed set of steps to reproduce the bug.
Context (Environment)
Host OS [e.g. Ubuntu 18.04, Windows Server IoT 2019]: Ubuntu 18.04
Architecture [e.g. amd64, arm32, arm64]: amd64
Container OS [e.g. Linux containers, Windows containers]: Linux
Output of
iotedge check
Device Information
Host OS [e.g. Ubuntu 18.04, Windows Server IoT 2019]: Ubuntu 18.04
Architecture [e.g. amd64, arm32, arm64]: amd64
Container OS [e.g. Linux containers, Windows containers]: Linux
Runtime Versions
iotedge 1.2.420211006.4
aziot-edged [run iotedge version]: https://github.com/Azure/iot-identity-service/suites/3964124249/artifacts/99607813
Edge Agent [image tag (e.g. 1.0.0)]:
Edge Hub [image tag (e.g. 1.0.0)]:
Docker/Moby [run docker version]:
Note: when using Windows containers on Windows, run
docker -H npipe:////./pipe/iotedge_moby_engine version
insteadLogs
aziot-edged logs
edge-agent logs
edge-hub logs
Additional Information
Please provide any additional information that may be helpful in understanding the issue.
The text was updated successfully, but these errors were encountered: