From 8dfe268b3c2fa5bd8b29fd87291cd2fcbbd25c11 Mon Sep 17 00:00:00 2001 From: Edward Gao Date: Thu, 16 Jan 2025 10:10:17 -0800 Subject: [PATCH] Legacy CDK: More rootless fixes (#51583) --- airbyte-cdk/java/airbyte-cdk/README.md | 1 + .../core/src/main/resources/version.properties | 2 +- .../cdk/integrations/util/PostgresSslConnectionUtils.kt | 8 ++------ 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/airbyte-cdk/java/airbyte-cdk/README.md b/airbyte-cdk/java/airbyte-cdk/README.md index d100bd452d99..98a7e6691a9e 100644 --- a/airbyte-cdk/java/airbyte-cdk/README.md +++ b/airbyte-cdk/java/airbyte-cdk/README.md @@ -174,6 +174,7 @@ corresponds to that version. | Version | Date | Pull Request | Subject | |:-----------|:-----------|:------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 0.48.5 | 2025-01-16 | [\#51583](https://github.com/airbytehq/airbyte/pull/51583) | Also save SSL key to /tmp in destination-postgres | | 0.48.4 | 2024-12-24 | [\#50410](https://github.com/airbytehq/airbyte/pull/50410) | Save SSL key to /tmp | | 0.48.3 | 2024-12-23 | [\#49858](https://github.com/airbytehq/airbyte/pull/49858) | Relax various Destination CDK methods visibility. | | 0.48.1 | 2024-11-13 | [\#48482](https://github.com/airbytehq/airbyte/pull/48482) | Adding support converting very large numbers via BigInteger | diff --git a/airbyte-cdk/java/airbyte-cdk/core/src/main/resources/version.properties b/airbyte-cdk/java/airbyte-cdk/core/src/main/resources/version.properties index dda403542207..f41085e232fc 100644 --- a/airbyte-cdk/java/airbyte-cdk/core/src/main/resources/version.properties +++ b/airbyte-cdk/java/airbyte-cdk/core/src/main/resources/version.properties @@ -1 +1 @@ -version=0.48.4 +version=0.48.5 diff --git a/airbyte-cdk/java/airbyte-cdk/datastore-postgres/src/main/kotlin/io/airbyte/cdk/integrations/util/PostgresSslConnectionUtils.kt b/airbyte-cdk/java/airbyte-cdk/datastore-postgres/src/main/kotlin/io/airbyte/cdk/integrations/util/PostgresSslConnectionUtils.kt index 522367e276b1..d4eabd7ff8ff 100644 --- a/airbyte-cdk/java/airbyte-cdk/datastore-postgres/src/main/kotlin/io/airbyte/cdk/integrations/util/PostgresSslConnectionUtils.kt +++ b/airbyte-cdk/java/airbyte-cdk/datastore-postgres/src/main/kotlin/io/airbyte/cdk/integrations/util/PostgresSslConnectionUtils.kt @@ -28,7 +28,7 @@ object PostgresSslConnectionUtils { const val VERIFY_FULL: String = "verify-full" const val DISABLE: String = "disable" const val TRUE_STRING_VALUE: String = "true" - const val ENCRYPT_FILE_NAME: String = "encrypt" + const val ENCRYPT_FILE_NAME: String = "/tmp/encrypt" const val FACTORY_VALUE: String = "org.postgresql.ssl.DefaultJavaSSLFactory" @JvmStatic @@ -68,11 +68,7 @@ object PostgresSslConnectionUtils { if (file.exists()) { keyStorePassword = readFile(file) } else { - try { - createCertificateFile(ENCRYPT_FILE_NAME, keyStorePassword) - } catch (e: IOException) { - throw RuntimeException("Failed to create encryption file ") - } + createCertificateFile(ENCRYPT_FILE_NAME, keyStorePassword) } } else { keyStorePassword = sslPassword