mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-03 20:26:05 +00:00
addressed requested changes
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import Redis from "ioredis";
|
import Redis from "ioredis";
|
||||||
|
|
||||||
|
import { verifyHostInputValidity } from "@app/ee/services/dynamic-secret/dynamic-secret-fns";
|
||||||
import { BadRequestError } from "@app/lib/errors";
|
import { BadRequestError } from "@app/lib/errors";
|
||||||
import { AppConnection } from "@app/services/app-connection/app-connection-enums";
|
import { AppConnection } from "@app/services/app-connection/app-connection-enums";
|
||||||
|
|
||||||
@@ -16,11 +17,13 @@ export const getRedisConnectionListItem = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const validateRedisConnectionCredentials = async (config: TRedisConnectionConfig) => {
|
export const validateRedisConnectionCredentials = async (config: TRedisConnectionConfig) => {
|
||||||
|
const [hostIp] = await verifyHostInputValidity(config.credentials.host);
|
||||||
|
|
||||||
let connection: Redis | null = null;
|
let connection: Redis | null = null;
|
||||||
try {
|
try {
|
||||||
connection = new Redis({
|
connection = new Redis({
|
||||||
username: config.credentials.username,
|
username: config.credentials.username,
|
||||||
host: config.credentials.host,
|
host: hostIp,
|
||||||
port: config.credentials.port,
|
port: config.credentials.port,
|
||||||
password: config.credentials.password,
|
password: config.credentials.password,
|
||||||
...(config.credentials.sslEnabled && {
|
...(config.credentials.sslEnabled && {
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import {
|
|||||||
OnePassConnectionMethod,
|
OnePassConnectionMethod,
|
||||||
OracleDBConnectionMethod,
|
OracleDBConnectionMethod,
|
||||||
PostgresConnectionMethod,
|
PostgresConnectionMethod,
|
||||||
|
RedisConnectionMethod,
|
||||||
TAppConnection,
|
TAppConnection,
|
||||||
TeamCityConnectionMethod,
|
TeamCityConnectionMethod,
|
||||||
TerraformCloudConnectionMethod,
|
TerraformCloudConnectionMethod,
|
||||||
@@ -156,6 +157,7 @@ export const getAppConnectionMethodDetails = (method: TAppConnection["method"])
|
|||||||
case MySqlConnectionMethod.UsernameAndPassword:
|
case MySqlConnectionMethod.UsernameAndPassword:
|
||||||
case OracleDBConnectionMethod.UsernameAndPassword:
|
case OracleDBConnectionMethod.UsernameAndPassword:
|
||||||
case AzureADCSConnectionMethod.UsernamePassword:
|
case AzureADCSConnectionMethod.UsernamePassword:
|
||||||
|
case RedisConnectionMethod.UsernameAndPassword:
|
||||||
return { name: "Username & Password", icon: faLock };
|
return { name: "Username & Password", icon: faLock };
|
||||||
case HCVaultConnectionMethod.AccessToken:
|
case HCVaultConnectionMethod.AccessToken:
|
||||||
case TeamCityConnectionMethod.AccessToken:
|
case TeamCityConnectionMethod.AccessToken:
|
||||||
|
|||||||
Reference in New Issue
Block a user