Skip to content
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

WebApp Cert Bind - can't find cert #14671

Closed
AdamCoulterOz opened this issue Aug 5, 2020 · 1 comment
Closed

WebApp Cert Bind - can't find cert #14671

AdamCoulterOz opened this issue Aug 5, 2020 · 1 comment
Labels
needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@AdamCoulterOz
Copy link

Describe the bug

Command Name
az webapp config ssl bind

Errors:

Certificate for thumbprint 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' not found.

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • create an app service plan (premiumV2) and a web app for containers (linux), in different resource groups but same sub
  • add a verified custom domain name (cname & txt records)
  • az webapp config ssl create --resource-group {} --name {} --hostname {} # works fine
  • get the {certificate_thumbprint} from the json object output and set in next step
  • az webapp config ssl bind --resource-group {} --name {} --ssl-type SNI --certificate-thumbprint {}

Expected Behavior

Bind the managed certificate to the custom hostname in the web app.

Environment Summary

macOS-11.0-x86_64-i386-64bit
Python 3.8.5
Installer: HOMEBREW

azure-cli 2.10.0

Additional Context

I ran in debug mode and it clearly switches contexts from searching for the certificate under the webapp to the underlying server farm. Instead of running:

GET /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Web/certificates

with {rg} of the webapp, it runs:

GET /subscriptions/{sub}/resourceGroups/{other-rg}/providers/Microsoft.Web/certificates

with {other-rg} of the webapp's serverfarm when searching for the certificate by its thumbprint.

Thumbprint is also not the best ID to use here, cant we use the certificate ARM ID? e.g.

/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Web/certificates/{custom-domain-name}

as when the certificate gets rotated, it will change the thumbprint?

@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Aug 5, 2020
@triage-new-issues triage-new-issues bot removed the triage label Aug 5, 2020
@AdamCoulterOz
Copy link
Author

I think this is a duplicate of #13929

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

1 participant