Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

feat(clickhouse): default the native port to 9000

bernie-g41efbb8e7d28
diff --git a/backend/src/ee/services/pam-account/pam-account-schemas.test.ts b/backend/src/ee/services/pam-account/pam-account-schemas.test.ts
index b7413a9160..9f96d31b4e 100644
--- a/backend/src/ee/services/pam-account/pam-account-schemas.test.ts
+++ b/backend/src/ee/services/pam-account/pam-account-schemas.test.ts
@@ -197,12 +197,11 @@ describe("buildPamAccountTypeMetadata", () => {
required: false,
defaultValue: 8123
});
- // A default would add a native port to every existing HTTP-only account on its next save.
- expect(fieldByKey(clickhouse!.connectionFields, "nativePort")?.defaultValue).toBeUndefined();
expect(fieldByKey(clickhouse!.connectionFields, "nativePort")).toMatchObject({
label: "Native Port",
widget: "number",
- required: false
+ required: false,
+ defaultValue: 9000
});
expect(fieldByKey(clickhouse!.connectionFields, "port")?.showWhen).toBeUndefined();
expect(fieldByKey(clickhouse!.connectionFields, "nativePort")?.showWhen).toBeUndefined();
diff --git a/backend/src/ee/services/pam-account/pam-account-schemas.ts b/backend/src/ee/services/pam-account/pam-account-schemas.ts
index f44017c750..16a22586f1 100644
--- a/backend/src/ee/services/pam-account/pam-account-schemas.ts
+++ b/backend/src/ee/services/pam-account/pam-account-schemas.ts
@@ -635,7 +635,7 @@ export const ACCOUNT_TYPE_CONFIGS = {
},
nativePort: {
label: "Native Port",
- // No default: a native port is the server operator's choice, not something a new account assumes.
+ defaultValue: 9000,
tooltip:
"The native TCP port, usually 9000 for plain TCP or 9440 with SSL. clickhouse-client and other native drivers need it. Leave it empty if the server only serves HTTP."
},