mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-13 23:29:34 +00:00
Merge branch 'main' into ENG-2932
This commit is contained in:
@@ -2279,6 +2279,9 @@ export const AppConnections = {
|
||||
ZABBIX: {
|
||||
apiToken: "The API Token used to access Zabbix.",
|
||||
instanceUrl: "The Zabbix instance URL to connect with."
|
||||
},
|
||||
RAILWAY: {
|
||||
apiToken: "The API token used to authenticate with Railway."
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -2477,6 +2480,14 @@ export const SecretSyncs = {
|
||||
hostId: "The ID of the Zabbix host to sync secrets to.",
|
||||
hostName: "The name of the Zabbix host to sync secrets to.",
|
||||
macroType: "The type of macro to sync secrets to. (0: Text, 1: Secret)"
|
||||
},
|
||||
RAILWAY: {
|
||||
projectId: "The ID of the Railway project to sync secrets to.",
|
||||
projectName: "The name of the Railway project to sync secrets to.",
|
||||
environmentId: "The Railway environment to sync secrets to.",
|
||||
environmentName: "The Railway environment to sync secrets to.",
|
||||
serviceId: "The Railway service that secrets should be synced to.",
|
||||
serviceName: "The Railway service that secrets should be synced to."
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -2597,7 +2608,9 @@ export const SecretRotations = {
|
||||
|
||||
export const SecretScanningDataSources = {
|
||||
LIST: (type?: SecretScanningDataSource) => ({
|
||||
projectId: `The ID of the project to list ${type ? SECRET_SCANNING_DATA_SOURCE_NAME_MAP[type] : "Scanning"} Data Sources from.`
|
||||
projectId: `The ID of the project to list ${
|
||||
type ? SECRET_SCANNING_DATA_SOURCE_NAME_MAP[type] : "Scanning"
|
||||
} Data Sources from.`
|
||||
}),
|
||||
GET_BY_ID: (type: SecretScanningDataSource) => ({
|
||||
dataSourceId: `The ID of the ${SECRET_SCANNING_DATA_SOURCE_NAME_MAP[type]} Data Source to retrieve.`
|
||||
|
||||
@@ -28,6 +28,7 @@ const databaseReadReplicaSchema = z
|
||||
const envSchema = z
|
||||
.object({
|
||||
INFISICAL_PLATFORM_VERSION: zpStr(z.string().optional()),
|
||||
KUBERNETES_AUTO_FETCH_SERVICE_ACCOUNT_TOKEN: zodStrBool.default("false"),
|
||||
PORT: z.coerce.number().default(IS_PACKAGED ? 8080 : 4000),
|
||||
DISABLE_SECRET_SCANNING: z
|
||||
.enum(["true", "false"])
|
||||
@@ -373,6 +374,19 @@ export const overwriteSchema: {
|
||||
fields: { key: keyof TEnvConfig; description?: string }[];
|
||||
};
|
||||
} = {
|
||||
aws: {
|
||||
name: "AWS",
|
||||
fields: [
|
||||
{
|
||||
key: "INF_APP_CONNECTION_AWS_ACCESS_KEY_ID",
|
||||
description: "The Access Key ID of your AWS account."
|
||||
},
|
||||
{
|
||||
key: "INF_APP_CONNECTION_AWS_SECRET_ACCESS_KEY",
|
||||
description: "The Client Secret of your AWS application."
|
||||
}
|
||||
]
|
||||
},
|
||||
azure: {
|
||||
name: "Azure",
|
||||
fields: [
|
||||
@@ -386,16 +400,79 @@ export const overwriteSchema: {
|
||||
}
|
||||
]
|
||||
},
|
||||
google_sso: {
|
||||
name: "Google SSO",
|
||||
gcp: {
|
||||
name: "GCP",
|
||||
fields: [
|
||||
{
|
||||
key: "CLIENT_ID_GOOGLE_LOGIN",
|
||||
description: "The Client ID of your GCP OAuth2 application."
|
||||
key: "INF_APP_CONNECTION_GCP_SERVICE_ACCOUNT_CREDENTIAL",
|
||||
description: "The GCP Service Account JSON credentials."
|
||||
}
|
||||
]
|
||||
},
|
||||
github_app: {
|
||||
name: "GitHub App",
|
||||
fields: [
|
||||
{
|
||||
key: "INF_APP_CONNECTION_GITHUB_APP_CLIENT_ID",
|
||||
description: "The Client ID of your GitHub application."
|
||||
},
|
||||
{
|
||||
key: "CLIENT_SECRET_GOOGLE_LOGIN",
|
||||
description: "The Client Secret of your GCP OAuth2 application."
|
||||
key: "INF_APP_CONNECTION_GITHUB_APP_CLIENT_SECRET",
|
||||
description: "The Client Secret of your GitHub application."
|
||||
},
|
||||
{
|
||||
key: "INF_APP_CONNECTION_GITHUB_APP_SLUG",
|
||||
description: "The Slug of your GitHub application. This is the one found in the URL."
|
||||
},
|
||||
{
|
||||
key: "INF_APP_CONNECTION_GITHUB_APP_ID",
|
||||
description: "The App ID of your GitHub application."
|
||||
},
|
||||
{
|
||||
key: "INF_APP_CONNECTION_GITHUB_APP_PRIVATE_KEY",
|
||||
description: "The Private Key of your GitHub application."
|
||||
}
|
||||
]
|
||||
},
|
||||
github_oauth: {
|
||||
name: "GitHub OAuth",
|
||||
fields: [
|
||||
{
|
||||
key: "INF_APP_CONNECTION_GITHUB_OAUTH_CLIENT_ID",
|
||||
description: "The Client ID of your GitHub OAuth application."
|
||||
},
|
||||
{
|
||||
key: "INF_APP_CONNECTION_GITHUB_OAUTH_CLIENT_SECRET",
|
||||
description: "The Client Secret of your GitHub OAuth application."
|
||||
}
|
||||
]
|
||||
},
|
||||
github_radar_app: {
|
||||
name: "GitHub Radar App",
|
||||
fields: [
|
||||
{
|
||||
key: "INF_APP_CONNECTION_GITHUB_RADAR_APP_CLIENT_ID",
|
||||
description: "The Client ID of your GitHub application."
|
||||
},
|
||||
{
|
||||
key: "INF_APP_CONNECTION_GITHUB_RADAR_APP_CLIENT_SECRET",
|
||||
description: "The Client Secret of your GitHub application."
|
||||
},
|
||||
{
|
||||
key: "INF_APP_CONNECTION_GITHUB_RADAR_APP_SLUG",
|
||||
description: "The Slug of your GitHub application. This is the one found in the URL."
|
||||
},
|
||||
{
|
||||
key: "INF_APP_CONNECTION_GITHUB_RADAR_APP_ID",
|
||||
description: "The App ID of your GitHub application."
|
||||
},
|
||||
{
|
||||
key: "INF_APP_CONNECTION_GITHUB_RADAR_APP_PRIVATE_KEY",
|
||||
description: "The Private Key of your GitHub application."
|
||||
},
|
||||
{
|
||||
key: "INF_APP_CONNECTION_GITHUB_RADAR_APP_WEBHOOK_SECRET",
|
||||
description: "The Webhook Secret of your GitHub application."
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -412,6 +489,19 @@ export const overwriteSchema: {
|
||||
}
|
||||
]
|
||||
},
|
||||
gitlab_oauth: {
|
||||
name: "GitLab OAuth",
|
||||
fields: [
|
||||
{
|
||||
key: "INF_APP_CONNECTION_GITLAB_OAUTH_CLIENT_ID",
|
||||
description: "The Client ID of your GitLab OAuth application."
|
||||
},
|
||||
{
|
||||
key: "INF_APP_CONNECTION_GITLAB_OAUTH_CLIENT_SECRET",
|
||||
description: "The Client Secret of your GitLab OAuth application."
|
||||
}
|
||||
]
|
||||
},
|
||||
gitlab_sso: {
|
||||
name: "GitLab SSO",
|
||||
fields: [
|
||||
@@ -429,6 +519,19 @@ export const overwriteSchema: {
|
||||
"The URL of your self-hosted instance of GitLab where the OAuth application is registered. If no URL is passed in, this will default to https://gitlab.com."
|
||||
}
|
||||
]
|
||||
},
|
||||
google_sso: {
|
||||
name: "Google SSO",
|
||||
fields: [
|
||||
{
|
||||
key: "CLIENT_ID_GOOGLE_LOGIN",
|
||||
description: "The Client ID of your GCP OAuth2 application."
|
||||
},
|
||||
{
|
||||
key: "CLIENT_SECRET_GOOGLE_LOGIN",
|
||||
description: "The Client Secret of your GCP OAuth2 application."
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
import axios from "axios";
|
||||
import axiosRetry from "axios-retry";
|
||||
import axios, { AxiosInstance, CreateAxiosDefaults } from "axios";
|
||||
import axiosRetry, { IAxiosRetryConfig } from "axios-retry";
|
||||
|
||||
export const request = axios.create();
|
||||
export function createRequestClient(defaults: CreateAxiosDefaults = {}, retry: IAxiosRetryConfig = {}): AxiosInstance {
|
||||
const client = axios.create(defaults);
|
||||
|
||||
axiosRetry(request, {
|
||||
retries: 3,
|
||||
// eslint-disable-next-line
|
||||
retryDelay: axiosRetry.exponentialDelay,
|
||||
retryCondition: (err) => axiosRetry.isNetworkError(err) || axiosRetry.isRetryableError(err)
|
||||
});
|
||||
axiosRetry(client, {
|
||||
retries: 3,
|
||||
// eslint-disable-next-line
|
||||
retryDelay: axiosRetry.exponentialDelay,
|
||||
retryCondition: (err) => axiosRetry.isNetworkError(err) || axiosRetry.isRetryableError(err),
|
||||
...retry
|
||||
});
|
||||
|
||||
return client;
|
||||
}
|
||||
|
||||
export const request = createRequestClient();
|
||||
|
||||
Reference in New Issue
Block a user