Skip to content

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

feat: add HPE ilo redfish app connection

Matheus Nogueirac042a10f4b3b
diff --git a/backend/src/lib/api-docs/constants.ts b/backend/src/lib/api-docs/constants.ts
index 35f78c552c..b67d43fd0e 100644
--- a/backend/src/lib/api-docs/constants.ts
+++ b/backend/src/lib/api-docs/constants.ts
@@ -3099,6 +3099,15 @@ export const AppConnections = {
blockedUsers:
"A comma-separated list of usernames that are blocked from being used in operations like secret rotation (e.g., 'root,admin,ubuntu')."
},
+ HPE_ILO: {
+ hostname: "The hostname or IP address of the HPE iLO management interface (e.g., 'ilo.example.com').",
+ port: "The HTTPS port of the HPE iLO Redfish API (default: 443).",
+ username: "The iLO local account username used to authenticate with the Redfish API.",
+ password: "The password for the iLO local account.",
+ sslRejectUnauthorized:
+ "Whether or not to reject untrusted SSL certificates (true/false). Set to false for iLO interfaces using self-signed certificates.",
+ sslCertificate: "The CA certificate (PEM format) used to verify the iLO interface's TLS certificate."
+ },
DBT: {
apiToken: "The API token used to authenticate with DBT.",
accountId: "The account ID of your DBT account.",
diff --git a/backend/src/server/routes/v1/app-connection-routers/app-connection-router.ts b/backend/src/server/routes/v1/app-connection-routers/app-connection-router.ts
index 1e30189771..b84301bac1 100644
--- a/backend/src/server/routes/v1/app-connection-routers/app-connection-router.ts
+++ b/backend/src/server/routes/v1/app-connection-routers/app-connection-router.ts
@@ -141,6 +141,7 @@ import {
SanitizedHCVaultConnectionSchema
} from "@app/services/app-connection/hc-vault";
import { HerokuConnectionListItemSchema, SanitizedHerokuConnectionSchema } from "@app/services/app-connection/heroku";
+import { HpeIloConnectionListItemSchema, SanitizedHpeIloConnectionSchema } from "@app/services/app-connection/hpe-ilo";
import {
HumanitecConnectionListItemSchema,
SanitizedHumanitecConnectionSchema
@@ -362,7 +363,8 @@ const SanitizedAppConnectionSchema = z.union([
...SanitizedPowerDnsConnectionSchema.options,
...SanitizedSpaceliftConnectionSchema.options,
...SanitizedDaytonaConnectionSchema.options,
- ...SanitizedStripeConnectionSchema.options
+ ...SanitizedStripeConnectionSchema.options,
+ ...SanitizedHpeIloConnectionSchema.options
]);
const AppConnectionOptionsSchema = z.discriminatedUnion("app", [
@@ -452,7 +454,8 @@ const AppConnectionOptionsSchema = z.discriminatedUnion("app", [
PowerDnsConnectionListItemSchema,
SpaceliftConnectionListItemSchema,
DaytonaConnectionListItemSchema,
- StripeConnectionListItemSchema
+ StripeConnectionListItemSchema,
+ HpeIloConnectionListItemSchema
]);
export const registerAppConnectionRouter = async (server: FastifyZodProvider) => {
diff --git a/backend/src/server/routes/v1/app-connection-routers/hpe-ilo-connection-router.ts b/backend/src/server/routes/v1/app-connection-routers/hpe-ilo-connection-router.ts
new file mode 100644
index 0000000000..5c2aa2a38e
--- /dev/null
+++ b/backend/src/server/routes/v1/app-connection-routers/hpe-ilo-connection-router.ts
@@ -0,0 +1,18 @@
+import { AppConnection } from "@app/services/app-connection/app-connection-enums";
+import {
+ CreateHpeIloConnectionSchema,
+ SanitizedHpeIloConnectionSchema,
+ UpdateHpeIloConnectionSchema
+} from "@app/services/app-connection/hpe-ilo";
+
+import { registerAppConnectionEndpoints } from "./app-connection-endpoints";
+
+export const registerHpeIloConnectionRouter = async (server: FastifyZodProvider) => {
+ registerAppConnectionEndpoints({
+ app: AppConnection.HpeIloRedFish,
+ server,
+ sanitizedResponseSchema: SanitizedHpeIloConnectionSchema,
+ createSchema: CreateHpeIloConnectionSchema,
+ updateSchema: UpdateHpeIloConnectionSchema
+ });
+};
diff --git a/backend/src/server/routes/v1/app-connection-routers/index.ts b/backend/src/server/routes/v1/app-connection-routers/index.ts
index 5622d8891f..d248ac982b 100644
--- a/backend/src/server/routes/v1/app-connection-routers/index.ts
+++ b/backend/src/server/routes/v1/app-connection-routers/index.ts
@@ -43,6 +43,7 @@ import { registerGoDaddyConnectionRouter } from "./godaddy-connection-router";
import { registerHasuraCloudConnectionRouter } from "./hasura-cloud-connection-router";
import { registerHCVaultConnectionRouter } from "./hc-vault-connection-router";
import { registerHerokuConnectionRouter } from "./heroku-connection-router";
+import { registerHpeIloConnectionRouter } from "./hpe-ilo-connection-router";
import { registerHumanitecConnectionRouter } from "./humanitec-connection-router";
import { registerKempLoadMasterConnectionRouter } from "./kemp-loadmaster-connection-router";
import { registerLaravelForgeConnectionRouter } from "./laravel-forge-connection-router";
@@ -178,5 +179,6 @@ export const APP_CONNECTION_REGISTER_ROUTER_MAP: Record<AppConnection, (server:
[AppConnection.NutanixPrismCentral]: registerNutanixPrismCentralConnectionRouter,
[AppConnection.Spacelift]: registerSpaceliftConnectionRouter,
[AppConnection.Daytona]: registerDaytonaConnectionRouter,
- [AppConnection.Stripe]: registerStripeConnectionRouter
+ [AppConnection.Stripe]: registerStripeConnectionRouter,
+ [AppConnection.HpeIloRedFish]: registerHpeIloConnectionRouter
};
diff --git a/backend/src/services/app-connection/app-connection-enums.ts b/backend/src/services/app-connection/app-connection-enums.ts
index 837345b039..c4b5c0dd87 100644
--- a/backend/src/services/app-connection/app-connection-enums.ts
+++ b/backend/src/services/app-connection/app-connection-enums.ts
@@ -85,7 +85,8 @@ export enum AppConnection {
PowerDns = "powerdns",
Spacelift = "spacelift",
Daytona = "daytona",
- Stripe = "stripe"
+ Stripe = "stripe",
+ HpeIloRedFish = "hpe-ilo"
}
export enum AWSRegion {
diff --git a/backend/src/services/app-connection/app-connection-fns.ts b/backend/src/services/app-connection/app-connection-fns.ts
index 6321a03075..14f8e02631 100644
--- a/backend/src/services/app-connection/app-connection-fns.ts
+++ b/backend/src/services/app-connection/app-connection-fns.ts
@@ -182,6 +182,7 @@ import {
} from "./hc-vault";
import { HerokuConnectionMethod } from "./heroku";
import { getHerokuConnectionListItem, validateHerokuConnectionCredentials } from "./heroku/heroku-connection-fns";
+import { getHpeIloConnectionListItem, HpeIloConnectionMethod, validateHpeIloConnectionCredentials } from "./hpe-ilo";
import {
getHumanitecConnectionListItem,
HumanitecConnectionMethod,
@@ -357,13 +358,18 @@ const PKI_APP_CONNECTIONS = [
const AGENT_VAULT_APP_CONNECTIONS = [AppConnection.AWS];
+// connections a Secret Manager feature will use but that no sync or rotation map references yet;
+// drop an entry once its rotation registers in SECRET_ROTATION_CONNECTION_MAP
+const PENDING_SECRET_MANAGER_APP_CONNECTIONS = [AppConnection.HpeIloRedFish];
+
export const isAppConnectionAllowedInProject = (app: AppConnection, projectType?: ProjectType) => {
switch (projectType) {
case ProjectType.SecretManager:
return (
Boolean(SECRET_SYNC_APP_CONNECTION_MAP[app]) ||
Boolean(SECRET_ROTATION_APP_CONNECTION_MAP[app]) ||
- EXTERNAL_MIGRATION_APP_CONNECTIONS.includes(app)
+ EXTERNAL_MIGRATION_APP_CONNECTIONS.includes(app) ||
+ PENDING_SECRET_MANAGER_APP_CONNECTIONS.includes(app)
);
case ProjectType.SecretScanning:
return Boolean(SECRET_SCANNING_APP_CONNECTION_MAP[app]);
@@ -472,7 +478,8 @@ export const listAppConnectionOptions = (projectType?: ProjectType) => {
getPowerDnsConnectionListItem(),
getSpaceliftConnectionListItem(),
getDaytonaConnectionListItem(),
- getStripeConnectionListItem()
+ getStripeConnectionListItem(),
+ getHpeIloConnectionListItem()
]
.filter((option) => isAppConnectionAllowedInProject(option.app, projectType))
.sort((a, b) => a.name.localeCompare(b.name));
@@ -709,7 +716,8 @@ export const validateAppConnectionCredentials = async (
[AppConnection.PowerDns]: validatePowerDnsConnectionCredentials as TAppConnectionCredentialsValidator,
[AppConnection.Spacelift]: validateSpaceliftConnectionCredentials as TAppConnectionCredentialsValidator,
[AppConnection.Daytona]: validateDaytonaConnectionCredentials as TAppConnectionCredentialsValidator,
- [AppConnection.Stripe]: validateStripeConnectionCredentials as TAppConnectionCredentialsValidator
+ [AppConnection.Stripe]: validateStripeConnectionCredentials as TAppConnectionCredentialsValidator,
+ [AppConnection.HpeIloRedFish]: validateHpeIloConnectionCredentials as TAppConnectionCredentialsValidator
};
return VALIDATE_APP_CONNECTION_CREDENTIALS_MAP[appConnection.app](appConnection, gatewayV2Service);
@@ -832,6 +840,7 @@ export const getAppConnectionMethodName = (method: TAppConnection["method"]) =>
case KempLoadMasterConnectionMethod.BasicAuth:
case F5BigIpConnectionMethod.BasicAuth:
case NutanixPrismCentralConnectionMethod.BasicAuth:
+ case HpeIloConnectionMethod.BasicAuth:
return "Basic Auth";
case ExternalInfisicalConnectionMethod.MachineIdentityUniversalAuth:
return "Machine Identity - Universal Auth";
@@ -987,7 +996,8 @@ export const TRANSITION_CONNECTION_CREDENTIALS_TO_PLATFORM: Record<
[AppConnection.PowerDns]: platformManagedCredentialsNotSupported,
[AppConnection.Spacelift]: platformManagedCredentialsNotSupported,
[AppConnection.Daytona]: platformManagedCredentialsNotSupported,
- [AppConnection.Stripe]: platformManagedCredentialsNotSupported
+ [AppConnection.Stripe]: platformManagedCredentialsNotSupported,
+ [AppConnection.HpeIloRedFish]: platformManagedCredentialsNotSupported
};
export const enterpriseAppCheck = async (
diff --git a/backend/src/services/app-connection/app-connection-maps.ts b/backend/src/services/app-connection/app-connection-maps.ts
index 47794df2b3..9789121715 100644
--- a/backend/src/services/app-connection/app-connection-maps.ts
+++ b/backend/src/services/app-connection/app-connection-maps.ts
@@ -87,7 +87,8 @@ export const APP_CONNECTION_NAME_MAP: Record<AppConnection, string> = {
[AppConnection.Spacelift]: "Spacelift",
[AppConnection.Daytona]: "Daytona",
[AppConnection.MicrosoftIntune]: "Microsoft Intune",
- [AppConnection.Stripe]: "Stripe"
+ [AppConnection.Stripe]: "Stripe",
+ [AppConnection.HpeIloRedFish]: "HPE iLO"
};
export const APP_CONNECTION_PLAN_MAP: Record<AppConnection, AppConnectionPlanType> = {
@@ -177,5 +178,6 @@ export const APP_CONNECTION_PLAN_MAP: Record<AppConnection, AppConnectionPlanTyp
[AppConnection.Spacelift]: AppConnectionPlanType.Regular,
[AppConnection.Daytona]: AppConnectionPlanType.Regular,
[AppConnection.MicrosoftIntune]: AppConnectionPlanType.Enterprise,
- [AppConnection.Stripe]: AppConnectionPlanType.Regular
+ [AppConnection.Stripe]: AppConnectionPlanType.Regular,
+ [AppConnection.HpeIloRedFish]: AppConnectionPlanType.Regular
};
diff --git a/backend/src/services/app-connection/app-connection-service.ts b/backend/src/services/app-connection/app-connection-service.ts
index c4f1ebb923..3cdfc82332 100644
--- a/backend/src/services/app-connection/app-connection-service.ts
+++ b/backend/src/services/app-connection/app-connection-service.ts
@@ -134,6 +134,7 @@ import { ValidateHCVaultConnectionCredentialsSchema } from "./hc-vault";
import { hcVaultConnectionService } from "./hc-vault/hc-vault-connection-service";
import { ValidateHerokuConnectionCredentialsSchema } from "./heroku";
import { herokuConnectionService } from "./heroku/heroku-connection-service";
+import { ValidateHpeIloConnectionCredentialsSchema } from "./hpe-ilo";
import { ValidateHumanitecConnectionCredentialsSchema } from "./humanitec";
import { humanitecConnectionService } from "./humanitec/humanitec-connection-service";
import { ValidateKempLoadMasterConnectionCredentialsSchema } from "./kemp-loadmaster";
@@ -321,7 +322,8 @@ const VALIDATE_APP_CONNECTION_CREDENTIALS_MAP: Record<AppConnection, TValidateAp
[AppConnection.PowerDns]: ValidatePowerDnsConnectionCredentialsSchema,
[AppConnection.Spacelift]: ValidateSpaceliftConnectionCredentialsSchema,
[AppConnection.Daytona]: ValidateDaytonaConnectionCredentialsSchema,
- [AppConnection.Stripe]: ValidateStripeConnectionCredentialsSchema
+ [AppConnection.Stripe]: ValidateStripeConnectionCredentialsSchema,
+ [AppConnection.HpeIloRedFish]: ValidateHpeIloConnectionCredentialsSchema
};
export const appConnectionServiceFactory = ({
diff --git a/backend/src/services/app-connection/app-connection-types.ts b/backend/src/services/app-connection/app-connection-types.ts
index 629a016ae3..e522d55332 100644
--- a/backend/src/services/app-connection/app-connection-types.ts
+++ b/backend/src/services/app-connection/app-connection-types.ts
@@ -261,6 +261,12 @@ import {
THerokuConnectionInput,
TValidateHerokuConnectionCredentialsSchema
} from "./heroku";
+import {
+ THpeIloConnection,
+ THpeIloConnectionConfig,
+ THpeIloConnectionInput,
+ TValidateHpeIloConnectionCredentialsSchema
+} from "./hpe-ilo";
import {
THumanitecConnection,
THumanitecConnectionConfig,
@@ -605,6 +611,7 @@ export type TAppConnection = { id: string; configuration?: TAppConnectionConfigu
| TSpaceliftConnection
| TDaytonaConnection
| TStripeConnection
+ | THpeIloConnection
);
export type TAppConnectionRaw = NonNullable<Awaited<ReturnType<TAppConnectionDALFactory["findById"]>>>;
@@ -703,6 +710,7 @@ export type TAppConnectionInput = { id: string } & (
| TSpaceliftConnectionInput
| TDaytonaConnectionInput
| TStripeConnectionInput
+ | THpeIloConnectionInput
);
export type TSqlConnectionInput =
@@ -834,7 +842,8 @@ export type TAppConnectionConfig =
| TPowerDnsConnectionConfig
| TSpaceliftConnectionConfig
| TDaytonaConnectionConfig
- | TStripeConnectionConfig;
+ | TStripeConnectionConfig
+ | THpeIloConnectionConfig;
export type TValidateAppConnectionCredentialsSchema =
| TValidateAwsConnectionCredentialsSchema
@@ -923,7 +932,8 @@ export type TValidateAppConnectionCredentialsSchema =
| TValidatePowerDnsConnectionCredentialsSchema
| TValidateSpaceliftConnectionCredentialsSchema
| TValidateDaytonaConnectionCredentialsSchema
- | TValidateStripeConnectionCredentialsSchema;
+ | TValidateStripeConnectionCredentialsSchema
+ | TValidateHpeIloConnectionCredentialsSchema;
export type TListAwsConnectionKmsKeys = {
connectionId: string;
diff --git a/backend/src/services/app-connection/hpe-ilo/hpe-ilo-connection-enums.ts b/backend/src/services/app-connection/hpe-ilo/hpe-ilo-connection-enums.ts
new file mode 100644
index 0000000000..f4e8adbb43
--- /dev/null
+++ b/backend/src/services/app-connection/hpe-ilo/hpe-ilo-connection-enums.ts
@@ -0,0 +1,3 @@
+export enum HpeIloConnectionMethod {
+ BasicAuth = "basic-auth"
+}
diff --git a/backend/src/services/app-connection/hpe-ilo/hpe-ilo-connection-fns.ts b/backend/src/services/app-connection/hpe-ilo/hpe-ilo-connection-fns.ts
new file mode 100644
index 0000000000..65c00f15e9
--- /dev/null
+++ b/backend/src/services/app-connection/hpe-ilo/hpe-ilo-connection-fns.ts
@@ -0,0 +1,150 @@
+import { AxiosRequestConfig, HttpStatusCode, isAxiosError } from "axios";
+
+import { TGatewayV2ServiceFactory } from "@app/ee/services/gateway-v2/gateway-v2-service";
+import { BadRequestError } from "@app/lib/errors";
+import { getMissingGatewayMessage } from "@app/lib/gateway-v2/gateway-errors";
+import { withGatewayV2Proxy } from "@app/lib/gateway-v2/gateway-v2";
+import { GatewayProxyProtocol } from "@app/lib/gateway-v2/types";
+import { safeRequest } from "@app/lib/validator";
+import { AppConnection } from "@app/services/app-connection/app-connection-enums";
+
+import { HpeIloConnectionMethod } from "./hpe-ilo-connection-enums";
+import { THpeIloConnectionConfig } from "./hpe-ilo-connection-types";
+
+export const HPE_ILO_DEFAULT_PORT = 443;
+const HPE_ILO_ACCOUNTS_PATH = "/redfish/v1/AccountService/Accounts/";
+
+export const getHpeIloConnectionListItem = () => {
+ return {
+ name: "HPE iLO" as const,
+ app: AppConnection.HpeIloRedFish as const,
+ methods: Object.values(HpeIloConnectionMethod) as [HpeIloConnectionMethod.BasicAuth]
+ };
+};
+
+const getHpeIloBaseUrl = (credentials: THpeIloConnectionConfig["credentials"]) =>
+ `https://${credentials.hostname}:${credentials.port ?? HPE_ILO_DEFAULT_PORT}`;
+
+const getHpeIloAuthHeaders = ({ username, password }: THpeIloConnectionConfig["credentials"]) => ({
+ Authorization: `Basic ${Buffer.from(`${username}:${password}`).toString("base64")}`,
+ Accept: "application/json",
+ "OData-Version": "4.0"
+});
+
+// requestCfg.url is a path relative to the iLO root (e.g. "/redfish/v1/Systems/1")
+export const executeHpeIloRequest = async <T>(
+ config: Pick<THpeIloConnectionConfig, "gatewayId" | "credentials">,
+ gatewayV2Service: Pick<TGatewayV2ServiceFactory, "getPlatformConnectionDetailsByGatewayId"> | undefined,
+ requestCfg: AxiosRequestConfig
+): Promise<T> => {
+ const { gatewayId, credentials } = config;
+ const { hostname } = credentials;
+ const port = credentials.port ?? HPE_ILO_DEFAULT_PORT;
+
+ const headers = { ...getHpeIloAuthHeaders(credentials), ...requestCfg.headers };
+ const tlsOptions = {
+ ca: credentials.sslCertificate,
+ rejectUnauthorized: credentials.sslRejectUnauthorized,
+ servername: hostname
+ };
+
+ if (gatewayId) {
+ // a pinned gateway must never fall through to the direct-dial branch below
+ if (!gatewayV2Service) {
+ throw new BadRequestError({ message: getMissingGatewayMessage(gatewayId) });
+ }
+
+ const platformConnectionDetails = await gatewayV2Service.getPlatformConnectionDetailsByGatewayId({
+ gatewayId,
+ targetHost: hostname,
+ targetPort: port
+ });
+
+ if (!platformConnectionDetails) {
+ throw new BadRequestError({ message: "Unable to connect to gateway, no platform connection details found" });
+ }
+
+ return withGatewayV2Proxy(
+ async (proxyPort) => {
+ const resp = await safeRequest.request<T>({
+ ...requestCfg,
+ ...tlsOptions,
+ url: `https://localhost:${proxyPort}${requestCfg.url ?? ""}`,
+ headers: { ...headers, Host: hostname },
+ // the hop is the local gateway proxy, and the iLO it reaches sits in the gateway's network
+ allowPrivateIps: true
+ });
+ return resp.data;
+ },
+ {
+ protocol: GatewayProxyProtocol.Tcp,
+ ...platformConnectionDetails
+ }
+ );
+ }
+
+ const resp = await safeRequest.request<T>({
+ ...requestCfg,
+ ...tlsOptions,
+ url: `${getHpeIloBaseUrl(credentials)}${requestCfg.url ?? ""}`,
+ headers
+ });
+ return resp.data;
+};
+
+type THpeIloAccountCollection = {
+ "@odata.id"?: string;
+ Members?: { "@odata.id": string }[];
+};
+
+export const validateHpeIloConnectionCredentials = async (
+ config: THpeIloConnectionConfig,
+ gatewayV2Service: Pick<TGatewayV2ServiceFactory, "getPlatformConnectionDetailsByGatewayId">
+) => {
+ const { hostname } = config.credentials;
+
+ let accounts: THpeIloAccountCollection;
+ try {
+ accounts = await executeHpeIloRequest<THpeIloAccountCollection>(config, gatewayV2Service, {
+ method: "GET",
+ url: HPE_ILO_ACCOUNTS_PATH
+ });
+ } catch (error: unknown) {
+ if (error instanceof BadRequestError) throw error;
+
+ if (isAxiosError(error)) {
+ if (error.response?.status === HttpStatusCode.Unauthorized) {
+ throw new BadRequestError({
+ message: `Unable to validate connection: HPE iLO at '${hostname}' rejected the username or password.`
+ });
+ }
+ if (error.response?.status === HttpStatusCode.Forbidden) {
+ throw new BadRequestError({
+ message: `Unable to validate connection: the iLO account is not permitted to read accounts on '${hostname}'. Check the account's privileges.`
+ });
+ }
+ if (error.response?.status === HttpStatusCode.NotFound) {
+ throw new BadRequestError({
+ message: `Unable to validate connection: '${hostname}' does not expose the Redfish account service. Verify the hostname points to an HPE iLO interface with Redfish enabled.`
+ });
+ }
+ if (error.response) {
+ throw new BadRequestError({
+ message: `Unable to validate connection: HPE iLO at '${hostname}' responded with status ${error.response.status}.`
+ });
+ }
+ }
+
+ throw new BadRequestError({
+ message: `Unable to validate connection: ${error instanceof Error ? error.message : `verify that HPE iLO at '${hostname}' is reachable`}`
+ });
+ }
+
+ if (!accounts || typeof accounts !== "object" || !Array.isArray(accounts.Members)) {
+ throw new BadRequestError({
+ message: `Unable to validate connection: '${hostname}' did not return a valid Redfish response. Verify the hostname points to an HPE iLO interface.`
+ });
+ }
+
+ return config.credentials;
+};
diff --git a/backend/src/services/app-connection/hpe-ilo/hpe-ilo-connection-schemas.ts b/backend/src/services/app-connection/hpe-ilo/hpe-ilo-connection-schemas.ts
new file mode 100644
index 0000000000..f63d016df0
--- /dev/null
+++ b/backend/src/services/app-connection/hpe-ilo/hpe-ilo-connection-schemas.ts
@@ -0,0 +1,105 @@
+import z from "zod";
+
+import { AppConnections } from "@app/lib/api-docs";
+import { AppConnection } from "@app/services/app-connection/app-connection-enums";
+import {
+ BaseAppConnectionSchema,
+ GenericCreateAppConnectionFieldsSchema,
+ GenericUpdateAppConnectionFieldsSchema
+} from "@app/services/app-connection/app-connection-schemas";
+
+import { APP_CONNECTION_NAME_MAP } from "../app-connection-maps";
+import { HpeIloConnectionMethod } from "./hpe-ilo-connection-enums";
+
+export const HpeIloConnectionBasicAuthCredentialsSchema = z.object({
+ hostname: z
+ .string()
+ .trim()
+ .min(1, "Hostname is required")
+ .max(512, "Hostname cannot exceed 512 characters")
+ .refine(
+ (val) =>
+ !val.includes("/") && !val.includes("@") && !val.includes("?") && !val.includes(":") && !val.includes("#"),
+ {
+ message: "Hostname must be a hostname or IP address without a scheme, port, or path"
+ }
+ )
+ .describe(AppConnections.CREDENTIALS.HPE_ILO.hostname),
+ port: z.number().int().min(1).max(65535).optional().describe(AppConnections.CREDENTIALS.HPE_ILO.port),
+ username: z
+ .string()
+ .trim()
+ .min(1, "Username is required")
+ .max(256, "Username cannot exceed 256 characters")
+ .describe(AppConnections.CREDENTIALS.HPE_ILO.username),
+ password: z
+ .string()
+ .min(1, "Password is required")
+ .max(512, "Password cannot exceed 512 characters")
+ .describe(AppConnections.CREDENTIALS.HPE_ILO.password),
+ sslRejectUnauthorized: z.boolean().optional().describe(AppConnections.CREDENTIALS.HPE_ILO.sslRejectUnauthorized),
+ sslCertificate: z
+ .string()
+ .trim()
+ .max(16384, "SSL certificate cannot exceed 16384 characters")
+ .transform((value) => value || undefined)
+ .optional()
+ .describe(AppConnections.CREDENTIALS.HPE_ILO.sslCertificate)
+});
+
+const BaseHpeIloConnectionSchema = BaseAppConnectionSchema.extend({ app: z.literal(AppConnection.HpeIloRedFish) });
+
+export const HpeIloConnectionSchema = BaseHpeIloConnectionSchema.extend({
+ method: z.literal(HpeIloConnectionMethod.BasicAuth),
+ credentials: HpeIloConnectionBasicAuthCredentialsSchema
+});
+
+export const SanitizedHpeIloConnectionSchema = z.discriminatedUnion("method", [
+ BaseHpeIloConnectionSchema.extend({
+ method: z.literal(HpeIloConnectionMethod.BasicAuth),
+ credentials: HpeIloConnectionBasicAuthCredentialsSchema.pick({
+ hostname: true,
+ port: true,
+ username: true,
+ sslRejectUnauthorized: true,
+ sslCertificate: true
+ })
+ }).describe(JSON.stringify({ title: `${APP_CONNECTION_NAME_MAP[AppConnection.HpeIloRedFish]} (Basic Auth)` }))
+]);
+
+export const ValidateHpeIloConnectionCredentialsSchema = z.discriminatedUnion("method", [
+ z.object({
+ method: z
+ .literal(HpeIloConnectionMethod.BasicAuth)
+ .describe(AppConnections.CREATE(AppConnection.HpeIloRedFish).method),
+ credentials: HpeIloConnectionBasicAuthCredentialsSchema.describe(
+ AppConnections.CREATE(AppConnection.HpeIloRedFish).credentials
+ )
+ })
+]);
+
+export const CreateHpeIloConnectionSchema = ValidateHpeIloConnectionCredentialsSchema.and(
+ GenericCreateAppConnectionFieldsSchema(AppConnection.HpeIloRedFish, {
+ supportsGateways: true
+ })
+);
+
+export const UpdateHpeIloConnectionSchema = z
+ .object({
+ credentials: HpeIloConnectionBasicAuthCredentialsSchema.optional().describe(
+ AppConnections.UPDATE(AppConnection.HpeIloRedFish).credentials
+ )
+ })
+ .and(
+ GenericUpdateAppConnectionFieldsSchema(AppConnection.HpeIloRedFish, {
+ supportsGateways: true
+ })
+ );
+
+export const HpeIloConnectionListItemSchema = z
+ .object({
+ name: z.literal("HPE iLO"),
+ app: z.literal(AppConnection.HpeIloRedFish),
+ methods: z.nativeEnum(HpeIloConnectionMethod).array()
+ })
+ .describe(JSON.stringify({ title: APP_CONNECTION_NAME_MAP[AppConnection.HpeIloRedFish] }));
diff --git a/backend/src/services/app-connection/hpe-ilo/hpe-ilo-connection-types.ts b/backend/src/services/app-connection/hpe-ilo/hpe-ilo-connection-types.ts
new file mode 100644
index 0000000000..460e0e1ecc
--- /dev/null
+++ b/backend/src/services/app-connection/hpe-ilo/hpe-ilo-connection-types.ts
@@ -0,0 +1,25 @@
+import z from "zod";
+
+import { DiscriminativePick } from "@app/lib/types";
+
+import { AppConnection } from "../app-connection-enums";
+import {
+ CreateHpeIloConnectionSchema,
+ HpeIloConnectionSchema,
+ ValidateHpeIloConnectionCredentialsSchema
+} from "./hpe-ilo-connection-schemas";
+
+export type THpeIloConnection = z.infer<typeof HpeIloConnectionSchema>;
+
+export type THpeIloConnectionInput = z.infer<typeof CreateHpeIloConnectionSchema> & {
+ app: AppConnection.HpeIloRedFish;
+};
+
+export type TValidateHpeIloConnectionCredentialsSchema = typeof ValidateHpeIloConnectionCredentialsSchema;
+
+export type THpeIloConnectionConfig = DiscriminativePick<
+ THpeIloConnectionInput,
+ "method" | "app" | "credentials" | "gatewayId" | "gatewayPoolId"
+> & {
+ orgId: string;
+};
diff --git a/backend/src/services/app-connection/hpe-ilo/index.ts b/backend/src/services/app-connection/hpe-ilo/index.ts
new file mode 100644
index 0000000000..ff923a9a40
--- /dev/null
+++ b/backend/src/services/app-connection/hpe-ilo/index.ts
@@ -0,0 +1,19 @@
+export { HpeIloConnectionMethod } from "./hpe-ilo-connection-enums";
+export {
+ executeHpeIloRequest,
+ getHpeIloConnectionListItem,
+ validateHpeIloConnectionCredentials
+} from "./hpe-ilo-connection-fns";
+export {
+ CreateHpeIloConnectionSchema,
+ HpeIloConnectionListItemSchema,
+ SanitizedHpeIloConnectionSchema,
+ UpdateHpeIloConnectionSchema,
+ ValidateHpeIloConnectionCredentialsSchema
+} from "./hpe-ilo-connection-schemas";
+export type {
+ THpeIloConnection,
+ THpeIloConnectionConfig,
+ THpeIloConnectionInput,
+ TValidateHpeIloConnectionCredentialsSchema
+} from "./hpe-ilo-connection-types";
diff --git a/docs/.vale/styles/config/vocabularies/Infisical/canonical/accept.txt b/docs/.vale/styles/config/vocabularies/Infisical/canonical/accept.txt
index 78f10c432b..fb30569260 100644
--- a/docs/.vale/styles/config/vocabularies/Infisical/canonical/accept.txt
+++ b/docs/.vale/styles/config/vocabularies/Infisical/canonical/accept.txt
@@ -315,7 +315,9 @@ Dell
PowerEdge
iDRAC
HP
+HPE
iLO
+Redfish
Patroni
# --- Databases ---
diff --git a/docs/api-reference/endpoints/app-connections/hpe-ilo/available.mdx b/docs/api-reference/endpoints/app-connections/hpe-ilo/available.mdx
new file mode 100644
index 0000000000..1215bc4fd3
--- /dev/null
+++ b/docs/api-reference/endpoints/app-connections/hpe-ilo/available.mdx
@@ -0,0 +1,4 @@
+---
+title: "Available"
+openapi: "GET /api/v1/app-connections/hpe-ilo/available"
+---
diff --git a/docs/api-reference/endpoints/app-connections/hpe-ilo/create.mdx b/docs/api-reference/endpoints/app-connections/hpe-ilo/create.mdx
new file mode 100644
index 0000000000..54be822d51
--- /dev/null
+++ b/docs/api-reference/endpoints/app-connections/hpe-ilo/create.mdx
@@ -0,0 +1,10 @@
+---
+title: "Create"
+openapi: "POST /api/v1/app-connections/hpe-ilo"
+---
+
+<Note>
+ Check out the configuration docs for [HPE iLO
+ Connections](/integrations/app-connections/hpe-ilo) to learn how to obtain the
+ required credentials.
+</Note>
diff --git a/docs/api-reference/endpoints/app-connections/hpe-ilo/delete.mdx b/docs/api-reference/endpoints/app-connections/hpe-ilo/delete.mdx
new file mode 100644
index 0000000000..57cec78b35
--- /dev/null
+++ b/docs/api-reference/endpoints/app-connections/hpe-ilo/delete.mdx
@@ -0,0 +1,4 @@
+---
+title: "Delete"
+openapi: "DELETE /api/v1/app-connections/hpe-ilo/{connectionId}"
+---
diff --git a/docs/api-reference/endpoints/app-connections/hpe-ilo/get-by-id.mdx b/docs/api-reference/endpoints/app-connections/hpe-ilo/get-by-id.mdx
new file mode 100644
index 0000000000..df64e4cec9
--- /dev/null
+++ b/docs/api-reference/endpoints/app-connections/hpe-ilo/get-by-id.mdx
@@ -0,0 +1,4 @@
+---
+title: "Get by ID"
+openapi: "GET /api/v1/app-connections/hpe-ilo/{connectionId}"
+---
diff --git a/docs/api-reference/endpoints/app-connections/hpe-ilo/get-by-name.mdx b/docs/api-reference/endpoints/app-connections/hpe-ilo/get-by-name.mdx
new file mode 100644
index 0000000000..4496256237
--- /dev/null
+++ b/docs/api-reference/endpoints/app-connections/hpe-ilo/get-by-name.mdx
@@ -0,0 +1,4 @@
+---
+title: "Get by name"
+openapi: "GET /api/v1/app-connections/hpe-ilo/connection-name/{connectionName}"
+---
diff --git a/docs/api-reference/endpoints/app-connections/hpe-ilo/list.mdx b/docs/api-reference/endpoints/app-connections/hpe-ilo/list.mdx
new file mode 100644
index 0000000000..96113a0414
--- /dev/null
+++ b/docs/api-reference/endpoints/app-connections/hpe-ilo/list.mdx
@@ -0,0 +1,4 @@
+---
+title: "List"
+openapi: "GET /api/v1/app-connections/hpe-ilo"
+---
diff --git a/docs/api-reference/endpoints/app-connections/hpe-ilo/update.mdx b/docs/api-reference/endpoints/app-connections/hpe-ilo/update.mdx
new file mode 100644
index 0000000000..382c97547c
--- /dev/null
+++ b/docs/api-reference/endpoints/app-connections/hpe-ilo/update.mdx
@@ -0,0 +1,10 @@
+---
+title: "Update"
+openapi: "PATCH /api/v1/app-connections/hpe-ilo/{connectionId}"
+---
+
+<Note>
+ Check out the configuration docs for [HPE iLO
+ Connections](/integrations/app-connections/hpe-ilo) to learn how to obtain the
+ required credentials.
+</Note>
diff --git a/docs/docs.json b/docs/docs.json
index 5cedb4298b..19de4b7acd 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -1096,6 +1096,7 @@
"integrations/app-connections/hashicorp-vault",
"integrations/app-connections/hasura-cloud",
"integrations/app-connections/heroku",
+ "integrations/app-connections/hpe-ilo",
"integrations/app-connections/humanitec",
"integrations/app-connections/kemp-loadmaster",
"integrations/app-connections/external-infisical",
@@ -2087,6 +2088,18 @@
"api-reference/endpoints/app-connections/heroku/delete"
]
},
+ {
+ "group": "HPE iLO",
+ "pages": [
+ "api-reference/endpoints/app-connections/hpe-ilo/list",
+ "api-reference/endpoints/app-connections/hpe-ilo/available",
+ "api-reference/endpoints/app-connections/hpe-ilo/get-by-id",
+ "api-reference/endpoints/app-connections/hpe-ilo/get-by-name",
+ "api-reference/endpoints/app-connections/hpe-ilo/create",
+ "api-reference/endpoints/app-connections/hpe-ilo/update",
+ "api-reference/endpoints/app-connections/hpe-ilo/delete"
+ ]
+ },
{
"group": "Humanitec",
"pages": [
diff --git a/docs/images/app-connections/hpe-ilo/connection-form.png b/docs/images/app-connections/hpe-ilo/connection-form.png
new file mode 100644
index 0000000000..ec0cab068c
Binary files /dev/null and b/docs/images/app-connections/hpe-ilo/connection-form.png differ
diff --git a/docs/images/app-connections/hpe-ilo/select-connection.png b/docs/images/app-connections/hpe-ilo/select-connection.png
new file mode 100644
index 0000000000..8395edb4eb
Binary files /dev/null and b/docs/images/app-connections/hpe-ilo/select-connection.png differ
diff --git a/docs/integrations/app-connections/hpe-ilo.mdx b/docs/integrations/app-connections/hpe-ilo.mdx
new file mode 100644
index 0000000000..49a653959f
--- /dev/null
+++ b/docs/integrations/app-connections/hpe-ilo.mdx
@@ -0,0 +1,84 @@
+---
+title: "HPE iLO connection"
+sidebarTitle: "HPE iLO"
+description: "Learn how to configure an HPE iLO connection for Infisical."
+---
+
+import ConnectionFormFields from "/snippets/app-connections/hpe-ilo/form-fields.mdx";
+
+An HPE iLO connection authenticates Infisical to HPE Integrated Lights-Out (iLO), the management interface of HPE servers, with the username and password of an iLO local account. Infisical uses the connection to manage iLO local accounts through the iLO [Redfish API](https://servermanagementportal.ext.hpe.com/docs/redfishservices/ilos/).
+
+<Note>
+ This guide only authenticates Infisical with HPE iLO. Once the app connection is ready, you can [use it to set up integrations](#step-2-configure-integrations).
+</Note>
+
+## Prerequisites
+
+- An HPE iLO that Infisical can reach over HTTPS, either directly or through a [Gateway](/documentation/platform/gateways/overview)
+- An iLO local account with at least the **Login** privilege, for Infisical to sign in with
+
+## Step 1: Create the app connection
+
+<Tip>
+ To create the connection using the API, use the [Create HPE iLO Connection](/api-reference/endpoints/app-connections/hpe-ilo/create) endpoint.
+</Tip>
+
+<View title="Organization-level">
+ <Steps>
+ <Step>
+ In the sidebar, select **Integrations**, then open the **App Connections** tab.
+
+ ![App Connections Tab](/images/app-connections/general/add-connection.png)
+ </Step>
+ <Step>
+ Select **Add Connection** and choose **HPE iLO**.
+
+ ![Select HPE iLO Connection](/images/app-connections/hpe-ilo/select-connection.png)
+ </Step>
+ <Step>
+ Fill out the form's fields:
+
+ <ConnectionFormFields />
+
+ Then, select **Connect to HPE iLO**.
+
+ ![HPE iLO Connection Form](/images/app-connections/hpe-ilo/connection-form.png)
+ </Step>
+ </Steps>
+</View>
+
+<View title="Project-level">
+ <Steps>
+ <Step>
+ In your Secrets Manager project, select **Integrations** from the sidebar, then open the **App Connections** tab.
+ </Step>
+ <Step>
+ Select **Add Connection** and choose **HPE iLO**.
+
+ ![Select HPE iLO Connection](/images/app-connections/hpe-ilo/select-connection.png)
+ </Step>
+ <Step>
+ Fill out the form's fields:
+
+ <ConnectionFormFields />
+
+ Then, select **Connect to HPE iLO**.
+
+ ![HPE iLO Connection Form](/images/app-connections/hpe-ilo/connection-form.png)
+ </Step>
+ </Steps>
+</View>
+
+When you select **Connect to HPE iLO**, Infisical signs in to the iLO with the account's username and password and reads the list of iLO accounts. If the iLO rejects the username or password, or the account can't read the account list, Infisical shows an error and doesn't save the connection.
+
+<Check>
+ Your HPE iLO app connection is ready to use.
+</Check>
+
+## Step 2: Configure integrations
+
+Now that your HPE iLO app connection is configured, you can use it to set up the following integrations:
+
+<Card title="HP iLO local account rotation" icon="rotate-cw" href="/documentation/platform/secret-rotation/hp-ilo-local-account">
+ Rotate the password of an iLO local account on a schedule.
+</Card>
diff --git a/docs/snippets/app-connections/hpe-ilo/form-fields.mdx b/docs/snippets/app-connections/hpe-ilo/form-fields.mdx
new file mode 100644
index 0000000000..cb88a241ba
--- /dev/null
+++ b/docs/snippets/app-connections/hpe-ilo/form-fields.mdx
@@ -0,0 +1,9 @@
+- **Name**: A descriptive name for the connection
+- **Description** (optional): A note for future reference
+- **Gateway** (optional): The [Gateway](/documentation/platform/gateways/overview) Infisical connects through, if Infisical can't reach the iLO directly
+- **Hostname**: The hostname or IP address of the iLO, without `https://` or a port (for example, `ilo.example.com`)
+- **Port** (optional): The HTTPS port of the iLO (defaults to `443`)
+- **Username**: The login name of the [iLO local account](#prerequisites) Infisical signs in with
+- **Password**: The password of the iLO account
+- **SSL Certificate** (optional): On the **SSL** tab, the CA certificate in PEM format that signed the iLO's TLS certificate
+- **Reject Unauthorized**: On the **SSL** tab, whether Infisical refuses to connect when it can't verify the iLO's TLS certificate (on by default; for a self-signed certificate, enter its CA certificate in **SSL Certificate** instead of turning this off)
diff --git a/docs/snippets/catalogs/app-connections.jsx b/docs/snippets/catalogs/app-connections.jsx
index 6677b2c5c1..61837b57de 100644
--- a/docs/snippets/catalogs/app-connections.jsx
+++ b/docs/snippets/catalogs/app-connections.jsx
@@ -591,6 +591,14 @@ export const appConnections = [
"Learn how to connect F5 BIG-IP to deploy and manage certificates with Infisical.",
category: "Networking & DNS",
},
+ {
+ name: "HPE iLO",
+ slug: "hpe-ilo",
+ path: "/integrations/app-connections/hpe-ilo",
+ description:
+ "Learn how to connect HPE iLO to manage iLO local accounts with Infisical.",
+ category: "Networking & DNS",
+ },
{
name: "NetScaler",
slug: "netscaler",
diff --git a/frontend/public/images/integrations/HPE iLO.png b/frontend/public/images/integrations/HPE iLO.png
new file mode 100644
index 0000000000..309736e7a7
Binary files /dev/null and b/frontend/public/images/integrations/HPE iLO.png differ
diff --git a/frontend/src/helpers/appConnections.ts b/frontend/src/helpers/appConnections.ts
index be90197232..da4b28248c 100644
--- a/frontend/src/helpers/appConnections.ts
+++ b/frontend/src/helpers/appConnections.ts
@@ -73,6 +73,7 @@ import { FireworksConnectionMethod } from "@app/hooks/api/appConnections/types/f
import { GoDaddyConnectionMethod } from "@app/hooks/api/appConnections/types/godaddy-connection";
import { HasuraCloudConnectionMethod } from "@app/hooks/api/appConnections/types/hasura-cloud-connection";
import { HerokuConnectionMethod } from "@app/hooks/api/appConnections/types/heroku-connection";
+import { HpeIloConnectionMethod } from "@app/hooks/api/appConnections/types/hpe-ilo-connection";
import { KempLoadMasterConnectionMethod } from "@app/hooks/api/appConnections/types/kemp-loadmaster-connection";
import { LaravelForgeConnectionMethod } from "@app/hooks/api/appConnections/types/laravel-forge-connection";
import { LiteLLMConnectionMethod } from "@app/hooks/api/appConnections/types/litellm-connection";
@@ -611,6 +612,12 @@ export const APP_CONNECTION_MAP: Record<
category: "NETWORKING",
description: "Manage an F5 BIG-IP appliance."
},
+ [AppConnection.HpeIloRedFish]: {
+ name: "HPE iLO",
+ image: "HPE iLO.png",
+ category: "INFRASTRUCTURE",
+ description: "Manage an HPE iLO server through the Redfish API."
+ },
[AppConnection.Convex]: {
name: "Convex",
image: "Convex.png",
@@ -801,6 +808,7 @@ export const getAppConnectionMethodDetails = (method: TAppConnection["method"])
case KempLoadMasterConnectionMethod.BasicAuth:
case NutanixPrismCentralConnectionMethod.BasicAuth:
case F5BigIpConnectionMethod.BasicAuth:
+ case HpeIloConnectionMethod.BasicAuth:
return { name: "Basic Auth", icon: LockIcon };
case NutanixPrismCentralConnectionMethod.ApiKey:
return { name: "API Key", icon: KeyRoundIcon };
diff --git a/frontend/src/hooks/api/appConnections/enums.ts b/frontend/src/hooks/api/appConnections/enums.ts
index a96510fac9..180e3fd263 100644
--- a/frontend/src/hooks/api/appConnections/enums.ts
+++ b/frontend/src/hooks/api/appConnections/enums.ts
@@ -85,5 +85,6 @@ export enum AppConnection {
NutanixPrismCentral = "nutanix-prism-central",
Spacelift = "spacelift",
Daytona = "daytona",
- Stripe = "stripe"
+ Stripe = "stripe",
+ HpeIloRedFish = "hpe-ilo"
}
diff --git a/frontend/src/hooks/api/appConnections/types/app-options.ts b/frontend/src/hooks/api/appConnections/types/app-options.ts
index b7c6b5cddc..a432ba9f77 100644
--- a/frontend/src/hooks/api/appConnections/types/app-options.ts
+++ b/frontend/src/hooks/api/appConnections/types/app-options.ts
@@ -335,6 +335,10 @@ export type TF5BigIpConnectionOption = TAppConnectionOptionBase & {
app: AppConnection.F5BigIp;
};
+export type THpeIloConnectionOption = TAppConnectionOptionBase & {
+ app: AppConnection.HpeIloRedFish;
+};
+
export type TConvexConnectionOption = TAppConnectionOptionBase & {
app: AppConnection.Convex;
};
@@ -441,6 +445,7 @@ export type TAppConnectionOption =
| TSnowflakeConnectionOption
| TDatadogConnectionOption
| TF5BigIpConnectionOption
+ | THpeIloConnectionOption
| TConvexConnectionOption
| TTriggerDevConnectionOption
| TRundeckConnectionOption
@@ -530,6 +535,7 @@ export type TAppConnectionOptionMap = {
[AppConnection.Snowflake]: TSnowflakeConnectionOption;
[AppConnection.Datadog]: TDatadogConnectionOption;
[AppConnection.F5BigIp]: TF5BigIpConnectionOption;
+ [AppConnection.HpeIloRedFish]: THpeIloConnectionOption;
[AppConnection.Convex]: TConvexConnectionOption;
[AppConnection.TriggerDev]: TTriggerDevConnectionOption;
[AppConnection.Rundeck]: TRundeckConnectionOption;
diff --git a/frontend/src/hooks/api/appConnections/types/hpe-ilo-connection.ts b/frontend/src/hooks/api/appConnections/types/hpe-ilo-connection.ts
new file mode 100644
index 0000000000..c051749f18
--- /dev/null
+++ b/frontend/src/hooks/api/appConnections/types/hpe-ilo-connection.ts
@@ -0,0 +1,18 @@
+import { AppConnection } from "@app/hooks/api/appConnections/enums";
+import { TRootAppConnection } from "@app/hooks/api/appConnections/types/root-connection";
+
+export enum HpeIloConnectionMethod {
+ BasicAuth = "basic-auth"
+}
+
+export type THpeIloConnection = TRootAppConnection & { app: AppConnection.HpeIloRedFish } & {
+ method: HpeIloConnectionMethod.BasicAuth;
+ credentials: {
+ hostname: string;
+ port?: number;
+ username: string;
+ password: string;
+ sslRejectUnauthorized?: boolean;
+ sslCertificate?: string;
+ };
+};
diff --git a/frontend/src/hooks/api/appConnections/types/index.ts b/frontend/src/hooks/api/appConnections/types/index.ts
index 6a0ecd242a..1cab24f95e 100644
--- a/frontend/src/hooks/api/appConnections/types/index.ts
+++ b/frontend/src/hooks/api/appConnections/types/index.ts
@@ -41,6 +41,7 @@ import { TGoDaddyConnection } from "./godaddy-connection";
import { THasuraCloudConnection } from "./hasura-cloud-connection";
import { THCVaultConnection } from "./hc-vault-connection";
import { THerokuConnection } from "./heroku-connection";
+import { THpeIloConnection } from "./hpe-ilo-connection";
import { THumanitecConnection } from "./humanitec-connection";
import { TKempLoadMasterConnection } from "./kemp-loadmaster-connection";
import { TLaravelForgeConnection } from "./laravel-forge-connection";
@@ -126,6 +127,7 @@ export * from "./gitlab-connection";
export * from "./hasura-cloud-connection";
export * from "./hc-vault-connection";
export * from "./heroku-connection";
+export * from "./hpe-ilo-connection";
export * from "./humanitec-connection";
export * from "./kemp-loadmaster-connection";
export * from "./laravel-forge-connection";
@@ -260,7 +262,8 @@ export type TAppConnection =
| TPowerDnsConnection
| TSpaceliftConnection
| TDaytonaConnection
- | TStripeConnection;
+ | TStripeConnection
+ | THpeIloConnection;
export type TAvailableAppConnection = Pick<TAppConnection, "name" | "id" | "projectId">;
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AppConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AppConnectionForm.tsx
index 77e7932cda..26d9f9bf07 100644
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AppConnectionForm.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AppConnectionForm.tsx
@@ -55,6 +55,7 @@ import { GoDaddyConnectionForm } from "./GoDaddyConnectionForm";
import { HasuraCloudConnectionForm } from "./HasuraCloudConnectionForm";
import { HCVaultConnectionForm } from "./HCVaultConnectionForm";
import { HerokuConnectionForm } from "./HerokuAppConnectionForm";
+import { HpeIloConnectionForm } from "./HpeIloConnectionForm";
import { HumanitecConnectionForm } from "./HumanitecConnectionForm";
import { KempLoadMasterConnectionForm } from "./KempLoadMasterConnectionForm";
import { LaravelForgeConnectionForm } from "./LaravelForgeConnectionForm";
@@ -366,6 +367,8 @@ const CreateForm = ({ app, onComplete, projectId }: CreateFormProps) => {
return <DatadogConnectionForm onSubmit={onSubmit} />;
case AppConnection.F5BigIp:
return <F5BigIpConnectionForm onSubmit={onSubmit} />;
+ case AppConnection.HpeIloRedFish:
+ return <HpeIloConnectionForm onSubmit={onSubmit} />;
case AppConnection.Convex:
return <ConvexConnectionForm onSubmit={onSubmit} />;
case AppConnection.Rundeck:
@@ -649,6 +652,8 @@ const UpdateForm = ({ appConnection, onComplete }: UpdateFormProps) => {
return <DatadogConnectionForm onSubmit={onSubmit} appConnection={appConnection} />;
case AppConnection.F5BigIp:
return <F5BigIpConnectionForm onSubmit={onSubmit} appConnection={appConnection} />;
+ case AppConnection.HpeIloRedFish:
+ return <HpeIloConnectionForm onSubmit={onSubmit} appConnection={appConnection} />;
case AppConnection.Convex:
return <ConvexConnectionForm onSubmit={onSubmit} appConnection={appConnection} />;
case AppConnection.Rundeck:
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/HpeIloConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/HpeIloConnectionForm.tsx
new file mode 100644
index 0000000000..1e4936eee5
--- /dev/null
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/HpeIloConnectionForm.tsx
@@ -0,0 +1,331 @@
+import { useState } from "react";
+import { Controller, FormProvider, useForm } from "react-hook-form";
+import { zodResolver } from "@hookform/resolvers/zod";
+import { Info } from "lucide-react";
+import { z } from "zod";
+
+import { OrgPermissionCan } from "@app/components/permissions";
+import {
+ Field,
+ FieldContent,
+ FieldDescription,
+ FieldError,
+ FieldLabel,
+ Input,
+ Label,
+ SecretInput,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+ Tabs,
+ TabsContent,
+ TabsList,
+ TabsTrigger,
+ TextArea,
+ Toggle,
+ Tooltip,
+ TooltipContent,
+ TooltipTrigger
+} from "@app/components/v3";
+import { GatewayPicker } from "@app/components/v3/platform/GatewayPicker";
+import { OrgPermissionSubjects } from "@app/context";
+import { OrgGatewayPermissionActions } from "@app/context/OrgPermissionContext/types";
+import { APP_CONNECTION_MAP, getAppConnectionMethodDetails } from "@app/helpers/appConnections";
+import { useScopeVariant } from "@app/hooks";
+import { HpeIloConnectionMethod, THpeIloConnection } from "@app/hooks/api/appConnections";
+import { AppConnection } from "@app/hooks/api/appConnections/enums";
+
+import { AppConnectionFormFooter } from "./AppConnectionFormFooter";
+import {
+ genericAppConnectionFieldsSchema,
+ GenericAppConnectionsFields
+} from "./GenericAppConnectionFields";
+
+type Props = {
+ appConnection?: THpeIloConnection;
+ onSubmit: (formData: FormData) => Promise<void>;
+};
+
+const rootSchema = genericAppConnectionFieldsSchema.extend({
+ app: z.literal(AppConnection.HpeIloRedFish)
+});
+
+const formSchema = z.discriminatedUnion("method", [
+ rootSchema.extend({
+ method: z.literal(HpeIloConnectionMethod.BasicAuth),
+ credentials: z.object({
+ hostname: z
+ .string()
+ .trim()
+ .min(1, "Hostname is required")
+ .max(512, "Hostname cannot exceed 512 characters")
+ .refine((val) => !/[/@?:#]/.test(val), {
+ message: "Enter a hostname or IP address without a scheme, port, or path"
+ }),
+ port: z
+ .union([z.coerce.number().int().min(1).max(65535), z.literal("")])
+ .optional()
+ .transform((val) => (val === "" ? undefined : val)),
+ username: z
+ .string()
+ .trim()
+ .min(1, "Username is required")
+ .max(256, "Username cannot exceed 256 characters"),
+ password: z
+ .string()
+ .min(1, "Password is required")
+ .max(512, "Password cannot exceed 512 characters"),
+ sslRejectUnauthorized: z.boolean(),
+ sslCertificate: z
+ .string()
+ .trim()
+ .transform((value) => value || undefined)
+ .optional()
+ })
+ })
+]);
+
+type FormData = z.infer<typeof formSchema>;
+
+export const HpeIloConnectionForm = ({ appConnection, onSubmit }: Props) => {
+ const isUpdate = Boolean(appConnection);
+ const [selectedTab, setSelectedTab] = useState("configuration");
+
+ const form = useForm<FormData>({
+ resolver: zodResolver(formSchema),
+ defaultValues: appConnection ?? {
+ app: AppConnection.HpeIloRedFish,
+ method: HpeIloConnectionMethod.BasicAuth,
+ gatewayId: null,
+ gatewayPoolId: null,
+ credentials: {
+ sslRejectUnauthorized: true,
+ sslCertificate: undefined
+ }
+ }
+ });
+
+ const { handleSubmit, control, setValue, watch } = form;
+ const scopeVariant = useScopeVariant();
+
+ const gatewayId = watch("gatewayId");
+ const gatewayPoolId = watch("gatewayPoolId");
+
+ return (
+ <FormProvider {...form}>
+ <form onSubmit={handleSubmit(onSubmit)}>
+ {!isUpdate && <GenericAppConnectionsFields />}
+ <OrgPermissionCan
+ I={OrgGatewayPermissionActions.AttachGateways}
+ a={OrgPermissionSubjects.Gateway}
+ >
+ {(isAllowed) => {
+ const picker = (
+ <GatewayPicker
+ isDisabled={!isAllowed}
+ value={{ gatewayId: gatewayId ?? null, gatewayPoolId: gatewayPoolId ?? null }}
+ onChange={({ gatewayId: newGwId, gatewayPoolId: newPoolId }) => {
+ setValue("gatewayId", newGwId, { shouldDirty: true });
+ setValue("gatewayPoolId", newPoolId, { shouldDirty: true });
+ }}
+ />
+ );
+
+ return (
+ <Field className="mb-4">
+ <FieldLabel>Gateway</FieldLabel>
+ {isAllowed ? (
+ picker
+ ) : (
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <span className="block w-full cursor-not-allowed">{picker}</span>
+ </TooltipTrigger>
+ <TooltipContent>
+ Restricted access. You don&apos;t have permission to attach gateways to
+ resources.
+ </TooltipContent>
+ </Tooltip>
+ )}
+ </Field>
+ );
+ }}
+ </OrgPermissionCan>
+ <Controller
+ name="method"
+ control={control}
+ render={({ field: { value, onChange }, fieldState: { error } }) => (
+ <Field className="mb-4">
+ <FieldLabel htmlFor="method">
+ Method
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Info />
+ </TooltipTrigger>
+ <TooltipContent className="max-w-sm">
+ {`The method you would like to use to connect with ${
+ APP_CONNECTION_MAP[AppConnection.HpeIloRedFish].name
+ }. This field cannot be changed after creation.`}
+ </TooltipContent>
+ </Tooltip>
+ </FieldLabel>
+ <Select disabled={isUpdate} value={value} onValueChange={(val) => onChange(val)}>
+ <SelectTrigger id="method" className="w-full" isError={Boolean(error)}>
+ <SelectValue placeholder="Select a method..." />
+ </SelectTrigger>
+ <SelectContent position="popper">
+ {Object.values(HpeIloConnectionMethod).map((method) => {
+ return (
+ <SelectItem value={method} key={method}>
+ {getAppConnectionMethodDetails(method).name}
+ </SelectItem>
+ );
+ })}
+ </SelectContent>
+ </Select>
+ <FieldError errors={[error]} />
+ </Field>
+ )}
+ />
+ <Tabs value={selectedTab} onValueChange={setSelectedTab} className="mb-4">
+ <TabsList variant={scopeVariant}>
+ <TabsTrigger value="configuration">Configuration</TabsTrigger>
+ <TabsTrigger value="ssl">SSL</TabsTrigger>
+ </TabsList>
+ <TabsContent value="configuration">
+ <div className="grid grid-cols-[1fr_auto] gap-2">
+ <Controller
+ name="credentials.hostname"
+ control={control}
+ render={({ field: { value, onChange }, fieldState: { error } }) => (
+ <Field className="mb-4">
+ <FieldLabel htmlFor="hostname">Hostname</FieldLabel>
+ <Input
+ id="hostname"
+ value={value}
+ onChange={(e) => onChange(e.target.value)}
+ placeholder="e.g. ilo.example.com"
+ isError={Boolean(error?.message)}
+ />
+ <FieldError errors={[error]} />
+ </Field>
+ )}
+ />
+ <Controller
+ name="credentials.port"
+ control={control}
+ render={({ field: { value, onChange }, fieldState: { error } }) => (
+ <Field className="mb-4">
+ <FieldLabel htmlFor="port">
+ Port <span className="text-muted">(optional)</span>
+ </FieldLabel>
+ <Input
+ id="port"
+ type="number"
+ value={value ?? ""}
+ onChange={(e) =>
+ onChange(e.target.value ? Number(e.target.value) : undefined)
+ }
+ placeholder="443"
+ className="w-24"
+ isError={Boolean(error?.message)}
+ />
+ <FieldError errors={[error]} />
+ </Field>
+ )}
+ />
+ </div>
+ <div className="grid grid-cols-2 gap-2">
+ <Controller
+ name="credentials.username"
+ control={control}
+ render={({ field: { value, onChange }, fieldState: { error } }) => (
+ <Field className="mb-4">
+ <FieldLabel htmlFor="username">Username</FieldLabel>
+ <Input
+ id="username"
+ value={value}
+ onChange={(e) => onChange(e.target.value)}
+ placeholder="Administrator"
+ isError={Boolean(error?.message)}
+ />
+ <FieldError errors={[error]} />
+ </Field>
+ )}
+ />
+ <Controller
+ name="credentials.password"
+ control={control}
+ render={({ field: { value, onChange }, fieldState: { error } }) => (
+ <Field className="mb-4">
+ <FieldLabel htmlFor="password">Password</FieldLabel>
+ <SecretInput
+ aria-describedby={error ? "password-error" : undefined}
+ isError={Boolean(error)}
+ id="password"
+ value={value}
+ onChange={(e) => onChange(e.target.value)}
+ />
+ <FieldError id="password-error" errors={[error]} />
+ </Field>
+ )}
+ />
+ </div>
+ </TabsContent>
+ <TabsContent value="ssl">
+ <Controller
+ name="credentials.sslCertificate"
+ control={control}
+ render={({ field, fieldState: { error } }) => (
+ <Field className="mb-4">
+ <FieldLabel htmlFor="ssl-certificate">
+ SSL Certificate <span className="text-muted">(optional)</span>
+ </FieldLabel>
+ <TextArea
+ id="ssl-certificate"
+ className="h-[3.6rem] resize-none!"
+ {...field}
+ placeholder="-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----"
+ isError={Boolean(error?.message)}
+ />
+ <FieldError errors={[error]} />
+ </Field>
+ )}
+ />
+ <Controller
+ name="credentials.sslRejectUnauthorized"
+ control={control}
+ render={({ field: { value, onChange }, fieldState: { error } }) => (
+ <Field>
+ <Field orientation="horizontal">
+ <FieldContent>
+ <Label htmlFor="ssl-reject-unauthorized">Reject Unauthorized</Label>
+ <FieldDescription>
+ If enabled, Infisical will only connect to the HPE iLO if it has a valid,
+ trusted SSL certificate. Disable this for self-signed certificates or
+ provide a CA certificate above.
+ </FieldDescription>
+ </FieldContent>
+ <Toggle
+ aria-invalid={Boolean(error)}
+ id="ssl-reject-unauthorized"
+ variant={scopeVariant}
+ checked={value}
+ onCheckedChange={onChange}
+ />
+ </Field>
+ <FieldError errors={[error]} />
+ </Field>
+ )}
+ />
+ </TabsContent>
+ </Tabs>
+ <AppConnectionFormFooter
+ submitLabel={isUpdate ? "Update Credentials" : "Connect to HPE iLO"}
+ />
+ </form>
+ </FormProvider>
+ );
+};