Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft.PolicyInsights/remediations returns every resource IDs in lower cases #8353

Closed
ArcturusZhang opened this issue Feb 11, 2020 · 18 comments
Labels
Policy Insights Service Attention This issue is responsible by Azure service team.

Comments

@ArcturusZhang
Copy link
Member

Rest API URL:

PUT /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-resources/providers/Microsoft.PolicyInsights/remediations/test-remediation?api-version=2018-07-01-preview HTTP/1.1

Request body:

{
    "properties": {
        "policyAssignmentId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-resources/providers/Microsoft.Authorization/policyAssignments/example-policy-assignment",
        "policyDefinitionReferenceId": ""
    }
}

A GET response after the creation finished:

{
    "properties": {
        "policyAssignmentId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-resources/providers/microsoft.authorization/policyassignments/example-policy-assignment",
        "provisioningState": "Succeeded",
        "createdOn": "2020-02-11T03:28:29.456352Z",
        "lastUpdatedOn": "2020-02-11T03:28:29.5344467Z",
        "deploymentStatus": {
            "totalDeployments": 0,
            "successfulDeployments": 0,
            "failedDeployments": 0
        },
        "resourceDiscoveryMode": "ExistingNonCompliant"
    },
    "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-resources/providers/microsoft.policyinsights/remediations/test-remediation",
    "name": "test-remediation",
    "type": "Microsoft.PolicyInsights/remediations"
}

Every IDs in the response is in lower cases, including the ID of the remediation itself.

@ArcturusZhang ArcturusZhang added the Service Attention This issue is responsible by Azure service team. label Feb 11, 2020
@kenieva
Copy link
Contributor

kenieva commented Sep 29, 2020

Hi @ArcturusZhang sorry for the delayed response.

The ID being lowercased is by design. Thank you.

@kenieva kenieva closed this as completed Sep 29, 2020
@tombuildsstuff
Copy link
Contributor

@kenieva URI's, per the HTTP Specification are case sensitive.

Furthermore the ARM specification states they should be treated Case Insensitively at Request time and Case Sensitive in responses:

https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md

The resource group names and resource names should be matched case insensitively. That means, for example, if a user creates a resource in resource group "rG1", and then calls a read operation on "RG1", the same resource should be returned even though the casing differs.
Additionally, the REST API MUST preserve the casing provided by the user. That means the API should return back the most recently specified casing to the client (and API MUST not normalize / return back a toupper/tolower form of the resource group or resource name, for example).

As such can this bug be reopened to track this bug in the API?

@kenieva
Copy link
Contributor

kenieva commented Sep 30, 2020

We have created a work item for this bug; workitem 8448953. Thank you for your input.

@tombuildsstuff
Copy link
Contributor

tombuildsstuff commented Sep 30, 2020

@kenieva thanks - is there a public issue tracking that we can direct people to for updates?

@tombuildsstuff
Copy link
Contributor

ping @kenieva

@kenieva
Copy link
Contributor

kenieva commented Jun 22, 2021

No updates at the current moment. We do not have a public issue tracking system at the moment.

@tombuildsstuff
Copy link
Contributor

@kenieva ok thanks - is there an estimated ETA?

@tombuildsstuff
Copy link
Contributor

@kenieva any update on when this'll be fixed?

@tombuildsstuff
Copy link
Contributor

ping @kenieva

@kenieva
Copy link
Contributor

kenieva commented Jan 18, 2022

Hi @tombuildsstuff, we do not have any updates on this work. It is still in the backlog and will go up for consideration and prioritization for the next semester.

@tombuildsstuff
Copy link
Contributor

tombuildsstuff commented Jan 24, 2022

@kenieva thanks for the update - since this is still a bug, can we reopen this issue to ensure it's publicly tracked?

@kenieva
Copy link
Contributor

kenieva commented Jan 24, 2022

@tombuildsstuff we do not have a tracking system that we can share publicly. Since this request is accepted and in for consideration in the backlog, we are instructed to keep the item closed.

@tombuildsstuff
Copy link
Contributor

@kenieva just checking in, is there a timeline for fixing this bug?

@katbyte
Copy link

katbyte commented Oct 24, 2022

@kenieva - why has this been closed when it is a valid, and open bug? should it not remain open until it has been solved so other people can find it? closed implies it has been fixed, as such could we please re-open it?

@tombuildsstuff
Copy link
Contributor

ping @kenieva

@wuxu92
Copy link

wuxu92 commented Nov 15, 2022

Hi @kenieva is there any updates on this issue?

@tombuildsstuff
Copy link
Contributor

ping @kenieva

@robinsk
Copy link

robinsk commented Jan 16, 2023

@kenieva I'm chiming in as a customer here. Because of this bug, we get diffs (and corresponding "updates") for all our terraform states that have policy remediations. It's confusing to our developers, because they didn't touch anything policy-related, and leads to time wasted troubleshooting this on a weekly basis.

While I am oblivious to the underlying complexity here, it seems like it would be a fairly easy fix, and we would greatly appreciate if you could prioritize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Policy Insights Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

8 participants
@robinsk @tombuildsstuff @katbyte @wuxu92 @ArcturusZhang @mmyyrroonn @kenieva and others