azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

WebApp: az webapp config ssl create has inconsistent output between Linux and Windows

Open jlienSage opened this issue 5 years ago • 7 comments

Describe the bug

The command az webapp config ssl create outputs the following on Windows:

{
  "canonicalName": "something.com",
  "cerBlob": null,
  "expirationDate": "2021-07-13T23:59:59+00:00",
  "friendlyName": "",
  "hostNames": [
    "something.com"
  ],
  "hostingEnvironmentProfile": null,
  "id": "",
  "issueDate": "2021-01-14T00:00:00+00:00",
  "issuer": "GeoTrust TLS DV RSA Mixed SHA256 2020 CA-1",
  "keyVaultId": "",
  "keyVaultSecretName": "",
  "keyVaultSecretStatus": "Initialized",
  "kind": null,
  "location": "West US",
  "name": "something.com",
  "password": null,
  "publicKeyHash": null,
  "resourceGroup": "my-rg",
  "selfLink": null,
  "serverFarmId": null,
  "siteName": null,
  "subjectName": "something.com",
  "tags": null,
  "thumbprint": "",
  "type": "Microsoft.Web/certificates",
  "valid": null
}

Linux:

{
  "id": "",
  "location": "West US",
  "name": "something.com",
  "properties": {
    "canonicalName": "something.com",
    "cerBlob": null,
    "expirationDate": "2021-07-13T23:59:59+00:00",
    "friendlyName": "",
    "hostNames": [
      "something.com"
    ],
    "hostingEnvironment": null,
    "hostingEnvironmentProfile": null,
    "issueDate": "2021-01-14T00:00:00+00:00",
    "issuer": "GeoTrust TLS DV RSA Mixed SHA256 2020 CA-1",
    "keyVaultId": "",
    "keyVaultSecretName": "",
    "keyVaultSecretStatus": "Initialized",
    "password": null,
    "pfxBlob": null,
    "publicKeyHash": null,
    "resourceGroup": "my-rg",
    "selfLink": null,
    "serverFarmId": null,
    "siteName": null,
    "subjectName": "something.com",
    "tags": null,
    "thumbprint": "",
    "toDelete": null,
    "valid": null,
    "webSpace": "my-rg-WestUSwebspace"
  },
  "resourceGroup": "my-rg",
  "type": "Microsoft.Web/certificates"
}

Command Name az webapp config ssl create

To Reproduce:

Run az webapp config ssl create.

Expected Behavior

Output is the same on both platforms.

Environment Summary

WSL (Ubuntu)

Linux-4.19.104-microsoft-standard-x86_64-with-debian-bullseye-sid
Python 3.6.10
Installer: DEB

azure-cli 2.17.1

Windows

Windows-10-10.0.19041-SP0
Python 3.6.8
Installer: MSI

azure-cli 2.17.1

Additional Notes

az webapp config ssl show has the same output as az webapp config ssl create does Windows on both platforms.

jlienSage avatar Jan 14 '21 23:01 jlienSage

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzureAppServiceCLI, @antcp.

Issue Details

Describe the bug

The command az webapp config ssl create outputs the following on Windows:

{
  "canonicalName": "something.com",
  "cerBlob": null,
  "expirationDate": "2021-07-13T23:59:59+00:00",
  "friendlyName": "",
  "hostNames": [
    "something.com"
  ],
  "hostingEnvironmentProfile": null,
  "id": "",
  "issueDate": "2021-01-14T00:00:00+00:00",
  "issuer": "GeoTrust TLS DV RSA Mixed SHA256 2020 CA-1",
  "keyVaultId": "",
  "keyVaultSecretName": "",
  "keyVaultSecretStatus": "Initialized",
  "kind": null,
  "location": "West US",
  "name": "something.com",
  "password": null,
  "publicKeyHash": null,
  "resourceGroup": "my-rg",
  "selfLink": null,
  "serverFarmId": null,
  "siteName": null,
  "subjectName": "something.com",
  "tags": null,
  "thumbprint": "",
  "type": "Microsoft.Web/certificates",
  "valid": null
}

Linux:

{
  "id": "",
  "location": "West US",
  "name": "something.com",
  "properties": {
    "canonicalName": "something.com",
    "cerBlob": null,
    "expirationDate": "2021-07-13T23:59:59+00:00",
    "friendlyName": "",
    "hostNames": [
      "something.com"
    ],
    "hostingEnvironment": null,
    "hostingEnvironmentProfile": null,
    "issueDate": "2021-01-14T00:00:00+00:00",
    "issuer": "GeoTrust TLS DV RSA Mixed SHA256 2020 CA-1",
    "keyVaultId": "",
    "keyVaultSecretName": "",
    "keyVaultSecretStatus": "Initialized",
    "password": null,
    "pfxBlob": null,
    "publicKeyHash": null,
    "resourceGroup": "my-rg",
    "selfLink": null,
    "serverFarmId": null,
    "siteName": null,
    "subjectName": "something.com",
    "tags": null,
    "thumbprint": "",
    "toDelete": null,
    "valid": null,
    "webSpace": "my-rg-WestUSwebspace"
  },
  "resourceGroup": "my-rg",
  "type": "Microsoft.Web/certificates"
}

Command Name az webapp config ssl create

To Reproduce:

Run az webapp config ssl create.

Expected Behavior

Output is the same on both platforms.

Environment Summary

WSL (Ubuntu)

Linux-4.19.104-microsoft-standard-x86_64-with-debian-bullseye-sid
Python 3.6.10
Installer: DEB

azure-cli 2.17.1

Windows

Windows-10-10.0.19041-SP0
Python 3.6.8
Installer: MSI

azure-cli 2.17.1

Additional Notes

az webapp config ssl show has the same output as az webapp config ssl create does Windows on both platforms.

Author: jlienSage
Assignees: -
Labels:

Service Attention, Web Apps, needs-triage, question

Milestone: -

ghost avatar Jan 15 '21 01:01 ghost

route to appropriate team

yungezz avatar Jan 15 '21 01:01 yungezz

@panchagnula - CLI command receives this response in different formats for Linux and Windows Apps from API. Could you please check and respond if this is not an expected behavior.

Kotasudhakarreddy avatar Jan 21 '21 04:01 Kotasudhakarreddy

@jlienSage is this the diff b/w Linux & windows or re-creating an existing certificate with the same canonical name? I am guessing the "properties" section is the difference you are referring to here?

panchagnula avatar Jan 21 '21 04:01 panchagnula

@jlienSage is this the diff b/w Linux & windows or re-creating an existing certificate with the same canonical name? I am guessing the "properties" section is the difference you are referring to here?

@panchagnula Yes, the difference is between the Linux and Windows versions of Az CLI. On Windows, creating a certificate only has the properties section as output while Linux has more information. However, the command az webapp config ssl show has the same behavior on both platforms, only returning the properties section.

jlienSage avatar Jan 21 '21 16:01 jlienSage

@panchagnula Just sending you a gentle reminder on this issue.

Kotasudhakarreddy avatar Apr 06 '21 07:04 Kotasudhakarreddy

Unable to repro. I tested today with the latest version of the CLI (2.45.0) on both WSL and windows. az webapp config ssl create always seems to return a message saying "Managed Certificate creation in progress..." and nothing else (no JSON)

Edit: it looks like JSON is returned if you rerun the create command on a cert that was already created. Still unable to repro because the output is the same across linux/windows now.

StrawnSC avatar Feb 09 '23 23:02 StrawnSC