Azure / Azure/azure-rest-api-specs

IoTHub Dps API - rights property in response doesn't include the values "enrollmentRead/registrationWrite/registrationRead" when set "enrollmentRead/registrationWrite/registrationRead" as "true" in http request

Open
#10,356 1 comment 1 reaction 0 assignees View on GitHub
IoTDPS Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

After tested, I found rights property in response doesn't include the values "enrollmentRead/registrationWrite/registrationRead" when set "enrollmentRead/registrationWrite/registrationRead" as "true" in http request. I assume api should return them since they are set as true in http request body.

Http request to create iot dps policy:
```
PUT https://management.azure.com/subscriptions/xx-xx-xx-xx/resourceGroups/acctestRG-iotdps-test01/providers/Microsoft.Devices/provisioningServices/acctestIoTDPS-test01

{
"etag": "xxxx",
"location": "eastus2",
"properties": {
"state": "Active",
"provisioningState": "Succeeded",
"iotHubs": [],
"allocationPolicy": "Hashed",
"serviceOperationsHostName": "acctestIoTDPS-test01.xxxx.net",
"deviceProvisioningHostName": "xxxx.xxxx.net",
"idScope": "0ne00151A0D",
"authorizationPolicies": [
{
"keyName": "provisioningserviceowner",
"primaryKey": "xxxxxxx",
"secondaryKey": "xxxxxxx",
"rights": "ServiceConfig, DeviceConnect, EnrollmentWrite"
},
{
"keyName": "acctest01",
"rights": "EnrollmentRead, EnrollmentWrite, RegistrationStatusRead, RegistrationStatusWrite"
}
]
},
"sku": {
"name": "S1",
"tier": "Standard",
"capacity": 1
},
"tags": {}
}
```

Http request to get iothub dps policy:
![image](https://user-images.githubusercontent.com/19754191/89490433-7642f580-d7df-11ea-8548-78008fb1534c.png)

Contributor guide

Open the contributing guide

Research direction

Start by comparing the IoT DPS policy creation request with the reported get-policy response, focusing on authorizationPolicies and the rights field. Trace the API specification entry for these requests and determine whether the response is expected to preserve enrollmentRead, registrationWrite, and registrationRead; done means the documented behavior matches the service response or clearly records the required correction.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.