Skip to content

Commit

Permalink
Update error message to point to remediation steps (#23268)
Browse files Browse the repository at this point in the history
  • Loading branch information
timovv authored Sep 19, 2022
1 parent e296ed7 commit 5fb6089
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
1 change: 1 addition & 0 deletions sdk/keyvault/keyvault-admin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Verify the challenge resource matches the vault domain.
This should affect few customers who can set `disableChallengeResourceVerification` in the options bag to `true` to disable.
See https://aka.ms/azsdk/blog/vault-uri for more information.

## 4.2.2 (2022-08-09)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ describe("Challenge based authentication tests", function () {
},
scopes: [],
}),
"Challenge resource host 'vault.azure.net' does not match request domain"
"The challenge resource 'vault.azure.net' does not match the requested domain. Set disableChallengeResourceVerification to true in your client options to disable. See https://aka.ms/azsdk/blog/vault-uri for more information."
);
});

Expand All @@ -179,7 +179,7 @@ describe("Challenge based authentication tests", function () {
},
scopes: [],
}),
"Challenge resource host 'vault.azure.net' does not match request domain"
"The challenge resource 'vault.azure.net' does not match the requested domain. Set disableChallengeResourceVerification to true in your client options to disable. See https://aka.ms/azsdk/blog/vault-uri for more information."
);
});

Expand All @@ -199,9 +199,7 @@ describe("Challenge based authentication tests", function () {
});

it("does not throw if the resource URI host does not match the request but verifyChallengeResource is false", async () => {
challengeCallbacks = createChallengeCallbacks({
disableChallengeResourceVerification: true,
});
challengeCallbacks = createChallengeCallbacks({ disableChallengeResourceVerification: true });
await challengeCallbacks.authorizeRequestOnChallenge!({
getAccessToken: () => Promise.resolve(null),
request: createPipelineRequest({ url: "https://foo.bar" }),
Expand Down
1 change: 1 addition & 0 deletions sdk/keyvault/keyvault-certificates/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Verify the challenge resource matches the vault domain.
This should affect few customers who can set `disableChallengeResourceVerification` in the options bag to `true` to disable.
See https://aka.ms/azsdk/blog/vault-uri for more information.

## 4.5.0 (2022-08-09)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ describe("Challenge based authentication tests", function () {
},
scopes: [],
}),
"Challenge resource host 'vault.azure.net' does not match request domain"
"The challenge resource 'vault.azure.net' does not match the requested domain. Set disableChallengeResourceVerification to true in your client options to disable. See https://aka.ms/azsdk/blog/vault-uri for more information."
);
});

Expand All @@ -179,7 +179,7 @@ describe("Challenge based authentication tests", function () {
},
scopes: [],
}),
"Challenge resource host 'vault.azure.net' does not match request domain"
"The challenge resource 'vault.azure.net' does not match the requested domain. Set disableChallengeResourceVerification to true in your client options to disable. See https://aka.ms/azsdk/blog/vault-uri for more information."
);
});

Expand All @@ -199,9 +199,7 @@ describe("Challenge based authentication tests", function () {
});

it("does not throw if the resource URI host does not match the request but verifyChallengeResource is false", async () => {
challengeCallbacks = createChallengeCallbacks({
disableChallengeResourceVerification: true,
});
challengeCallbacks = createChallengeCallbacks({ disableChallengeResourceVerification: true });
await challengeCallbacks.authorizeRequestOnChallenge!({
getAccessToken: () => Promise.resolve(null),
request: createPipelineRequest({ url: "https://foo.bar" }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function verifyChallengeResource(scope: string, request: PipelineRequest): void

if (!requestUrl.hostname.endsWith(`.${scopeAsUrl.hostname}`)) {
throw new Error(
`Challenge resource host '${scopeAsUrl.hostname}' does not match request domain`
`The challenge resource '${scopeAsUrl.hostname}' does not match the requested domain. Set disableChallengeResourceVerification to true in your client options to disable. See https://aka.ms/azsdk/blog/vault-uri for more information.`
);
}
}
Expand Down
1 change: 1 addition & 0 deletions sdk/keyvault/keyvault-keys/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Verify the challenge resource matches the vault domain.
This should affect few customers who can set `disableChallengeResourceVerification` in the options bag to `true` to disable.
See https://aka.ms/azsdk/blog/vault-uri for more information.

## 4.5.0 (2022-08-09)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ describe("Challenge based authentication tests", function () {
},
scopes: [],
}),
"Challenge resource host 'vault.azure.net' does not match request domain"
"The challenge resource 'vault.azure.net' does not match the requested domain. Set disableChallengeResourceVerification to true in your client options to disable. See https://aka.ms/azsdk/blog/vault-uri for more information."
);
});

Expand All @@ -179,7 +179,7 @@ describe("Challenge based authentication tests", function () {
},
scopes: [],
}),
"Challenge resource host 'vault.azure.net' does not match request domain"
"The challenge resource 'vault.azure.net' does not match the requested domain. Set disableChallengeResourceVerification to true in your client options to disable. See https://aka.ms/azsdk/blog/vault-uri for more information."
);
});

Expand Down
1 change: 1 addition & 0 deletions sdk/keyvault/keyvault-secrets/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Verify the challenge resource matches the vault domain.
This should affect few customers who can set `disableChallengeResourceVerification` in the options bag to `true` to disable.
See https://aka.ms/azsdk/blog/vault-uri for more information.

## 4.5.1 (2022-08-15)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ describe("Challenge based authentication tests", function () {
},
scopes: [],
}),
"Challenge resource host 'vault.azure.net' does not match request domain"
"The challenge resource 'vault.azure.net' does not match the requested domain. Set disableChallengeResourceVerification to true in your client options to disable. See https://aka.ms/azsdk/blog/vault-uri for more information."
);
});

Expand All @@ -179,7 +179,7 @@ describe("Challenge based authentication tests", function () {
},
scopes: [],
}),
"Challenge resource host 'vault.azure.net' does not match request domain"
"The challenge resource 'vault.azure.net' does not match the requested domain. Set disableChallengeResourceVerification to true in your client options to disable. See https://aka.ms/azsdk/blog/vault-uri for more information."
);
});

Expand Down

0 comments on commit 5fb6089

Please sign in to comment.