Fix: Use correct scope for Entra authentication #198
Merged
Azure Pipelines / go-mssqldb Tests
succeeded
May 29, 2024 in 2m 53s
Build #20240529.1 had test failures
Details
- Failed: 5 (5.62%)
- Passed: 84 (94.38%)
- Other: 0 (0.00%)
- Total: 89
- 1033 of 1455 lines covered (71.00%)
Annotations
Check failure on line 1 in TestAlwaysEncryptedE2E/AZURE_KEY_VAULT
azure-pipelines / go-mssqldb Tests
TestAlwaysEncryptedE2E/AZURE_KEY_VAULT
Failed
Raw output
=== RUN TestAlwaysEncryptedE2E/AZURE_KEY_VAULT
alwaysencrypted_test.go:80:
Error Trace: /home/vsts/work/1/s/alwaysencrypted_akv_test.go:29
/home/vsts/work/1/s/alwaysencrypted_test.go:80
Error: Received unexpected error:
DefaultAzureCredential authentication failed
POST https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/token
--------------------------------------------------------------------------------
RESPONSE 401 Unauthorized
--------------------------------------------------------------------------------
{
"error": "invalid_client",
"error_description": "AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app '1024bf3a-2764-43cd-937e-01f89c02014b'. Trace ID: 74564ddd-0559-43f4-ba9d-50fe797c3f00 Correlation ID: 86765440-fad8-48cf-80e3-c6db290567f0 Timestamp: 2024-05-29 23:10:50Z",
"error_codes": [
7000215
],
"timestamp": "2024-05-29 23:10:50Z",
"trace_id": "74564ddd-0559-43f4-ba9d-50fe797c3f00",
"correlation_id": "86765440-fad8-48cf-80e3-c6db290567f0",
"error_uri": "https://login.microsoftonline.com/error?code=7000215"
}
--------------------------------------------------------------------------------
Test: TestAlwaysEncryptedE2E/AZURE_KEY_VAULT
Messages: CreateRSAKey
tds_test.go:387: 2024-05-29 23:10:50.105509363 +0000 UTC m=+0.730863871 [tds.go:975]: Dialing with protocol tcp
tds_test.go:387: 2024-05-29 23:10:50.106119068 +0000 UTC m=+0.731473576 [tds.go:987]: Returning connection from protocol tcp
tds_test.go:387: 2024-05-29 23:10:50.127805448 +0000 UTC m=+0.753160056 [token.go:993]: got token tokenEnvChange
tds_test.go:387: 2024-05-29 23:10:50.12800905 +0000 UTC m=+0.753363658 [token.go:993]: got token tokenInfo
tds_test.go:387: 2024-05-29 23:10:50.12802805 +0000 UTC m=+0.753382558 [token.go:1122]: got INFO 5701 Changed database context to 'master'.
tds_test.go:387: 2024-05-29 23:10:50.12804245 +0000 UTC m=+0.753396958 [token.go:1125]: Changed database context to 'master'.
tds_test.go:387: 2024-05-29 23:10:50.12805475 +0000 UTC m=+0.753409258 [token.go:993]: got token tokenEnvChange
tds_test.go:387: 2024-05-29 23:10:50.12806715 +0000 UTC m=+0.753421658 [token.go:993]: got token tokenEnvChange
tds_test.go:387: 2024-05-29 23:10:50.12807885 +0000 UTC m=+0.753433458 [token.go:993]: got token tokenInfo
tds_test.go:387: 2024-05-29 23:10:50.12809095 +0000 UTC m=+0.753445458 [token.go:1122]: got INFO 5703 Changed language setting to us_english.
tds_test.go:387: 2024-05-29 23:10:50.12810325 +0000 UTC m=+0.753457858 [token.go:1125]: Changed language setting to us_english.
tds_test.go:387: 2024-05-29 23:10:50.128132151 +0000 UTC m=+0.753486759 [token.go:993]: got token tokenLoginAck
tds_test.go:387: 2024-05-29 23:10:50.128207751 +0000 UTC m=+0.753562259 [token.go:993]: got token tokenEnvChange
tds_test.go:387: 2024-05-29 23:10:50.128221251 +0000 UTC m=+0.753575759 [token.go:993]: got token tokenFeatureExtAck
tds_test.go:387: 2024-05-29 23:10:50.128233752 +0000 UTC m=+0.753588260 [token.go:993]: got token tokenDone
tds_test.go:387: 2024-05-29 23:10:50.128245052 +0000 UTC m=+0.753599560 [token.go:1049]: got DONE or DONEPROC status=0
tds_test.go:387: 2024-05-29 23:10:50.128282952 +0000 UTC m=+0.753637560 [mssql.go:528]: CREATE COLUMN MASTER KEY [https://sqltoolssecretstore.vault.azure.net/keys/go-mssqlkey183020] WITH (KEY_STORE_PROVIDER_NAME= 'AZURE_KEY_
Check failure on line 1 in TestAlwaysEncryptedE2E
azure-pipelines / go-mssqldb Tests
TestAlwaysEncryptedE2E
Failed
Raw output
=== RUN TestAlwaysEncryptedE2E
--- FAIL: TestAlwaysEncryptedE2E (1.13s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xa0 pc=0x8c32fa]
goroutine 20 [running]:
testing.tRunner.func1.2({0xa29260, 0x1016610})
/opt/hostedtoolcache/go/1.20.0/x64/src/testing/testing.go:1526 +0x24e
testing.tRunner.func1()
/opt/hostedtoolcache/go/1.20.0/x64/src/testing/testing.go:1529 +0x39f
panic({0xa29260, 0x1016610})
/opt/hostedtoolcache/go/1.20.0/x64/src/runtime/panic.go:884 +0x213
github.com/microsoft/go-mssqldb/aecmk/akv.(*Provider).getKeyData(0xc00046f908?, {0xbd1fd8, 0xc000034190}, {0xc0003cc5f0, 0x42}, 0x1)
/home/vsts/work/1/s/aecmk/akv/keyprovider.go:225 +0x2da
github.com/microsoft/go-mssqldb/aecmk/akv.(*Provider).EncryptColumnEncryptionKey(0x1?, {0xbd1fd8, 0xc000034190}, {0xc0003cc5f0, 0x42}, {0xad38a8, 0x8}, {0xc000385dc0, 0x20, 0x20})
/home/vsts/work/1/s/aecmk/akv/keyprovider.go:110 +0x6c
github.com/microsoft/go-mssqldb.TestAlwaysEncryptedE2E.func1(0xc0002421a0)
/home/vsts/work/1/s/alwaysencrypted_test.go:95 +0x572
testing.tRunner(0xc0002421a0, 0xc000194a20)
/opt/hostedtoolcache/go/1.20.0/x64/src/testing/testing.go:1576 +0x10b
created by testing.(*T).Run
/opt/hostedtoolcache/go/1.20.0/x64/src/testing/testing.go:1629 +0x3ea
Check failure on line 1 in TestAzureSqlAuth
azure-pipelines / go-mssqldb Tests
TestAzureSqlAuth
Failed
Raw output
=== RUN TestAzureSqlAuth
azuread_test.go:31: Unable to query the db: ClientSecretCredential authentication failed
POST https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/token
--------------------------------------------------------------------------------
RESPONSE 401 Unauthorized
--------------------------------------------------------------------------------
{
"error": "invalid_client",
"error_description": "AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app '1024bf3a-2764-43cd-937e-01f89c02014b'. Trace ID: 1a8188bf-7439-48f2-af95-0abb8d7f3a00 Correlation ID: 90dbb661-f6d9-47b0-8235-27f62419bed2 Timestamp: 2024-05-29 23:10:52Z",
"error_codes": [
7000215
],
"timestamp": "2024-05-29 23:10:52Z",
"trace_id": "1a8188bf-7439-48f2-af95-0abb8d7f3a00",
"correlation_id": "90dbb661-f6d9-47b0-8235-27f62419bed2",
"error_uri": "https://login.microsoftonline.com/error?code=7000215"
}
--------------------------------------------------------------------------------
To troubleshoot, visit https://aka.ms/azsdk/go/identity/troubleshoot#client-secret
--- FAIL: TestAzureSqlAuth (1.08s)
Check failure on line 1 in TestEncryptDecryptRoundTrip
azure-pipelines / go-mssqldb Tests
TestEncryptDecryptRoundTrip
Failed
Raw output
=== RUN TestEncryptDecryptRoundTrip
keyprovider_test.go:23:
Error Trace: /home/vsts/work/1/s/aecmk/akv/keyprovider_test.go:23
Error: Received unexpected error:
DefaultAzureCredential authentication failed
POST https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/token
--------------------------------------------------------------------------------
RESPONSE 401 Unauthorized
--------------------------------------------------------------------------------
{
"error": "invalid_client",
"error_description": "AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app '1024bf3a-2764-43cd-937e-01f89c02014b'. Trace ID: bfd797bf-3761-4c17-96b0-c64b5e354000 Correlation ID: 45b967e9-76a8-429c-a001-8ec78ff06272 Timestamp: 2024-05-29 23:10:50Z",
"error_codes": [
7000215
],
"timestamp": "2024-05-29 23:10:50Z",
"trace_id": "bfd797bf-3761-4c17-96b0-c64b5e354000",
"correlation_id": "45b967e9-76a8-429c-a001-8ec78ff06272",
"error_uri": "https://login.microsoftonline.com/error?code=7000215"
}
--------------------------------------------------------------------------------
Test: TestEncryptDecryptRoundTrip
Messages: CreateRSAKey
keyprovider_test.go:29: Plainkey: [237 112 96 74 216 70 68 212 221 55 93 215 120 243 41 174 176 254 28 154 155 177 141 242 80 128 22 177 35 162 66 65]
--- FAIL: TestEncryptDecryptRoundTrip (0.94s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xa0 pc=0x8aa600]
goroutine 6 [running]:
testing.tRunner.func1.2({0x912ac0, 0xd6c660})
/opt/hostedtoolcache/go/1.20.0/x64/src/testing/testing.go:1526 +0x24e
testing.tRunner.func1()
/opt/hostedtoolcache/go/1.20.0/x64/src/testing/testing.go:1529 +0x39f
panic({0x912ac0, 0xd6c660})
/opt/hostedtoolcache/go/1.20.0/x64/src/runtime/panic.go:884 +0x213
github.com/microsoft/go-mssqldb/aecmk/akv.(*Provider).getKeyData(0x98c460?, {0xa6a2b8, 0xc000034190}, {0xc0000adf20, 0x42}, 0x1)
/home/vsts/work/1/s/aecmk/akv/keyprovider.go:225 +0x320
github.com/microsoft/go-mssqldb/aecmk/akv.(*Provider).EncryptColumnEncryptionKey(0x1?, {0xa6a2b8, 0xc000034190}, {0xc0000adf20, 0x42}, {0x9a199c, 0x8}, {0xc00046ee20, 0x20, 0x20})
/home/vsts/work/1/s/aecmk/akv/keyprovider.go:110 +0x92
github.com/microsoft/go-mssqldb/aecmk/akv.TestEncryptDecryptRoundTrip(0xc000136d00)
/home/vsts/work/1/s/aecmk/akv/keyprovider_test.go:30 +0x2b7
testing.tRunner(0xc000136d00, 0x9e12b0)
/opt/hostedtoolcache/go/1.20.0/x64/src/testing/testing.go:1576 +0x10b
created by testing.(*T).Run
/opt/hostedtoolcache/go/1.20.0/x64/src/testing/testing.go:1629 +0x3ea
Loading