Skip to content

Commit b97172c

Browse files
authored
Update error messages for Enclave exceptions with forward link to troubleshooting guide (#1585)
1 parent 17569c6 commit b97172c

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

src/main/java/com/microsoft/sqlserver/jdbc/SQLServerResource.java

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ protected Object[][] getContents() {
361361
{"R_CustomCipherAlgorithmNotSupportedAE", "Custom cipher algorithm not supported."},
362362
{"R_PlainTextNullAE", "Internal error. Plaintext value cannot be null."},
363363
{"R_StreamingDataTypeAE", "Data of length greater than {0} is not supported in encrypted {1} column."},
364-
{"R_AE_NotSupportedByServer", "SQL Server instance in use does not support column encryption."},
364+
{"R_AE_NotSupportedByServer", "SQL Server in use does not support column encryption."},
365365
{"R_InvalidAEVersionNumber", "Received invalid version number \"{0}\" for Always Encrypted."}, // From
366366
// Server
367367
{"R_NullEncryptedColumnEncryptionKey", "Internal error. Encrypted column encryption key cannot be null."},
@@ -631,28 +631,32 @@ protected Object[][] getContents() {
631631
{"R_invalidInsertValuesQuery",
632632
"An error occurred when matching VALUES list to table columns. Please verify SQL syntax."},
633633
{"R_invalidValuesList", "An error occurred when reading VALUES list. Please verify SQL syntax."},
634-
{"R_enclaveNotSupported", "The SQL Server instance does not support enclave based computations."},
634+
{"R_enclaveNotSupported",
635+
"The SQL Server does not support enclave based computations - see https://go.microsoft.com/fwlink/?linkid=2157649 for more details."},
635636
{"R_enclavePropertiesError",
636-
"The \"columnEncryptionSetting\" connection property must be enabled, along with valid \"enclaveAttestationUrl\" and \"enclaveAttestationProtocol\" connection properties when enabling Always Encrypted with secure enclaves."},
637-
{"R_enclaveInvalidAttestationProtocol", "The \"enclaveAttestationProtocol\" is invalid."},
638-
{"R_enclaveTypeInvalid", "The enclave type {0} is invalid or not supported by the driver."},
639-
{"R_attestationUrlInvalid", "Unable to attest enclave specified by {0}."},
637+
"The \"columnEncryptionSetting\" connection property must be enabled, along with valid \"enclaveAttestationUrl\" and \"enclaveAttestationProtocol\" connection properties when enabling Always Encrypted with secure enclaves - see https://go.microsoft.com/fwlink/?linkid=2157649 for more details."},
638+
{"R_enclaveInvalidAttestationProtocol",
639+
"The \"enclaveAttestationProtocol\" is invalid - see https://go.microsoft.com/fwlink/?linkid=2157649 for more details."},
640+
{"R_enclaveTypeInvalid",
641+
"The enclave type {0} is invalid or not supported by the driver - see https://go.microsoft.com/fwlink/?linkid=2157649 for more details."},
642+
{"R_attestationUrlInvalid",
643+
"Unable to attest enclave specified by {0} - see https://go.microsoft.com/fwlink/?linkid=2157649 for more details."},
640644
{"R_EnclaveResponseLengthError",
641-
"More bytes from the server were received than expected when parsing the enclave attestation response."},
645+
"More bytes from the server were received than expected when parsing the enclave attestation response - see https://go.microsoft.com/fwlink/?linkid=2157649 for more details."},
642646
{"R_EnclavePackageLengthError",
643-
"More bytes from the server were received than expected when parsing the enclave package."},
647+
"More bytes from the server were received than expected when parsing the enclave package - see https://go.microsoft.com/fwlink/?linkid=2157649 for more details."},
644648
{"R_EnclavePKLengthError",
645-
"More bytes from the server were received than expected when parsing the enclave public key."},
649+
"More bytes from the server were received than expected when parsing the enclave public key - see https://go.microsoft.com/fwlink/?linkid=2157649 for more details."},
646650
{"R_MalformedECDHPublicKey", "The ECDH public key from the server must be 104 bits in length."},
647651
{"R_MalformedECDHHeader", "Unexpected values for ECDH public key header from the server."},
648652
{"R_HealthCertError",
649-
"Enclave attestation failed, could not retrieve health report certificates provided in the enclave: {0}."},
653+
"Enclave attestation failed, could not retrieve health report certificates provided in the enclave: {0} - see https://go.microsoft.com/fwlink/?linkid=2160553 for more details."},
650654
{"R_InvalidHealthCert",
651-
"Enclave attestation failed, the health report certificate provided in the enclave was not signed by the HGS."},
655+
"Enclave attestation failed, the health report certificate provided in the enclave was not signed by the HGS - see https://go.microsoft.com/fwlink/?linkid=2160553 for more details."},
652656
{"R_InvalidSignedStatement",
653-
"Enclave attestation failed, the statement bytes were not signed by the health certificate."},
657+
"Enclave attestation failed, the statement bytes were not signed by the health certificate - see https://go.microsoft.com/fwlink/?linkid=2160553 for more details."},
654658
{"R_InvalidDHKeySignature",
655-
"Enclave attestation failed, the DH public key signature can't be verified with the enclave public key."},
659+
"Enclave attestation failed, the DH public key signature can't be verified with the enclave public key - see https://go.microsoft.com/fwlink/?linkid=2157649 for more details."},
656660
{"R_AasJWTError", "An error occured when retrieving and validating the JSON web token."},
657661
{"R_AasEhdError", "aas-ehd claim from JWT did not match enclave public key."},
658662
{"R_VbsRpDataError", "rp_data claim from JWT did not match client nonce."},

0 commit comments

Comments
 (0)