Automated Certificates #16
-
|
I love what you've put together, and it works awesome with Azure Container Apps. One thing I don't understand, however, is how to use the API that is noted for issuing certificates in an automated fashion. If the entire thing is configured to use Security, there's no way of hitting the function endpoint without logging in - when you try, it returns an HTML login page (as you would expect from a browser). Additionally, it looks like the endpoint that's noted does a check to ensure the user is authorized to hit the app, but in an automated environment there is no user context to be authorized. I would love to see if there is a more comprehensive information around the automated methodology in general, as my understanding of Security and Azure AD (and how it relates to Function keys) is rather limited. Finally, I do have one final question - it looks like when going through the process it always orders a new certificate. Is there a good way to request a certificate only if one does not already exist so we can use the existing one (if available) when updating the Container App? If there isn't a good solution for that, I can check for the certificate and conditionally call the endpoint to issue, but would be nicer if it was all baked into one call. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Sorry for the delay. The REST API for issuing certificates can be easily invoked by using the Host Key of Azure Functions. This behavior is the same as the Key Vault version, so please refer to that document. https://github.com/shibayan/keyvault-acmebot/wiki/REST-API Since Acmebot only uses DNS to issue certificates and upload them to the Container App Environment, it should be possible to issue certificates even if Container Apps themselves do not exist. I most likely do not understand the scenario, so please point out if I am wrong. |
Beta Was this translation helpful? Give feedback.
Sorry for the delay. The REST API for issuing certificates can be easily invoked by using the Host Key of Azure Functions. This behavior is the same as the Key Vault version, so please refer to that document.
https://github.com/shibayan/keyvault-acmebot/wiki/REST-API
https://github.com/shibayan/keyvault-acmebot/wiki/App-Role-based-authorization
Since Acmebot only uses DNS to issue certificates and upload them to the Container App Environment, it should be possible to issue certificates even if Container Apps themselves do not exist.
I most likely do not understand the scenario, so please point out if I am wrong.