forked from Azure/azure-sdk-for-python
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* handle tenant_id * update * Update sdk/identity/azure-identity/azure/identity/_internal/aad_client.py Co-authored-by: McCoy Patiño <39780829+mccoyp@users.noreply.github.com> * Update CHANGELOG.md * Update sdk/identity/azure-identity/CHANGELOG.md Co-authored-by: McCoy Patiño <39780829+mccoyp@users.noreply.github.com> Co-authored-by: McCoy Patiño <39780829+mccoyp@users.noreply.github.com>
- Loading branch information
1 parent
4cd4660
commit 486beca
Showing
32 changed files
with
1,330 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...tity/azure-identity/tests/recordings/test_app_service.test_system_assigned_tenant_id.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
User-Agent: | ||
- azsdk-python-identity/1.6.0b4 Python/3.8.6 (Linux-4.15.0-135-generic-x86_64-with-glibc2.2.5) | ||
secret: | ||
- redacted | ||
method: GET | ||
uri: https://msi-endpoint/token?api-version=2017-09-01&resource=https://management.azure.com | ||
response: | ||
body: | ||
string: '{"access_token": "redacted", "expires_on": "05/22/2021 17:14:33 +00:00", | ||
"resource": "https://management.azure.com", "token_type": "Bearer", "client_id": | ||
"6d807b1c-2a6f-41a0-b428-d0e3a08382a0"}' | ||
headers: | ||
content-type: | ||
- application/json; charset=utf-8 | ||
date: | ||
- Fri, 21 May 2021 17:14:34 GMT | ||
server: | ||
- Kestrel | ||
transfer-encoding: | ||
- chunked | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
34 changes: 34 additions & 0 deletions
34
...entity/azure-identity/tests/recordings/test_app_service.test_user_assigned_tenant_id.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
User-Agent: | ||
- azsdk-python-identity/1.6.0b4 Python/3.8.6 (Linux-4.15.0-135-generic-x86_64-with-glibc2.2.5) | ||
secret: | ||
- redacted | ||
method: GET | ||
uri: https://msi-endpoint/token?api-version=2017-09-01&resource=https://management.azure.com&clientid=client-id | ||
response: | ||
body: | ||
string: '{"access_token": "redacted", "expires_on": "05/22/2021 17:18:21 +00:00", | ||
"resource": "https://management.azure.com", "token_type": "Bearer", "client_id": | ||
"client-id"}' | ||
headers: | ||
content-type: | ||
- application/json; charset=utf-8 | ||
date: | ||
- Fri, 21 May 2021 17:18:35 GMT | ||
server: | ||
- Kestrel | ||
transfer-encoding: | ||
- chunked | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
25 changes: 25 additions & 0 deletions
25
...zure-identity/tests/recordings/test_app_service_async.test_system_assigned_tenant_id.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
User-Agent: | ||
- azsdk-python-identity/1.6.0b4 Python/3.8.6 (Linux-4.15.0-135-generic-x86_64-with-glibc2.2.5) | ||
secret: | ||
- redacted | ||
method: GET | ||
uri: https://msi-endpoint/token?api-version=2017-09-01&resource=https://management.azure.com | ||
response: | ||
body: | ||
string: '{"access_token": "redacted", "expires_on": "05/22/2021 17:18:20 +00:00", | ||
"resource": "https://management.azure.com", "token_type": "Bearer", "client_id": | ||
"6d807b1c-2a6f-41a0-b428-d0e3a08382a0"}' | ||
headers: | ||
content-type: application/json; charset=utf-8 | ||
date: Fri, 21 May 2021 17:18:35 GMT | ||
server: Kestrel | ||
transfer-encoding: chunked | ||
status: | ||
code: 200 | ||
message: OK | ||
url: http://172.16.7.2:8081/msi/token?api-version=2017-09-01&resource=https://management.azure.com | ||
version: 1 |
25 changes: 25 additions & 0 deletions
25
.../azure-identity/tests/recordings/test_app_service_async.test_user_assigned_tenant_id.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
User-Agent: | ||
- azsdk-python-identity/1.6.0b4 Python/3.8.6 (Linux-4.15.0-135-generic-x86_64-with-glibc2.2.5) | ||
secret: | ||
- redacted | ||
method: GET | ||
uri: https://msi-endpoint/token?api-version=2017-09-01&resource=https://management.azure.com&clientid=client-id | ||
response: | ||
body: | ||
string: '{"access_token": "redacted", "expires_on": "05/22/2021 17:18:21 +00:00", | ||
"resource": "https://management.azure.com", "token_type": "Bearer", "client_id": | ||
"client-id"}' | ||
headers: | ||
content-type: application/json; charset=utf-8 | ||
date: Fri, 21 May 2021 17:18:35 GMT | ||
server: Kestrel | ||
transfer-encoding: chunked | ||
status: | ||
code: 200 | ||
message: OK | ||
url: http://172.16.7.2:8081/msi/token?api-version=2017-09-01&resource=https://management.azure.com&clientid=b48ae5dc-70d0-488a-8ef5-f30d905cd5ec | ||
version: 1 |
41 changes: 41 additions & 0 deletions
41
.../azure-identity/tests/recordings/test_imds_credential.test_system_assigned_tenant_id.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
Accept: ['*/*'] | ||
Accept-Encoding: ['gzip, deflate'] | ||
Connection: [keep-alive] | ||
User-Agent: [azsdk-python-identity/1.6.0b4 Python/3.6.9 (Linux-5.4.0-1046-azure-x86_64-with-Ubuntu-18.04-bionic)] | ||
method: GET | ||
uri: http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com | ||
response: | ||
body: {string: '{"error": "invalid_request", "error_description": "Required metadata | ||
header not specified"}'} | ||
headers: | ||
content-length: ['88'] | ||
content-type: [application/json; charset=utf-8] | ||
date: ['Mon, 26 Apr 2021 22:13:41 GMT'] | ||
server: [IMDS/150.870.65.492] | ||
status: {code: 400, message: Bad Request} | ||
- request: | ||
body: null | ||
headers: | ||
Accept: ['*/*'] | ||
Accept-Encoding: ['gzip, deflate'] | ||
Connection: [keep-alive] | ||
Metadata: ['true'] | ||
User-Agent: [azsdk-python-identity/1.6.0b4 Python/3.6.9 (Linux-5.4.0-1046-azure-x86_64-with-Ubuntu-18.04-bionic)] | ||
method: GET | ||
uri: http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com | ||
response: | ||
body: {string: '{"access_token": "redacted", "client_id": "e15dd129-090a-41d4-add5-bb4b16b2b1a9", | ||
"expires_in": "86104", "expires_on": "1619561325", "ext_expires_in": "86399", | ||
"not_before": "1619474625", "resource": "https://management.azure.com", "token_type": | ||
"Bearer"}'} | ||
headers: | ||
content-length: ['1692'] | ||
content-type: [application/json; charset=utf-8] | ||
date: ['Mon, 26 Apr 2021 22:13:41 GMT'] | ||
server: [IMDS/150.870.65.492] | ||
status: {code: 200, message: OK} | ||
version: 1 |
41 changes: 41 additions & 0 deletions
41
...ty/azure-identity/tests/recordings/test_imds_credential.test_user_assigned_tenant_id.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
Accept: ['*/*'] | ||
Accept-Encoding: ['gzip, deflate'] | ||
Connection: [keep-alive] | ||
User-Agent: [azsdk-python-identity/1.6.0b4 Python/3.6.9 (Linux-5.4.0-1046-azure-x86_64-with-Ubuntu-18.04-bionic)] | ||
method: GET | ||
uri: http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com&client_id=client-id | ||
response: | ||
body: {string: '{"error": "invalid_request", "error_description": "Required metadata | ||
header not specified"}'} | ||
headers: | ||
content-length: ['88'] | ||
content-type: [application/json; charset=utf-8] | ||
date: ['Mon, 26 Apr 2021 22:13:41 GMT'] | ||
server: [IMDS/150.870.65.492] | ||
status: {code: 400, message: Bad Request} | ||
- request: | ||
body: null | ||
headers: | ||
Accept: ['*/*'] | ||
Accept-Encoding: ['gzip, deflate'] | ||
Connection: [keep-alive] | ||
Metadata: ['true'] | ||
User-Agent: [azsdk-python-identity/1.6.0b4 Python/3.6.9 (Linux-5.4.0-1046-azure-x86_64-with-Ubuntu-18.04-bionic)] | ||
method: GET | ||
uri: http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com&client_id=client-id | ||
response: | ||
body: {string: '{"access_token": "redacted", "client_id": "client-id", | ||
"expires_in": "86400", "expires_on": "1619561622", "ext_expires_in": "86399", | ||
"not_before": "1619474922", "resource": "https://management.azure.com", "token_type": | ||
"Bearer"}'} | ||
headers: | ||
content-length: ['1712'] | ||
content-type: [application/json; charset=utf-8] | ||
date: ['Mon, 26 Apr 2021 22:13:41 GMT'] | ||
server: [IMDS/150.870.65.492] | ||
status: {code: 200, message: OK} | ||
version: 1 |
31 changes: 31 additions & 0 deletions
31
...-identity/tests/recordings/test_imds_credential_async.test_system_assigned_tenant_id.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
User-Agent: [azsdk-python-identity/1.6.0b4 Python/3.6.9 (Linux-5.4.0-1046-azure-x86_64-with-Ubuntu-18.04-bionic)] | ||
method: GET | ||
uri: http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com | ||
response: | ||
body: {string: '{"error": "invalid_request", "error_description": "Required metadata | ||
header not specified"}'} | ||
headers: {content-length: '88', content-type: application/json; charset=utf-8, | ||
date: 'Mon, 26 Apr 2021 22:13:42 GMT', server: IMDS/150.870.65.492} | ||
status: {code: 400, message: Bad Request} | ||
url: http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com | ||
- request: | ||
body: null | ||
headers: | ||
Metadata: ['true'] | ||
User-Agent: [azsdk-python-identity/1.6.0b4 Python/3.6.9 (Linux-5.4.0-1046-azure-x86_64-with-Ubuntu-18.04-bionic)] | ||
method: GET | ||
uri: http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com | ||
response: | ||
body: {string: '{"access_token": "redacted", "client_id": "e15dd129-090a-41d4-add5-bb4b16b2b1a9", | ||
"expires_in": "86102", "expires_on": "1619561325", "ext_expires_in": "86399", | ||
"not_before": "1619474625", "resource": "https://management.azure.com", "token_type": | ||
"Bearer"}'} | ||
headers: {content-length: '1692', content-type: application/json; charset=utf-8, | ||
date: 'Mon, 26 Apr 2021 22:13:42 GMT', server: IMDS/150.870.65.492} | ||
status: {code: 200, message: OK} | ||
url: http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com | ||
version: 1 |
31 changes: 31 additions & 0 deletions
31
...re-identity/tests/recordings/test_imds_credential_async.test_user_assigned_tenant_id.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
User-Agent: [azsdk-python-identity/1.6.0b4 Python/3.6.9 (Linux-5.4.0-1046-azure-x86_64-with-Ubuntu-18.04-bionic)] | ||
method: GET | ||
uri: http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com&client_id=client-id | ||
response: | ||
body: {string: '{"error": "invalid_request", "error_description": "Required metadata | ||
header not specified"}'} | ||
headers: {content-length: '88', content-type: application/json; charset=utf-8, | ||
date: 'Mon, 26 Apr 2021 22:13:42 GMT', server: IMDS/150.870.65.492} | ||
status: {code: 400, message: Bad Request} | ||
url: http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com&client_id=b48ae5dc-70d0-488a-8ef5-f30d905cd5ec | ||
- request: | ||
body: null | ||
headers: | ||
Metadata: ['true'] | ||
User-Agent: [azsdk-python-identity/1.6.0b4 Python/3.6.9 (Linux-5.4.0-1046-azure-x86_64-with-Ubuntu-18.04-bionic)] | ||
method: GET | ||
uri: http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com&client_id=client-id | ||
response: | ||
body: {string: '{"access_token": "redacted", "client_id": "client-id", | ||
"expires_in": "86399", "expires_on": "1619561622", "ext_expires_in": "86399", | ||
"not_before": "1619474922", "resource": "https://management.azure.com", "token_type": | ||
"Bearer"}'} | ||
headers: {content-length: '1712', content-type: application/json; charset=utf-8, | ||
date: 'Mon, 26 Apr 2021 22:13:42 GMT', server: IMDS/150.870.65.492} | ||
status: {code: 200, message: OK} | ||
url: http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com&client_id=b48ae5dc-70d0-488a-8ef5-f30d905cd5ec | ||
version: 1 |
Oops, something went wrong.