Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
MIT License
2.68k stars 5.11k forks source link

Web: Wrong shape of response to PUT request to /sites/config/web #13401

Open mikhailshilkov opened 3 years ago

mikhailshilkov commented 3 years ago

I'm making a PUT request to a Microsoft.Web/sites/config/web resource, e.g. /resourceGroups/rg4a3feff9/providers/Microsoft.Web/sites/myapp/config/web endpoint. However, the response (see below) to this request has the shape of /sites endpoint (note the id is wrong, type is wrong, location is present, etc.)

In particular, we rely on the id response which is clearly wrong.

{
   "id":"/subscriptions/***/resourceGroups/rg4a3feff9/providers/Microsoft.Web/sites/app2fd4926a",
   "name":"app2fd4926a",
   "type":"Microsoft.Web/sites",
   "location":"East US 2",
   "properties":{
      "numberOfWorkers":1,
      "defaultDocuments":[
         "Default.htm",
         "Default.html",
         "Default.asp",
         "index.htm",
         "index.html",
         "iisstart.htm",
         "default.aspx",
         "index.php",
         "hostingstart.html"
      ],
      "netFrameworkVersion":"v4.0",
      "phpVersion":"5.6",
      "pythonVersion":"",
      "nodeVersion":"",
      "powerShellVersion":"",
      "linuxFxVersion":"",
      "windowsFxVersion":null,
      "requestTracingEnabled":false,
      "remoteDebuggingEnabled":false,
      "remoteDebuggingVersion":null,
      "httpLoggingEnabled":false,
      "azureMonitorLogCategories":null,
      "acrUseManagedIdentityCreds":false,
      "acrUserManagedIdentityID":null,
      "logsDirectorySizeLimit":35,
      "detailedErrorLoggingEnabled":false,
      "publishingUsername":"$app2fd4926a",
      "publishingPassword":null,
      "appSettings":null,
      "azureStorageAccounts":{

      },
      "metadata":null,
      "connectionStrings":null,
      "machineKey":null,
      "handlerMappings":null,
      "documentRoot":null,
      "scmType":"None",
      "use32BitWorkerProcess":true,
      "webSocketsEnabled":false,
      "alwaysOn":true,
      "javaVersion":null,
      "javaContainer":null,
      "javaContainerVersion":null,
      "appCommandLine":"",
      "managedPipelineMode":"Integrated",
      "virtualApplications":[
         {
            "virtualPath":"/",
            "physicalPath":"site\\wwwroot",
            "preloadEnabled":true,
            "virtualDirectories":null
         }
      ],
      "winAuthAdminState":0,
      "winAuthTenantState":0,
      "customAppPoolIdentityAdminState":false,
      "customAppPoolIdentityTenantState":false,
      "runtimeADUser":null,
      "runtimeADUserPassword":null,
      "loadBalancing":"LeastRequests",
      "routingRules":[

      ],
      "experiments":{
         "rampUpRules":[

         ]
      },
      "limits":null,
      "autoHealEnabled":false,
      "autoHealRules":null,
      "tracingOptions":null,
      "vnetName":"",
      "vnetRouteAllEnabled":false,
      "vnetPrivatePortsCount":0,
      "siteAuthEnabled":false,
      "siteAuthSettings":{
         "enabled":null,
         "configVersion":null,
         "unauthenticatedClientAction":null,
         "tokenStoreEnabled":null,
         "allowedExternalRedirectUrls":null,
         "defaultProvider":null,
         "clientId":null,
         "clientSecret":null,
         "clientSecretSettingName":null,
         "clientSecretCertificateThumbprint":null,
         "issuer":null,
         "allowedAudiences":null,
         "additionalLoginParams":null,
         "isAadAutoProvisioned":false,
         "aadClaimsAuthorization":null,
         "googleClientId":null,
         "googleClientSecret":null,
         "googleClientSecretSettingName":null,
         "googleOAuthScopes":null,
         "facebookAppId":null,
         "facebookAppSecret":null,
         "facebookAppSecretSettingName":null,
         "facebookOAuthScopes":null,
         "gitHubClientId":null,
         "gitHubClientSecret":null,
         "gitHubClientSecretSettingName":null,
         "gitHubOAuthScopes":null,
         "twitterConsumerKey":null,
         "twitterConsumerSecret":null,
         "twitterConsumerSecretSettingName":null,
         "microsoftAccountClientId":null,
         "microsoftAccountClientSecret":null,
         "microsoftAccountClientSecretSettingName":null,
         "microsoftAccountOAuthScopes":null
      },
      "cors":null,
      "push":null,
      "apiDefinition":null,
      "apiManagementConfig":null,
      "autoSwapSlotName":null,
      "localMySqlEnabled":false,
      "managedServiceIdentityId":null,
      "xManagedServiceIdentityId":null,
      "ipSecurityRestrictions":[
         {
            "ipAddress":"Any",
            "action":"Allow",
            "priority":1,
            "name":"Allow all",
            "description":"Allow all access"
         }
      ],
      "scmIpSecurityRestrictions":[
         {
            "ipAddress":"Any",
            "action":"Allow",
            "priority":1,
            "name":"Allow all",
            "description":"Allow all access"
         }
      ],
      "scmIpSecurityRestrictionsUseMain":false,
      "http20Enabled":true,
      "minTlsVersion":"1.2",
      "scmMinTlsVersion":"1.0",
      "ftpsState":"AllAllowed",
      "preWarmedInstanceCount":0,
      "functionAppScaleLimit":0,
      "healthCheckPath":null,
      "fileChangeAuditEnabled":false,
      "functionsRuntimeScaleMonitoringEnabled":false,
      "websiteTimeZone":null,
      "minimumElasticInstanceCount":0
   }
}
WillooWisp commented 3 years ago

