mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-09 22:28:25 +00:00
Revert old "fix" + new bug patch
This commit is contained in:
@@ -51,6 +51,7 @@ const baseSecretRotationV2Query = ({
|
|||||||
db.ref("encryptedCredentials").withSchema(TableName.AppConnection).as("connectionEncryptedCredentials"),
|
db.ref("encryptedCredentials").withSchema(TableName.AppConnection).as("connectionEncryptedCredentials"),
|
||||||
db.ref("description").withSchema(TableName.AppConnection).as("connectionDescription"),
|
db.ref("description").withSchema(TableName.AppConnection).as("connectionDescription"),
|
||||||
db.ref("version").withSchema(TableName.AppConnection).as("connectionVersion"),
|
db.ref("version").withSchema(TableName.AppConnection).as("connectionVersion"),
|
||||||
|
db.ref("gatewayId").withSchema(TableName.AppConnection).as("connectionGatewayId"),
|
||||||
db.ref("createdAt").withSchema(TableName.AppConnection).as("connectionCreatedAt"),
|
db.ref("createdAt").withSchema(TableName.AppConnection).as("connectionCreatedAt"),
|
||||||
db.ref("updatedAt").withSchema(TableName.AppConnection).as("connectionUpdatedAt"),
|
db.ref("updatedAt").withSchema(TableName.AppConnection).as("connectionUpdatedAt"),
|
||||||
db
|
db
|
||||||
@@ -104,6 +105,7 @@ const expandSecretRotation = <T extends Awaited<ReturnType<typeof baseSecretRota
|
|||||||
connectionCreatedAt,
|
connectionCreatedAt,
|
||||||
connectionUpdatedAt,
|
connectionUpdatedAt,
|
||||||
connectionVersion,
|
connectionVersion,
|
||||||
|
connectionGatewayId,
|
||||||
connectionIsPlatformManagedCredentials,
|
connectionIsPlatformManagedCredentials,
|
||||||
...el
|
...el
|
||||||
} = secretRotation;
|
} = secretRotation;
|
||||||
@@ -123,6 +125,7 @@ const expandSecretRotation = <T extends Awaited<ReturnType<typeof baseSecretRota
|
|||||||
createdAt: connectionCreatedAt,
|
createdAt: connectionCreatedAt,
|
||||||
updatedAt: connectionUpdatedAt,
|
updatedAt: connectionUpdatedAt,
|
||||||
version: connectionVersion,
|
version: connectionVersion,
|
||||||
|
gatewayId: connectionGatewayId,
|
||||||
isPlatformManagedCredentials: connectionIsPlatformManagedCredentials
|
isPlatformManagedCredentials: connectionIsPlatformManagedCredentials
|
||||||
},
|
},
|
||||||
folder: {
|
folder: {
|
||||||
|
|||||||
@@ -76,16 +76,13 @@ const getConnectionConfig = ({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getSqlConnectionClient = async (
|
export const getSqlConnectionClient = async (appConnection: Pick<TSqlConnection, "credentials" | "app">) => {
|
||||||
appConnection: Pick<TSqlConnection, "credentials" | "app" | "gatewayId">
|
|
||||||
) => {
|
|
||||||
const {
|
const {
|
||||||
app,
|
app,
|
||||||
credentials: { host: baseHost, database, port, password, username },
|
credentials: { host: baseHost, database, port, password, username }
|
||||||
gatewayId
|
|
||||||
} = appConnection;
|
} = appConnection;
|
||||||
|
|
||||||
const [host] = await verifyHostInputValidity(baseHost, !!gatewayId);
|
const [host] = await verifyHostInputValidity(baseHost);
|
||||||
|
|
||||||
const client = knex({
|
const client = knex({
|
||||||
client: SQL_CONNECTION_CLIENT_MAP[app],
|
client: SQL_CONNECTION_CLIENT_MAP[app],
|
||||||
|
|||||||
Reference in New Issue
Block a user