Cloud Confusing

Explaining hosting, AWS, Wordpress, static sites, and all manner of cloud solutions.

Are you seeing a message like, “Make Sure The Value of Authorization Header Is Formed…” and not sure what do to about it.

A popular, and confusing, error on some websites goes something like”Make sure the value of Authorization header is formed correctly including the signature” but having seen this message (or a bug report containing this message, it’s easy to be left confused.

The key is to read further down the message and see what is contained in the “AuthenticationErrorDetail” snippet which comes a bit later in the same error message. This might read something like, “The MAC signature found in the HTTP request [something] is not the same as computed signature”.

Long story short, this is usually an authentication failure for Azure Blob Storage.

A lot of things can cause this problem, like an encoding issue on the data being set to storage or an incorrectly generated shared access signature (SAS) token. Similarly an incorrect account key or even a mismatch in your system time could case an error like this.

Common Causes

First of all, it’s possible that you have failed to use Base64 encoding with the stringtosign. You will need to review your app and make sure that the stringtosign is being sent in Base64.

Microsoft explains the process you need to follow here, in the Storage Services API docs.

Second, your StringToSign might be out of date. If it was renewed, but you have a hardcoded keys, it’s possible that the signature is failing because the keys have fallen out of date and the result is an authentication failure. Confirm your AccessKey is correct and regenerate as required.

Third, the client may have used the incorrect StringToSign to sign the authorization header. The above docs have a recommended fix for this as well.

This is a brief set of recommendations, but in my experience they will do the trick so we’ll keep it pretty short. Have suggestions or improvements? Or did this not work for you? Please email me!

April 6th, 2024

Posted In: Web Development

© 2022 | Privacy Policy | About | UTM Creator | CVE Reporting