Azure naming conventions and input sanitization - issues with names derived from context names #2334
Open
5 tasks done
Labels
bug
Problem when deploying a Data Safe Haven.
✅ Checklist
💻 System information
📦 Packages
List of packages
🚫 Describe the problem
There are several places where our approach to sanitization is inconsistent.
Context names are allowed to use letters (upper and lower case), numbers, hyphens, and underscores.
Storage account names cannot use uppercase letters, underscores, or hyphens.
When creating the SHM storage account, we strip the underscores and hyphens, but leave uppercase letters alone.
Creating the storage account then fails, as the name is invalid, but our error message simply says that creating the account failed without explaining why.
We don't sanitise the name at all when creating the key vault for the account, which means that fails if there are any underscores in the context name.
Again, the error message does not point in the right direction.
The most straightforward approach is to allow only lowercase letters and numbers (possibly) for context names (i.e. only characters valid for both storage account and key vault names).
🌳 Log messages
Relevant log messages
♻️ To reproduce
Use a variety of different character types in context names.
The text was updated successfully, but these errors were encountered: