簡體   English   中英

Azure Let的加密錯誤

[英]Azure Let's Encrypt error

我正按照以下說明嘗試讓Azure Let的加密站點插件為我的一個Azure網站工作:

https://gooroo.io/GoorooTHINK/Article/16420/Lets-Encrypt-Azure-Web-Apps-the-Free-and-Easy-Way/20047#.VxUIbKgrKUl

但是當我運行它時,我收到授權錯誤。 我不知道從哪里開始尋求嘗試解決這個問題,任何幫助都會受到歡迎。

錯誤如下:

Microsoft.Rest.Azure.CloudException:對象標識為“ {same id here ??} ”的客戶端“ {id} ”無權在范圍'/ subscriptions / {上執行'Microsoft.Web / sites / read'操作訂閱ID} /resourceGroups/Default-Web-NorthEurope/providers/Microsoft.Web/sites/ {sitename} '。 在Microsoft.Azure.Management.WebSites.SitesOperations.d__29.MoveNext()

更新

這是訪問Web應用程序的原則的問題。

我決定在這里跟進特洛伊狩獵演練: https//www.troyhunt.com/everything-you-need-to-know-about-loading-a-free-lets-encrypt-certificate-into-an-azure-網站/

這是非常好的 - 他使用舊的azure門戶設置活動目錄,我發現它更有用,因為我實際上可以看到發生了什么。

無論如何,我已經完成了整個過程直到實際的證書請求,現在我收到了403服務器錯誤:

The remote server returned an error: (403) Forbidden.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Net.WebException: The remote server returned an error: (403) Forbidden.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[WebException: The remote server returned an error: (403) Forbidden.]
   System.Net.HttpWebRequest.GetResponse() +1390
   ACMESharp.AcmeClient.RequestHttpPost(Uri uri, Object message) +642

[AcmeWebException: Unexpected error]
   ACMESharp.AcmeClient.AuthorizeIdentifier(String dnsIdentifier) +435
   LetsEncrypt.SiteExtension.Core.CertificateManager.Authorize(Target target) in c:\Projects\LetsEncrypt-SiteExtension\LetsEncrypt-SiteExtension\LetsEncrypt.SiteExtension.Core\CertificateManager.cs:518
   LetsEncrypt.SiteExtension.Core.CertificateManager.Auto(Target binding) in c:\Projects\LetsEncrypt-SiteExtension\LetsEncrypt-SiteExtension\LetsEncrypt.SiteExtension.Core\CertificateManager.cs:441
   LetsEncrypt.SiteExtension.Core.CertificateManager.RequestAndInstallInternal(Target target) in c:\Projects\LetsEncrypt-SiteExtension\LetsEncrypt-SiteExtension\LetsEncrypt.SiteExtension.Core\CertificateManager.cs:244
   LetsEncrypt.SiteExtension.Controllers.HomeController.Install(RequestAndInstallModel model) +604
   lambda_method(Closure , ControllerBase , Object[] ) +104
   System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +169
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
   System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +22
   System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +29
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32
   System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +50
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +225
   System.Web.Mvc.Async.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult) +10
   System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34
   System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +26
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +100
   System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
   System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +13
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +36
   System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller) +12
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +22
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +26
   System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
   System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +21
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9644037
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

添加應用程序注冊后,需要將其作為角色分配添加到具有角色“貢獻者”的資源組。

如果您忘記了這一點,您將收到以上錯誤消息。

執行此操作后,請在嘗試再次運行Lets encrypt extension之前重新啟動App Service。

對我來說,當我的ResourceGroup與我的ServicePlanResourceGroup不同時,出現了這個問題。

因此,如果這些不相等,則除了ResourceGroup之外,還需要將您創建的App注冊(您創建密鑰的clientId)添加到ServicePlanResourceGroup。

我遇到了一個新的Azure應用服務的相同問題。 原來我必須在運行Let的加密向導之前實際部署一個Web應用程序。 當空站點的默認Azure應用服務登錄頁面是內容時,向導無法完成其工作。

我遇到了完全相同的異常並按照這些步驟來解決它

  1. 導航到Azure門戶中的訂閱
  2. 選擇托管App Service的訂閱
  3. 選擇訪問控制(IAM)
  4. 添加一個新實體
  5. 選擇角色貢獻者
  6. 在服務主管后搜索
  7. 添加用戶

這立即解決了訪問權限不足的例外情況

更新按照步驟(5.注冊服務主體)確保您已登錄到正確的訂閱。 在我的情況下,我在錯誤的訂閱中創建了服務主體,因此主體未正確分配給正在使用的App Service

這是訪問的問題。 請檢查5.注冊您提到的文章的服務主體部分。 當在LetsEncrypt頁面上使用ApplicationId完成該部分時,您是否擁有相同的ApplicationId? 同樣的秘密? 檢查一下,因為看起來這個步驟有問題。

PS我剛剛檢查了那個沒有你提到的錯誤的演練。

我遇到了同樣的問題。

我通過不在Azure Let的加密站點擴展配置中指定自定義域(例如lybecker.com)來解決它,但使用完整的lybecker.onmicrosoft.com

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM