Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

validate resource param exists #450

Merged
merged 2 commits into from
Dec 4, 2019
Merged

validate resource param exists #450

merged 2 commits into from
Dec 4, 2019

Conversation

aramase
Copy link
Member

@aramase aramase commented Dec 4, 2019

Reason for Change:

Validates if the resource parameter exists in the token request. This validation is currently done in the sdk and we are introducing the change in order to mimic the exact same error response code that IMDS would send for such a scenario.

Request without resource param while talking directly also returns an error and 400 response code -

body {"error":"invalid_request","error_description":"Required query variable 'resource' is missing"}
Response status: 400 Bad Request

With this change we will be more aligned with what a user would typically see while taking to IMDS without pod-identity.

Issue Fixed:

Notes for Reviewers:

@kkmsft
Copy link
Contributor

kkmsft commented Dec 4, 2019

/lgtm

@aramase aramase merged commit 085c3be into Azure:master Dec 4, 2019
@aramase aramase deleted the no-resource branch December 4, 2019 23:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants