JetBrains / teamcity-azure-storage

TeamCity Azure artifacts storage support plugin
Apache License 2.0
15 stars 7 forks source link

Communication with Azure is over INSECURE HTTP #2

Closed ArturDorochowicz closed 7 years ago

ArturDorochowicz commented 7 years ago

The plugin instantiates a storage account with the constructor that causes http to be used.

The issue is in AzureUtils.kt [1] (not sure if it's the only place)

    fun getBlobClient(parameters: Map<String, String>): CloudBlobClient {
        val accountName = parameters[AzureConstants.PARAM_ACCOUNT_NAME]?.trim()
        val accountKey = parameters[AzureConstants.PARAM_ACCOUNT_KEY]?.trim()
        return CloudStorageAccount(StorageCredentialsAccountAndKey(accountName, accountKey)).createCloudBlobClient()
}

I've found it with some investigation after I got an "Invalid account key" message in the UI when trying to configure an Azure Storage Account configured to accept secure connections only.

[1] https://github.com/JetBrains/teamcity-azure-storage/blob/d9a04fd826c183897a3eb094b965685fdcee2bfa/azure-storage-common/src/main/kotlin/jetbrains/buildServer/serverSide/artifacts/azure/AzureUtils.kt#L49

dtretyakov commented 7 years ago

@ArturDorochowicz, thanks for pointing this out. It will be fixed in the next plugin build.