Closed FredrikMelby closed 6 months ago
Thanks for the feedback, we were able to reproduce the error with Buypass Go SSL and a fix will be released shortly.
Thanks for very quick response and fix. Tested OK here now!
Hi again, this is not directly related to the missing header issue - but last week, BuyPass Acme API began to respond with http 400 responses (bad request). We have not made any changes on our AcmeBot setup, so I'm assuming something has changed on the BuyPass API side? Do you receive similar response codes (https://api.buypass.com/acme/directory)?
Describe the bug I'm setting up a new KV-AcmeBot solution and try to use BuyPass Go SSL as Acme API endpoint. With Buypass API configured, I only get this error message when trying to add or renew certificates: "Required header 'Accept' is not present." (See full error message stack under).
If i for example change "Acmebot:Endpoint" setting to use Lets Encrypt API instead, everything works just fine.
BuyPass Go SSL API Endpoint: https://api.buypass.com/acme/directory (Error) Let's Encrypt API Endpoint: https://acme-v02.api.letsencrypt.org/ (OK)
Function app is deployed using the "latest.zip" package.
Error message screen shot:![image](https://github.com/shibayan/keyvault-acmebot/assets/29274188/c7dc0c70-e26d-469c-b51b-221e14a3fa89)
Additional context
Error message: 2024-02-21T15:06:48.148 [Error] Executed 'MergeCertificate' (Failed, Id=89a328b0-491d-4e74-a04d-3a65aee28775, Duration=157ms)Required header 'Accept' is not present. 2024-02-21T15:06:48.152 [Error] e6d7bcb9b45442fd87f78bc14cc4c6fa:1: Function 'MergeCertificate (Activity)' failed with an error. Reason: ACMESharp.Protocol.AcmeProtocolException: Required header 'Accept' is not present.at ACMESharp.Protocol.AcmeProtocolClient.SendAcmeAsync(Uri uri, HttpMethod method, Object message, HttpStatusCode[] expectedStatuses, Boolean skipNonce, Boolean skipSigning, Boolean includePublicKey, CancellationToken cancel, String opName)at ACMESharp.Protocol.AcmeProtocolClient.GetAsync(String relativeUrl, CancellationToken cancel)at KeyVault.Acmebot.Internal.AcmeProtocolClientExtensions.GetOrderCertificateAsync(AcmeProtocolClient acmeProtocolClient, OrderDetails order, String preferredChain, CancellationToken cancel) in /home/runner/work/keyvault-acmebot/keyvault-acmebot/KeyVault.Acmebot/Internal/AcmeProtocolClientExtensions.cs:line 20at KeyVault.Acmebot.Functions.SharedActivity.MergeCertificate(ValueTuple
2 input) in /home/runner/work/keyvault-acmebot/keyvault-acmebot/KeyVault.Acmebot/Functions/SharedActivity.cs:line 434at Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker
2.InvokeAsync(Object instance, Object[] arguments) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionInvoker.cs:line 52at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.InvokeWithTimeoutAsync(IFunctionInvoker invoker, ParameterHelper parameterHelper, CancellationTokenSource timeoutTokenSource, CancellationTokenSource functionCancellationTokenSource, Boolean throwOnTimeout, TimeSpan timerInterval, IFunctionInstance instance) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 581at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithWatchersAsync(IFunctionInstanceEx instance, ParameterHelper parameterHelper, ILogger logger, CancellationTokenSource functionCancellationTokenSource) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 527at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(IFunctionInstanceEx instance, FunctionStartedMessage message, FunctionInstanceLogEntry instanceLogEntry, ParameterHelper parameterHelper, ILogger logger, CancellationToken cancellationToken) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 306. IsReplay: False.