I experience the same problem, when can we expect a fix?

ghost commented 3 years ago

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

Issue Details
I'm making a PUT request to a `Microsoft.Web/sites/config/web` resource, e.g. `/resourceGroups/rg4a3feff9/providers/Microsoft.Web/sites/myapp/config/web` endpoint. However, the response (see below) to this request has the shape of `/sites` endpoint (note the `id` is wrong, `type` is wrong, `location` is present, etc.) In particular, we rely on the `id` response which is clearly wrong. ``` { "id":"/subscriptions/***/resourceGroups/rg4a3feff9/providers/Microsoft.Web/sites/app2fd4926a", "name":"app2fd4926a", "type":"Microsoft.Web/sites", "location":"East US 2", "properties":{ "numberOfWorkers":1, "defaultDocuments":[ "Default.htm", "Default.html", "Default.asp", "index.htm", "index.html", "iisstart.htm", "default.aspx", "index.php", "hostingstart.html" ], "netFrameworkVersion":"v4.0", "phpVersion":"5.6", "pythonVersion":"", "nodeVersion":"", "powerShellVersion":"", "linuxFxVersion":"", "windowsFxVersion":null, "requestTracingEnabled":false, "remoteDebuggingEnabled":false, "remoteDebuggingVersion":null, "httpLoggingEnabled":false, "azureMonitorLogCategories":null, "acrUseManagedIdentityCreds":false, "acrUserManagedIdentityID":null, "logsDirectorySizeLimit":35, "detailedErrorLoggingEnabled":false, "publishingUsername":"$app2fd4926a", "publishingPassword":null, "appSettings":null, "azureStorageAccounts":{ }, "metadata":null, "connectionStrings":null, "machineKey":null, "handlerMappings":null, "documentRoot":null, "scmType":"None", "use32BitWorkerProcess":true, "webSocketsEnabled":false, "alwaysOn":true, "javaVersion":null, "javaContainer":null, "javaContainerVersion":null, "appCommandLine":"", "managedPipelineMode":"Integrated", "virtualApplications":[ { "virtualPath":"/", "physicalPath":"site\\wwwroot", "preloadEnabled":true, "virtualDirectories":null } ], "winAuthAdminState":0, "winAuthTenantState":0, "customAppPoolIdentityAdminState":false, "customAppPoolIdentityTenantState":false, "runtimeADUser":null, "runtimeADUserPassword":null, "loadBalancing":"LeastRequests", "routingRules":[ ], "experiments":{ "rampUpRules":[ ] }, "limits":null, "autoHealEnabled":false, "autoHealRules":null, "tracingOptions":null, "vnetName":"", "vnetRouteAllEnabled":false, "vnetPrivatePortsCount":0, "siteAuthEnabled":false, "siteAuthSettings":{ "enabled":null, "configVersion":null, "unauthenticatedClientAction":null, "tokenStoreEnabled":null, "allowedExternalRedirectUrls":null, "defaultProvider":null, "clientId":null, "clientSecret":null, "clientSecretSettingName":null, "clientSecretCertificateThumbprint":null, "issuer":null, "allowedAudiences":null, "additionalLoginParams":null, "isAadAutoProvisioned":false, "aadClaimsAuthorization":null, "googleClientId":null, "googleClientSecret":null, "googleClientSecretSettingName":null, "googleOAuthScopes":null, "facebookAppId":null, "facebookAppSecret":null, "facebookAppSecretSettingName":null, "facebookOAuthScopes":null, "gitHubClientId":null, "gitHubClientSecret":null, "gitHubClientSecretSettingName":null, "gitHubOAuthScopes":null, "twitterConsumerKey":null, "twitterConsumerSecret":null, "twitterConsumerSecretSettingName":null, "microsoftAccountClientId":null, "microsoftAccountClientSecret":null, "microsoftAccountClientSecretSettingName":null, "microsoftAccountOAuthScopes":null }, "cors":null, "push":null, "apiDefinition":null, "apiManagementConfig":null, "autoSwapSlotName":null, "localMySqlEnabled":false, "managedServiceIdentityId":null, "xManagedServiceIdentityId":null, "ipSecurityRestrictions":[ { "ipAddress":"Any", "action":"Allow", "priority":1, "name":"Allow all", "description":"Allow all access" } ], "scmIpSecurityRestrictions":[ { "ipAddress":"Any", "action":"Allow", "priority":1, "name":"Allow all", "description":"Allow all access" } ], "scmIpSecurityRestrictionsUseMain":false, "http20Enabled":true, "minTlsVersion":"1.2", "scmMinTlsVersion":"1.0", "ftpsState":"AllAllowed", "preWarmedInstanceCount":0, "functionAppScaleLimit":0, "healthCheckPath":null, "fileChangeAuditEnabled":false, "functionsRuntimeScaleMonitoringEnabled":false, "websiteTimeZone":null, "minimumElasticInstanceCount":0 } } ```
Author: mikhailshilkov
Assignees: jianyexi
Labels: `Service Attention`, `Web Apps`, `needs-triage`, `question`
Milestone: -