Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
feat: implement HP iLO Local Account secret rotation functionality
Victor Hugo dos Santos19ed0dede6cf
diff --git a/backend/src/ee/routes/v2/secret-rotation-v2-routers/hp-ilo-rotation-router.ts b/backend/src/ee/routes/v2/secret-rotation-v2-routers/hp-ilo-rotation-router.tsnew file mode 100644index 0000000000..dda46d6a48--- /dev/null+++ b/backend/src/ee/routes/v2/secret-rotation-v2-routers/hp-ilo-rotation-router.ts@@ -0,0 +1,80 @@+import { z } from "zod";++import { EventType } from "@app/ee/services/audit-log/audit-log-types";+import {+ CreateHpIloRotationSchema,+ HpIloRotationGeneratedCredentialsSchema,+ HpIloRotationSchema,+ THpIloRotation,+ UpdateHpIloRotationSchema+} from "@app/ee/services/secret-rotation-v2/hp-ilo-rotation";+import { SecretRotation } from "@app/ee/services/secret-rotation-v2/secret-rotation-v2-enums";+import { ApiDocsTags, SecretRotations } from "@app/lib/api-docs";+import { writeLimit } from "@app/server/config/rateLimiter";+import { verifyAuth } from "@app/server/plugins/auth/verify-auth";+import { AuthMode } from "@app/services/auth/auth-type";++import { registerSecretRotationEndpoints } from "./secret-rotation-v2-endpoints";++export const registerHpIloRotationRouter = async (server: FastifyZodProvider) => {+ registerSecretRotationEndpoints({+ type: SecretRotation.HpIloLocalAccount,+ server,+ responseSchema: HpIloRotationSchema,+ createSchema: CreateHpIloRotationSchema,+ updateSchema: UpdateHpIloRotationSchema,+ generatedCredentialsSchema: HpIloRotationGeneratedCredentialsSchema+ });++ server.route({+ method: "POST",+ url: "/:rotationId/reconcile",+ config: {+ rateLimit: writeLimit+ },+ schema: {+ hide: false,+ tags: [ApiDocsTags.SecretRotations],+ description:+ "Reconcile HP iLO Local Account rotation credentials. This operation uses the SSH app connection credentials to reset the password when credentials are out of sync.",+ params: z.object({+ rotationId: z.string().uuid().describe(SecretRotations.RECONCILE.rotationId)+ }),+ response: {+ 200: z.object({+ message: z.string(),+ reconciled: z.boolean(),+ secretRotation: HpIloRotationSchema+ })+ }+ },+ onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),+ handler: async (req) => {+ const { rotationId } = req.params;++ const result = await server.services.secretRotationV2.reconcileLocalAccountRotation(+ { rotationId, type: SecretRotation.HpIloLocalAccount },+ req.permission+ );++ await server.services.auditLog.createAuditLog({+ ...req.auditLogInfo,+ projectId: result.secretRotation.projectId,+ event: {+ type: EventType.RECONCILE_SECRET_ROTATION,+ metadata: {+ type: SecretRotation.HpIloLocalAccount,+ rotationId,+ reconciled: result.reconciled+ }+ }+ });++ return {+ message: result.message,+ reconciled: result.reconciled,+ secretRotation: result.secretRotation as THpIloRotation+ };+ }+ });+};diff --git a/backend/src/ee/routes/v2/secret-rotation-v2-routers/index.ts b/backend/src/ee/routes/v2/secret-rotation-v2-routers/index.tsindex 65b7af90de..cfc80dca09 100644--- a/backend/src/ee/routes/v2/secret-rotation-v2-routers/index.ts+++ b/backend/src/ee/routes/v2/secret-rotation-v2-routers/index.ts@@ -5,6 +5,7 @@ import { registerAwsIamUserSecretRotationRouter } from "./aws-iam-user-secret-roimport { registerAzureClientSecretRotationRouter } from "./azure-client-secret-rotation-router";import { registerDatabricksServicePrincipalSecretRotationRouter } from "./databricks-service-principal-secret-rotation-router";import { registerDbtServiceTokenRotationRouter } from "./dbt-service-token-rotation-router";+import { registerHpIloRotationRouter } from "./hp-ilo-rotation-router";import { registerLdapPasswordRotationRouter } from "./ldap-password-rotation-router";import { registerMongoDBCredentialsRotationRouter } from "./mongodb-credentials-rotation-router";import { registerMsSqlCredentialsRotationRouter } from "./mssql-credentials-rotation-router";@@ -38,5 +39,6 @@ export const SECRET_ROTATION_REGISTER_ROUTER_MAP: Record<[SecretRotation.UnixLinuxLocalAccount]: registerUnixLinuxLocalAccountRotationRouter,[SecretRotation.DbtServiceToken]: registerDbtServiceTokenRotationRouter,[SecretRotation.WindowsLocalAccount]: registerWindowsLocalAccountRotationRouter,- [SecretRotation.OpenRouterApiKey]: registerOpenRouterApiKeyRotationRouter+ [SecretRotation.OpenRouterApiKey]: registerOpenRouterApiKeyRotationRouter,+ [SecretRotation.HpIloLocalAccount]: registerHpIloRotationRouter};diff --git a/backend/src/ee/routes/v2/secret-rotation-v2-routers/secret-rotation-v2-router.ts b/backend/src/ee/routes/v2/secret-rotation-v2-routers/secret-rotation-v2-router.tsindex 7d035b4a6e..bea5874020 100644--- a/backend/src/ee/routes/v2/secret-rotation-v2-routers/secret-rotation-v2-router.ts+++ b/backend/src/ee/routes/v2/secret-rotation-v2-routers/secret-rotation-v2-router.ts@@ -6,6 +6,7 @@ import { AwsIamUserSecretRotationListItemSchema } from "@app/ee/services/secret-import { AzureClientSecretRotationListItemSchema } from "@app/ee/services/secret-rotation-v2/azure-client-secret";import { DatabricksServicePrincipalSecretRotationListItemSchema } from "@app/ee/services/secret-rotation-v2/databricks-service-principal-secret";import { DbtServiceTokenRotationListItemSchema } from "@app/ee/services/secret-rotation-v2/dbt-service-token";+import { HpIloRotationListItemSchema } from "@app/ee/services/secret-rotation-v2/hp-ilo-rotation";import { LdapPasswordRotationListItemSchema } from "@app/ee/services/secret-rotation-v2/ldap-password";import { MongoDBCredentialsRotationListItemSchema } from "@app/ee/services/secret-rotation-v2/mongodb-credentials";import { MsSqlCredentialsRotationListItemSchema } from "@app/ee/services/secret-rotation-v2/mssql-credentials";@@ -39,7 +40,8 @@ const SecretRotationV2OptionsSchema = z.discriminatedUnion("type", [UnixLinuxLocalAccountRotationListItemSchema,DbtServiceTokenRotationListItemSchema,WindowsLocalAccountRotationListItemSchema,- OpenRouterApiKeyRotationListItemSchema+ OpenRouterApiKeyRotationListItemSchema,+ HpIloRotationListItemSchema]);export const registerSecretRotationV2Router = async (server: FastifyZodProvider) => {diff --git a/backend/src/ee/services/secret-rotation-v2/hp-ilo-rotation/hp-ilo-rotation-constants.ts b/backend/src/ee/services/secret-rotation-v2/hp-ilo-rotation/hp-ilo-rotation-constants.tsnew file mode 100644index 0000000000..84f8c7194e--- /dev/null+++ b/backend/src/ee/services/secret-rotation-v2/hp-ilo-rotation/hp-ilo-rotation-constants.ts@@ -0,0 +1,16 @@+import { SecretRotation } from "@app/ee/services/secret-rotation-v2/secret-rotation-v2-enums";+import { AppConnection } from "@app/services/app-connection/app-connection-enums";++import { THpIloRotationListItem } from "./hp-ilo-rotation-types";++export const HP_ILO_ROTATION_LIST_OPTION: THpIloRotationListItem = {+ name: "HP iLO Local Account",+ type: SecretRotation.HpIloLocalAccount,+ connection: AppConnection.SSH,+ template: {+ secretsMapping: {+ username: "ILO_USERNAME",+ password: "ILO_PASSWORD"+ }+ }+};diff --git a/backend/src/ee/services/secret-rotation-v2/hp-ilo-rotation/hp-ilo-rotation-fns.ts b/backend/src/ee/services/secret-rotation-v2/hp-ilo-rotation/hp-ilo-rotation-fns.tsnew file mode 100644index 0000000000..0ab63a933b--- /dev/null+++ b/backend/src/ee/services/secret-rotation-v2/hp-ilo-rotation/hp-ilo-rotation-fns.ts@@ -0,0 +1,269 @@+import { Client, ClientChannel } from "ssh2";++import {+ TRotationFactory,+ TRotationFactoryGetSecretsPayload,+ TRotationFactoryIssueCredentials,+ TRotationFactoryRevokeCredentials,+ TRotationFactoryRotateCredentials+} from "@app/ee/services/secret-rotation-v2/secret-rotation-v2-types";+import {+ executeWithPotentialGateway,+ getSshConnectionClient,+ SshConnectionMethod,+ TSshConnectionConfig+} from "@app/services/app-connection/ssh";++import { TGatewayV2ServiceFactory } from "../../gateway-v2/gateway-v2-service";+import { generatePassword } from "../shared/utils";+import { HpIloRotationMethod } from "./hp-ilo-rotation-schemas";+import {+ THpIloRotationGeneratedCredentials,+ THpIloRotationInput,+ THpIloRotationWithConnection+} from "./hp-ilo-rotation-types";++// iLO 5 has a maximum password length of 39 characters+const HP_ILO_DEFAULT_PASSWORD_REQUIREMENTS = {+ length: 39,+ required: {+ lowercase: 1,+ uppercase: 1,+ digits: 1,+ symbols: 0+ },+ allowedSymbols: ""+};++const ILO_PROMPT = "hpiLO->";+const COMMAND_COMPLETED = "status_tag=COMMAND COMPLETED";+const COMMAND_FAILED = "COMMAND PROCESSING FAILED";+const CONNECTION_TIMEOUT = 15000;++const executeIloShell = (conn: Client, command: string): Promise<string> => {+ return new Promise((resolve, reject) => {+ conn.shell((err, stream: ClientChannel) => {+ if (err) {+ reject(new Error(`iLO shell error: ${err.message}`));+ return;+ }++ let buffer = "";+ let commandSent = false;+ let settled = false;++ const timeout = setTimeout(() => {+ if (!settled) {+ settled = true;+ conn.end();+ reject(new Error("iLO shell timeout - no prompt received"));+ }+ }, CONNECTION_TIMEOUT);++ stream.on("data", (data: Buffer) => {+ if (settled) return;++ buffer += data.toString();++ if (buffer.includes(ILO_PROMPT) && !commandSent) {+ commandSent = true;+ stream.write(`${command}\n`);+ }++ if (commandSent && buffer.includes(COMMAND_COMPLETED)) {+ clearTimeout(timeout);+ settled = true;+ stream.write("exit\n");+ resolve(buffer);+ }++ if (commandSent && buffer.includes(COMMAND_FAILED)) {+ clearTimeout(timeout);+ settled = true;+ conn.end();+ reject(new Error(`iLO command failed: ${buffer}`));+ }+ });++ stream.on("close", () => {+ clearTimeout(timeout);+ });++ stream.stderr.on("data", (data: Buffer) => {+ if (!settled) {+ clearTimeout(timeout);+ settled = true;+ reject(new Error(`iLO SSH error: ${data.toString()}`));+ }+ });+ });+ });+};++const createIloConnection = (config: TSshConnectionConfig, targetHost: string, targetPort: number): Promise<Client> => {+ return getSshConnectionClient(+ {+ ...config,+ algorithms: {+ serverHostKey: ["ssh-rsa"],+ kex: ["diffie-hellman-group14-sha1", "diffie-hellman-group1-sha1"]+ }+ },+ targetHost,+ targetPort+ );+};++const rotateIloPasswordAsTarget = async (+ config: TSshConnectionConfig,+ gatewayV2Service: Pick<TGatewayV2ServiceFactory, "getPlatformConnectionDetailsByGatewayId">,+ username: string,+ password: string,+ newPassword: string+): Promise<void> => {+ const targetConfig: TSshConnectionConfig = {+ method: SshConnectionMethod.Password,+ app: config.app,+ orgId: config.orgId,+ gatewayId: config.gatewayId,+ credentials: {+ host: config.credentials.host,+ port: config.credentials.port,+ username,+ password+ }+ };++ await executeWithPotentialGateway(targetConfig, gatewayV2Service, async (targetHost, targetPort) => {+ const conn = await createIloConnection(targetConfig, targetHost, targetPort);+ try {+ const command = `set /map1/accounts1/${username} password=${newPassword}`;+ await executeIloShell(conn, command);+ } finally {+ conn.end();+ }+ });+};++const rotateIloPasswordAsAdmin = async (+ config: TSshConnectionConfig,+ gatewayV2Service: Pick<TGatewayV2ServiceFactory, "getPlatformConnectionDetailsByGatewayId">,+ targetUsername: string,+ newPassword: string+): Promise<void> => {+ await executeWithPotentialGateway(config, gatewayV2Service, async (targetHost, targetPort) => {+ const conn = await createIloConnection(config, targetHost, targetPort);+ try {+ const command = `set /map1/accounts1/${targetUsername} password=${newPassword}`;+ await executeIloShell(conn, command);+ } finally {+ conn.end();+ }+ });+};++const verifyIloPassword = async (+ config: TSshConnectionConfig,+ gatewayV2Service: Pick<TGatewayV2ServiceFactory, "getPlatformConnectionDetailsByGatewayId">,+ username: string,+ password: string+): Promise<void> => {+ const verifyConfig: TSshConnectionConfig = {+ method: SshConnectionMethod.Password,+ app: config.app,+ orgId: config.orgId,+ gatewayId: config.gatewayId,+ credentials: {+ host: config.credentials.host,+ port: config.credentials.port,+ username,+ password+ }+ };++ try {+ await executeWithPotentialGateway(verifyConfig, gatewayV2Service, async (targetHost, targetPort) => {+ const conn = await createIloConnection(verifyConfig, targetHost, targetPort);+ conn.end();+ });+ } catch (error) {+ throw new Error(`HP iLO password verification failed: ${(error as Error).message}`);+ }+};++export const hpIloRotationFactory: TRotationFactory<+ THpIloRotationWithConnection,+ THpIloRotationGeneratedCredentials,+ THpIloRotationInput["temporaryParameters"]+> = (secretRotation, appConnectionDAL, kmsService, _gatewayService, gatewayV2Service) => {+ const { connection, parameters, secretsMapping, activeIndex } = secretRotation;+ const { username, passwordRequirements, rotationMethod = HpIloRotationMethod.LoginAsRoot } = parameters;++ const $rotatePassword = async (currentPassword?: string): Promise<{ username: string; password: string }> => {+ const newPassword = generatePassword(passwordRequirements ?? HP_ILO_DEFAULT_PASSWORD_REQUIREMENTS);++ const isSelfRotation = rotationMethod === HpIloRotationMethod.LoginAsTarget;+ // if (username === credentials.username)+ // throw new BadRequestError({ message: "Provided username is used in Infisical app connections." });++ const sshConfig: TSshConnectionConfig = {+ method: connection.method,+ app: connection.app,+ orgId: connection.orgId,+ gatewayId: connection.gatewayId,+ credentials: connection.credentials+ } as TSshConnectionConfig;++ if (isSelfRotation && currentPassword) {+ await rotateIloPasswordAsTarget(sshConfig, gatewayV2Service, username, currentPassword, newPassword);+ } else {+ await rotateIloPasswordAsAdmin(sshConfig, gatewayV2Service, username, newPassword);+ }++ await verifyIloPassword(sshConfig, gatewayV2Service, username, newPassword);++ return { username, password: newPassword };+ };++ const issueCredentials: TRotationFactoryIssueCredentials<+ THpIloRotationGeneratedCredentials,+ THpIloRotationInput["temporaryParameters"]+ > = async (callback, temporaryParameters) => {+ const credentials = await $rotatePassword(temporaryParameters?.password);+ return callback(credentials);+ };++ const revokeCredentials: TRotationFactoryRevokeCredentials<THpIloRotationGeneratedCredentials> = async (+ credentialsToRevoke,+ callback+ ) => {+ const currentPassword = credentialsToRevoke[activeIndex].password;+ await $rotatePassword(currentPassword);+ return callback();+ };++ const rotateCredentials: TRotationFactoryRotateCredentials<THpIloRotationGeneratedCredentials> = async (+ _,+ callback,+ activeCredentials+ ) => {+ const credentials = await $rotatePassword(activeCredentials.password);+ return callback(credentials);+ };++ const getSecretsPayload: TRotationFactoryGetSecretsPayload<THpIloRotationGeneratedCredentials> = (+ generatedCredentials+ ) => {+ return [+ { key: secretsMapping.username, value: generatedCredentials.username },+ { key: secretsMapping.password, value: generatedCredentials.password }+ ];+ };++ return {+ issueCredentials,+ revokeCredentials,+ rotateCredentials,+ getSecretsPayload+ };+};diff --git a/backend/src/ee/services/secret-rotation-v2/hp-ilo-rotation/hp-ilo-rotation-schemas.ts b/backend/src/ee/services/secret-rotation-v2/hp-ilo-rotation/hp-ilo-rotation-schemas.tsnew file mode 100644index 0000000000..61c7763d52--- /dev/null+++ b/backend/src/ee/services/secret-rotation-v2/hp-ilo-rotation/hp-ilo-rotation-schemas.ts@@ -0,0 +1,94 @@+import { z } from "zod";++import { SecretRotation } from "@app/ee/services/secret-rotation-v2/secret-rotation-v2-enums";+import {+ BaseCreateSecretRotationSchema,+ BaseSecretRotationSchema,+ BaseUpdateSecretRotationSchema+} from "@app/ee/services/secret-rotation-v2/secret-rotation-v2-schemas";+import { PasswordRequirementsSchema } from "@app/ee/services/secret-rotation-v2/shared/general";+import { SecretRotations } from "@app/lib/api-docs";+import { CharacterType, characterValidator } from "@app/lib/validator/validate-string";+import { SecretNameSchema } from "@app/server/lib/schemas";+import { AppConnection } from "@app/services/app-connection/app-connection-enums";++export enum HpIloRotationMethod {+ LoginAsTarget = "login-as-target",+ LoginAsRoot = "login-as-root"+}++export const HpIloRotationGeneratedCredentialsSchema = z+ .object({+ username: z.string(),+ password: z.string()+ })+ .array()+ .min(1)+ .max(2);++const HpIloRotationParametersSchema = z.object({+ username: z+ .string()+ .trim()+ .min(1, "Username required")+ .refine(+ (val) => characterValidator([CharacterType.AlphaNumeric, CharacterType.Hyphen, CharacterType.Underscore])(val),+ "Name can only contain alphanumeric characters, dashes, and underscores"+ )+ .describe(SecretRotations.PARAMETERS.HP_ILO.username),+ passwordRequirements: PasswordRequirementsSchema.optional(),+ rotationMethod: z+ .nativeEnum(HpIloRotationMethod)+ .optional()+ .describe(SecretRotations.PARAMETERS.HP_ILO.rotationMethod)+});++const HpIloRotationSecretsMappingSchema = z.object({+ username: SecretNameSchema.describe(SecretRotations.SECRETS_MAPPING.HP_ILO.username),+ password: SecretNameSchema.describe(SecretRotations.SECRETS_MAPPING.HP_ILO.password)+});++export const HpIloRotationTemplateSchema = z.object({+ secretsMapping: z.object({+ username: z.string(),+ password: z.string()+ })+});++export const HpIloRotationSchema = BaseSecretRotationSchema(SecretRotation.HpIloLocalAccount).extend({+ type: z.literal(SecretRotation.HpIloLocalAccount),+ parameters: HpIloRotationParametersSchema,+ secretsMapping: HpIloRotationSecretsMappingSchema+});++export const CreateHpIloRotationSchema = BaseCreateSecretRotationSchema(SecretRotation.HpIloLocalAccount)+ .extend({+ parameters: HpIloRotationParametersSchema,+ secretsMapping: HpIloRotationSecretsMappingSchema,+ temporaryParameters: z+ .object({+ password: z.string().optional().describe(SecretRotations.PARAMETERS.HP_ILO.password)+ })+ .optional()+ })+ .superRefine((val, ctx) => {+ if (val.parameters.rotationMethod === HpIloRotationMethod.LoginAsTarget && !val.temporaryParameters?.password) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: "Current password is required for initial rotation setup in login as target method",+ path: ["temporaryParameters", "password"]+ });+ }+ });++export const UpdateHpIloRotationSchema = BaseUpdateSecretRotationSchema(SecretRotation.HpIloLocalAccount).extend({+ parameters: HpIloRotationParametersSchema.optional(),+ secretsMapping: HpIloRotationSecretsMappingSchema.optional()+});++export const HpIloRotationListItemSchema = z.object({+ name: z.literal("HP iLO Local Account"),+ connection: z.literal(AppConnection.SSH),+ type: z.literal(SecretRotation.HpIloLocalAccount),+ template: HpIloRotationTemplateSchema+});diff --git a/backend/src/ee/services/secret-rotation-v2/hp-ilo-rotation/hp-ilo-rotation-types.ts b/backend/src/ee/services/secret-rotation-v2/hp-ilo-rotation/hp-ilo-rotation-types.tsnew file mode 100644index 0000000000..c944079c36--- /dev/null+++ b/backend/src/ee/services/secret-rotation-v2/hp-ilo-rotation/hp-ilo-rotation-types.ts@@ -0,0 +1,22 @@+import { z } from "zod";++import { TSshConnection } from "@app/services/app-connection/ssh";++import {+ CreateHpIloRotationSchema,+ HpIloRotationGeneratedCredentialsSchema,+ HpIloRotationListItemSchema,+ HpIloRotationSchema+} from "./hp-ilo-rotation-schemas";++export type THpIloRotation = z.infer<typeof HpIloRotationSchema>;++export type THpIloRotationInput = z.infer<typeof CreateHpIloRotationSchema>;++export type THpIloRotationListItem = z.infer<typeof HpIloRotationListItemSchema>;++export type THpIloRotationWithConnection = THpIloRotation & {+ connection: TSshConnection;+};++export type THpIloRotationGeneratedCredentials = z.infer<typeof HpIloRotationGeneratedCredentialsSchema>;diff --git a/backend/src/ee/services/secret-rotation-v2/hp-ilo-rotation/index.ts b/backend/src/ee/services/secret-rotation-v2/hp-ilo-rotation/index.tsnew file mode 100644index 0000000000..3bc36e21b0--- /dev/null+++ b/backend/src/ee/services/secret-rotation-v2/hp-ilo-rotation/index.ts@@ -0,0 +1,4 @@+export * from "./hp-ilo-rotation-constants";+export * from "./hp-ilo-rotation-fns";+export * from "./hp-ilo-rotation-schemas";+export * from "./hp-ilo-rotation-types";diff --git a/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-enums.ts b/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-enums.tsindex fa9d6b5496..968c61a27b 100644--- a/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-enums.ts+++ b/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-enums.ts@@ -14,7 +14,8 @@ export enum SecretRotation {UnixLinuxLocalAccount = "unix-linux-local-account",DbtServiceToken = "dbt-service-token",WindowsLocalAccount = "windows-local-account",- OpenRouterApiKey = "open-router-api-key"+ OpenRouterApiKey = "open-router-api-key",+ HpIloLocalAccount = "hp-ilo-local-account"}export enum SecretRotationStatus {diff --git a/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-fns.ts b/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-fns.tsindex 73dedd0129..ba8b18c858 100644--- a/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-fns.ts+++ b/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-fns.ts@@ -11,6 +11,7 @@ import { AWS_IAM_USER_SECRET_ROTATION_LIST_OPTION } from "./aws-iam-user-secret"import { AZURE_CLIENT_SECRET_ROTATION_LIST_OPTION } from "./azure-client-secret";import { DATABRICKS_SERVICE_PRINCIPAL_SECRET_ROTATION_LIST_OPTION } from "./databricks-service-principal-secret";import { DBT_SERVICE_TOKEN_ROTATION_LIST_OPTION } from "./dbt-service-token";+import { HP_ILO_ROTATION_LIST_OPTION, THpIloRotation } from "./hp-ilo-rotation";import { LDAP_PASSWORD_ROTATION_LIST_OPTION, TLdapPasswordRotation } from "./ldap-password";import { MONGODB_CREDENTIALS_ROTATION_LIST_OPTION } from "./mongodb-credentials";import { MSSQL_CREDENTIALS_ROTATION_LIST_OPTION } from "./mssql-credentials";@@ -56,7 +57,8 @@ const SECRET_ROTATION_LIST_OPTIONS: Record<SecretRotation, TSecretRotationV2List[SecretRotation.UnixLinuxLocalAccount]: UNIX_LINUX_LOCAL_ACCOUNT_ROTATION_LIST_OPTION,[SecretRotation.DbtServiceToken]: DBT_SERVICE_TOKEN_ROTATION_LIST_OPTION,[SecretRotation.WindowsLocalAccount]: WINDOWS_LOCAL_ACCOUNT_ROTATION_LIST_OPTION,- [SecretRotation.OpenRouterApiKey]: OPEN_ROUTER_API_KEY_ROTATION_LIST_OPTION+ [SecretRotation.OpenRouterApiKey]: OPEN_ROUTER_API_KEY_ROTATION_LIST_OPTION,+ [SecretRotation.HpIloLocalAccount]: HP_ILO_ROTATION_LIST_OPTION};export const listSecretRotationOptions = () => {@@ -314,6 +316,17 @@ export const throwOnImmutableParameterUpdate = (throw new BadRequestError({ message: "Cannot update rotation method or username" });}break;+ case SecretRotation.HpIloLocalAccount:+ if (+ haveUnequalProperties(+ updatePayload.parameters as THpIloRotation["parameters"],+ secretRotation.parameters as THpIloRotation["parameters"],+ ["rotationMethod", "username"]+ )+ ) {+ throw new BadRequestError({ message: "Cannot update rotation method or username" });+ }+ break;default:// do nothing}diff --git a/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-maps.ts b/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-maps.tsindex 2ac204055d..15572f274b 100644--- a/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-maps.ts+++ b/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-maps.ts@@ -17,7 +17,8 @@ export const SECRET_ROTATION_NAME_MAP: Record<SecretRotation, string> = {[SecretRotation.UnixLinuxLocalAccount]: "Unix/Linux Local Account",[SecretRotation.DbtServiceToken]: "DBT Service Token",[SecretRotation.WindowsLocalAccount]: "Windows Local Account",- [SecretRotation.OpenRouterApiKey]: "OpenRouter API Key"+ [SecretRotation.OpenRouterApiKey]: "OpenRouter API Key",+ [SecretRotation.HpIloLocalAccount]: "HP iLO Local Account"};export const SECRET_ROTATION_CONNECTION_MAP: Record<SecretRotation, AppConnection> = {@@ -36,5 +37,6 @@ export const SECRET_ROTATION_CONNECTION_MAP: Record<SecretRotation, AppConnectio[SecretRotation.UnixLinuxLocalAccount]: AppConnection.SSH,[SecretRotation.DbtServiceToken]: AppConnection.Dbt,[SecretRotation.WindowsLocalAccount]: AppConnection.SMB,- [SecretRotation.OpenRouterApiKey]: AppConnection.OpenRouter+ [SecretRotation.OpenRouterApiKey]: AppConnection.OpenRouter,+ [SecretRotation.HpIloLocalAccount]: AppConnection.SSH};diff --git a/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-service.ts b/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-service.tsindex 1b00b0f521..2f668af019 100644--- a/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-service.ts+++ b/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-service.ts@@ -87,6 +87,9 @@ import { TSecretVersionV2TagDALFactory } from "@app/services/secret-v2-bridge/seimport { TGatewayV2ServiceFactory } from "../gateway-v2/gateway-v2-service";import { awsIamUserSecretRotationFactory } from "./aws-iam-user-secret/aws-iam-user-secret-rotation-fns";import { dbtServiceTokenRotationFactory } from "./dbt-service-token/dbt-service-token-rotation-fns";+import { hpIloRotationFactory } from "./hp-ilo-rotation/hp-ilo-rotation-fns";+import { HpIloRotationMethod } from "./hp-ilo-rotation/hp-ilo-rotation-schemas";+import { THpIloRotation, THpIloRotationGeneratedCredentials } from "./hp-ilo-rotation/hp-ilo-rotation-types";import { mongodbCredentialsRotationFactory } from "./mongodb-credentials/mongodb-credentials-rotation-fns";import { oktaClientSecretRotationFactory } from "./okta-client-secret/okta-client-secret-rotation-fns";import { openRouterApiKeyRotationFactory } from "./open-router-api-key/open-router-api-key-rotation-fns";@@ -105,10 +108,11 @@ import {TWindowsLocalAccountRotationGeneratedCredentials} from "./windows-local-account-rotation/windows-local-account-rotation-types";-type TLocalAccountRotation = TUnixLinuxLocalAccountRotation | TWindowsLocalAccountRotation;+type TLocalAccountRotation = TUnixLinuxLocalAccountRotation | TWindowsLocalAccountRotation | THpIloRotation;type TLocalAccountRotationGeneratedCredentials =| TUnixLinuxLocalAccountRotationGeneratedCredentials- | TWindowsLocalAccountRotationGeneratedCredentials;+ | TWindowsLocalAccountRotationGeneratedCredentials+ | THpIloRotationGeneratedCredentials;export type TSecretRotationV2ServiceFactoryDep = {secretRotationV2DAL: TSecretRotationV2DALFactory;@@ -163,7 +167,8 @@ const SECRET_ROTATION_FACTORY_MAP: Record<SecretRotation, TRotationFactoryImplem[SecretRotation.UnixLinuxLocalAccount]: unixLinuxLocalAccountRotationFactory as TRotationFactoryImplementation,[SecretRotation.DbtServiceToken]: dbtServiceTokenRotationFactory as TRotationFactoryImplementation,[SecretRotation.WindowsLocalAccount]: windowsLocalAccountRotationFactory as TRotationFactoryImplementation,- [SecretRotation.OpenRouterApiKey]: openRouterApiKeyRotationFactory as TRotationFactoryImplementation+ [SecretRotation.OpenRouterApiKey]: openRouterApiKeyRotationFactory as TRotationFactoryImplementation,+ [SecretRotation.HpIloLocalAccount]: hpIloRotationFactory as TRotationFactoryImplementation};export const secretRotationV2ServiceFactory = ({@@ -1443,7 +1448,13 @@ export const secretRotationV2ServiceFactory = ({{rotationId,type- }: { rotationId: string; type: SecretRotation.UnixLinuxLocalAccount | SecretRotation.WindowsLocalAccount },+ }: {+ rotationId: string;+ type:+ | SecretRotation.UnixLinuxLocalAccount+ | SecretRotation.WindowsLocalAccount+ | SecretRotation.HpIloLocalAccount;+ },actor: OrgServiceActor) => {const plan = await licenseService.getPlan(actor.orgId);@@ -1463,10 +1474,11 @@ export const secretRotationV2ServiceFactory = ({if (secretRotation.type !== SecretRotation.UnixLinuxLocalAccount &&- secretRotation.type !== SecretRotation.WindowsLocalAccount+ secretRotation.type !== SecretRotation.WindowsLocalAccount &&+ secretRotation.type !== SecretRotation.HpIloLocalAccount)throw new BadRequestError({- message: `Reconcile operation is only supported for Unix/Linux Local Account and Windows Local Account rotations`+ message: `Reconcile operation is only supported for Unix/Linux Local Account, Windows Local Account, and HP iLO Local Account rotations`});const { projectId, environment, folder, connection, encryptedGeneratedCredentials, parameters, folderId } =@@ -1488,20 +1500,24 @@ export const secretRotationV2ServiceFactory = ({const localAccountParams = parameters as TLocalAccountRotation["parameters"];- const loginAsTargetMethod =- type === SecretRotation.UnixLinuxLocalAccount- ? UnixLinuxLocalAccountRotationMethod.LoginAsTarget- : WindowsLocalAccountRotationMethod.LoginAsTarget;+ let loginAsTargetMethod;+ let loginAsRootMethod;- const loginAsRootMethod =- type === SecretRotation.UnixLinuxLocalAccount- ? UnixLinuxLocalAccountRotationMethod.LoginAsRoot- : WindowsLocalAccountRotationMethod.LoginAsRoot;+ if (type === SecretRotation.UnixLinuxLocalAccount) {+ loginAsTargetMethod = UnixLinuxLocalAccountRotationMethod.LoginAsTarget;+ loginAsRootMethod = UnixLinuxLocalAccountRotationMethod.LoginAsRoot;+ } else if (type === SecretRotation.WindowsLocalAccount) {+ loginAsTargetMethod = WindowsLocalAccountRotationMethod.LoginAsTarget;+ loginAsRootMethod = WindowsLocalAccountRotationMethod.LoginAsRoot;+ } else {+ loginAsTargetMethod = HpIloRotationMethod.LoginAsTarget;+ loginAsRootMethod = HpIloRotationMethod.LoginAsRoot;+ }// Only allow reconcile for login-as-target modeif (localAccountParams.rotationMethod !== loginAsTargetMethod) {throw new BadRequestError({- message: `Reconcile operation is only supported for login-as-target mode Unix/Linux Local Account and Windows Local Account rotations`+ message: `Reconcile operation is only supported for login-as-target mode Unix/Linux Local Account, Windows Local Account, and HP iLO Local Account rotations`});}diff --git a/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-types.ts b/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-types.tsindex 12f136e8d4..028aa39d76 100644--- a/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-types.ts+++ b/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-types.ts@@ -42,6 +42,13 @@ import {TDbtServiceTokenRotationListItem,TDbtServiceTokenRotationWithConnection} from "./dbt-service-token/dbt-service-token-rotation-types";+import {+ THpIloRotation,+ THpIloRotationGeneratedCredentials,+ THpIloRotationInput,+ THpIloRotationListItem,+ THpIloRotationWithConnection+} from "./hp-ilo-rotation";import {TLdapPasswordRotation,TLdapPasswordRotationGeneratedCredentials,@@ -133,7 +140,8 @@ export type TSecretRotationV2 =| TUnixLinuxLocalAccountRotation| TDbtServiceTokenRotation| TWindowsLocalAccountRotation- | TOpenRouterApiKeyRotation;+ | TOpenRouterApiKeyRotation+ | THpIloRotation;export type TSecretRotationV2WithConnection =| TPostgresCredentialsRotationWithConnection@@ -151,7 +159,8 @@ export type TSecretRotationV2WithConnection =| TUnixLinuxLocalAccountRotationWithConnection| TDbtServiceTokenRotationWithConnection| TWindowsLocalAccountRotationWithConnection- | TOpenRouterApiKeyRotationWithConnection;+ | TOpenRouterApiKeyRotationWithConnection+ | THpIloRotationWithConnection;export type TSecretRotationV2GeneratedCredentials =| TSqlCredentialsRotationGeneratedCredentials@@ -165,7 +174,8 @@ export type TSecretRotationV2GeneratedCredentials =| TUnixLinuxLocalAccountRotationGeneratedCredentials| TDbtServiceTokenRotationGeneratedCredentials| TWindowsLocalAccountRotationGeneratedCredentials- | TOpenRouterApiKeyRotationGeneratedCredentials;+ | TOpenRouterApiKeyRotationGeneratedCredentials+ | THpIloRotationGeneratedCredentials;export type TSecretRotationV2Input =| TPostgresCredentialsRotationInput@@ -183,7 +193,8 @@ export type TSecretRotationV2Input =| TUnixLinuxLocalAccountRotationInput| TDbtServiceTokenRotationInput| TWindowsLocalAccountRotationInput- | TOpenRouterApiKeyRotationInput;+ | TOpenRouterApiKeyRotationInput+ | THpIloRotationInput;export type TSecretRotationV2ListItem =| TPostgresCredentialsRotationListItem@@ -201,12 +212,14 @@ export type TSecretRotationV2ListItem =| TUnixLinuxLocalAccountRotationListItem| TDbtServiceTokenRotationListItem| TWindowsLocalAccountRotationListItem- | TOpenRouterApiKeyRotationListItem;+ | TOpenRouterApiKeyRotationListItem+ | THpIloRotationListItem;export type TSecretRotationV2TemporaryParameters =| TLdapPasswordRotationInput["temporaryParameters"]| TUnixLinuxLocalAccountRotationInput["temporaryParameters"]| TWindowsLocalAccountRotationInput["temporaryParameters"]+ | THpIloRotationInput["temporaryParameters"]| undefined;export type TSecretRotationV2Raw = NonNullable<Awaited<ReturnType<TSecretRotationV2DALFactory["findById"]>>>;diff --git a/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-union-schema.ts b/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-union-schema.tsindex 9f9f9a780c..be478fde0c 100644--- a/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-union-schema.ts+++ b/backend/src/ee/services/secret-rotation-v2/secret-rotation-v2-union-schema.ts@@ -17,6 +17,7 @@ import { UnixLinuxLocalAccountRotationSchema } from "@app/ee/services/secret-rotimport { WindowsLocalAccountRotationSchema } from "@app/ee/services/secret-rotation-v2/windows-local-account-rotation";import { DbtServiceTokenRotationSchema } from "./dbt-service-token";+import { HpIloRotationSchema } from "./hp-ilo-rotation";export const SecretRotationV2Schema = z.discriminatedUnion("type", [PostgresCredentialsRotationSchema,@@ -34,5 +35,6 @@ export const SecretRotationV2Schema = z.discriminatedUnion("type", [UnixLinuxLocalAccountRotationSchema,DbtServiceTokenRotationSchema,WindowsLocalAccountRotationSchema,- OpenRouterApiKeyRotationSchema+ OpenRouterApiKeyRotationSchema,+ HpIloRotationSchema]);diff --git a/backend/src/lib/api-docs/constants.ts b/backend/src/lib/api-docs/constants.tsindex 08b626e3cc..a278581940 100644--- a/backend/src/lib/api-docs/constants.ts+++ b/backend/src/lib/api-docs/constants.ts@@ -3133,6 +3133,13 @@ export const SecretRotations = {password:'The current password of the target user. Required if "parameters.rotationMethod" is set to "login-as-target".'},+ HP_ILO: {+ username: "The username of the HP iLO account to rotate the password for.",+ rotationMethod:+ 'Whether the rotation should be performed using "login-as-target" (the target user\'s own credentials) or "login-as-root" (the SSH connection\'s admin credentials). Defaults to "login-as-root".',+ password:+ 'The current password of the target user. Required if "parameters.rotationMethod" is set to "login-as-target".'+ },GENERAL: {PASSWORD_REQUIREMENTS: {base: "The password requirements to use when generating the new password.",@@ -3213,6 +3220,10 @@ export const SecretRotations = {username: "The name of the secret that the username will be mapped to.",password: "The name of the secret that the rotated password will be mapped to."},+ HP_ILO: {+ username: "The name of the secret that the username will be mapped to.",+ password: "The name of the secret that the rotated password will be mapped to."+ },AWS_IAM_USER_SECRET: {accessKeyId: "The name of the secret that the access key ID will be mapped to.",secretAccessKey: "The name of the secret that the rotated secret access key will be mapped to."diff --git a/backend/src/services/app-connection/ssh/ssh-connection-fns.ts b/backend/src/services/app-connection/ssh/ssh-connection-fns.tsindex 517f841239..2b6cc1c1c5 100644--- a/backend/src/services/app-connection/ssh/ssh-connection-fns.ts+++ b/backend/src/services/app-connection/ssh/ssh-connection-fns.ts@@ -1,4 +1,4 @@-import { Client, ConnectConfig } from "ssh2";+import { Algorithms, Client, ConnectConfig } from "ssh2";import { TGatewayServiceFactory } from "@app/ee/services/gateway/gateway-service";import { TGatewayV2ServiceFactory } from "@app/ee/services/gateway-v2/gateway-v2-service";@@ -34,7 +34,7 @@ export const getSshConnectionClient = async (port: targetPort,readyTimeout: SSH_TIMEOUT,tryKeyboard: false,- algorithms: {+ algorithms: (credentials.algorithms as Algorithms) || {serverHostKey: ["rsa-sha2-512", "rsa-sha2-256", "ssh-rsa", "ecdsa-sha2-nistp256", "ecdsa-sha2-nistp521"]}};diff --git a/backend/src/services/app-connection/ssh/ssh-connection-types.ts b/backend/src/services/app-connection/ssh/ssh-connection-types.tsindex ef06d7a310..a4ed538906 100644--- a/backend/src/services/app-connection/ssh/ssh-connection-types.ts+++ b/backend/src/services/app-connection/ssh/ssh-connection-types.ts@@ -22,4 +22,8 @@ export type TSshConnectionConfig = DiscriminativePick<"method" | "app" | "credentials" | "gatewayId"> & {orgId: string;+ algorithms?: {+ serverHostKey?: string[];+ kex?: string[];+ };};diff --git a/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/create.mdx b/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/create.mdxnew file mode 100644index 0000000000..b48987f905--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/create.mdx@@ -0,0 +1,9 @@+---+title: "Create"+openapi: "POST /api/v2/secret-rotations/hp-ilo-local-account"+---++<Note>+ Check out the configuration docs for [HP iLO Local Account Rotations](/documentation/platform/secret-rotation/hp-ilo-local-account) to learn how to obtain the+ required parameters.+</Note>diff --git a/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/delete.mdx b/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/delete.mdxnew file mode 100644index 0000000000..793acb4d1b--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/delete.mdx@@ -0,0 +1,4 @@+---+title: "Delete"+openapi: "DELETE /api/v2/secret-rotations/hp-ilo-local-account/{rotationId}"+---diff --git a/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/get-by-id.mdx b/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/get-by-id.mdxnew file mode 100644index 0000000000..da135b4e28--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/get-by-id.mdx@@ -0,0 +1,4 @@+---+title: "Get by ID"+openapi: "GET /api/v2/secret-rotations/hp-ilo-local-account/{rotationId}"+---diff --git a/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/get-by-name.mdx b/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/get-by-name.mdxnew file mode 100644index 0000000000..52607266f6--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/get-by-name.mdx@@ -0,0 +1,4 @@+---+title: "Get by Name"+openapi: "GET /api/v2/secret-rotations/hp-ilo-local-account/rotation-name/{rotationName}"+---diff --git a/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/get-generated-credentials-by-id.mdx b/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/get-generated-credentials-by-id.mdxnew file mode 100644index 0000000000..73ff46e7f7--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/get-generated-credentials-by-id.mdx@@ -0,0 +1,4 @@+---+title: "Get Credentials by ID"+openapi: "GET /api/v2/secret-rotations/hp-ilo-local-account/{rotationId}/generated-credentials"+---diff --git a/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/list.mdx b/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/list.mdxnew file mode 100644index 0000000000..4dd63fef10--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/list.mdx@@ -0,0 +1,4 @@+---+title: "List"+openapi: "GET /api/v2/secret-rotations/hp-ilo-local-account"+---diff --git a/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/reconcile.mdx b/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/reconcile.mdxnew file mode 100644index 0000000000..0df5a65f97--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/reconcile.mdx@@ -0,0 +1,4 @@+---+title: "Reconcile"+openapi: "POST /api/v2/secret-rotations/hp-ilo-local-account/{rotationId}/reconcile"+---diff --git a/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/rotate-secrets.mdx b/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/rotate-secrets.mdxnew file mode 100644index 0000000000..ab9d4cca05--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/rotate-secrets.mdx@@ -0,0 +1,4 @@+---+title: "Rotate Secrets"+openapi: "POST /api/v2/secret-rotations/hp-ilo-local-account/{rotationId}/rotate-secrets"+---diff --git a/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/update.mdx b/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/update.mdxnew file mode 100644index 0000000000..49039b9e89--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/hp-ilo-local-account/update.mdx@@ -0,0 +1,9 @@+---+title: "Update"+openapi: "PATCH /api/v2/secret-rotations/hp-ilo-local-account/{rotationId}"+---++<Note>+ Check out the configuration docs for [HP iLO Local Account Rotations](/documentation/platform/secret-rotation/hp-ilo-local-account) to learn how to obtain the+ required parameters.+</Note>diff --git a/docs/docs.json b/docs/docs.jsonindex 4ea609469c..a024f7675e 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -467,6 +467,7 @@"documentation/platform/secret-rotation/mongodb-credentials","documentation/platform/secret-rotation/mssql-credentials","documentation/platform/secret-rotation/mysql-credentials",+ "documentation/platform/secret-rotation/hp-ilo-local-account","documentation/platform/secret-rotation/okta-client-secret","documentation/platform/secret-rotation/openrouter-api-key","documentation/platform/secret-rotation/oracledb-credentials",@@ -2269,6 +2270,20 @@"api-reference/endpoints/secret-rotations/redis-credentials/update"]},+ {+ "group": "HP iLO Local Account",+ "pages": [+ "api-reference/endpoints/secret-rotations/hp-ilo-local-account/create",+ "api-reference/endpoints/secret-rotations/hp-ilo-local-account/delete",+ "api-reference/endpoints/secret-rotations/hp-ilo-local-account/get-by-id",+ "api-reference/endpoints/secret-rotations/hp-ilo-local-account/get-by-name",+ "api-reference/endpoints/secret-rotations/hp-ilo-local-account/get-generated-credentials-by-id",+ "api-reference/endpoints/secret-rotations/hp-ilo-local-account/list",+ "api-reference/endpoints/secret-rotations/hp-ilo-local-account/rotate-secrets",+ "api-reference/endpoints/secret-rotations/hp-ilo-local-account/update",+ "api-reference/endpoints/secret-rotations/hp-ilo-local-account/reconcile"+ ]+ },{"group": "Unix/Linux Local Account","pages": [diff --git a/docs/documentation/platform/secret-rotation/hp-ilo-local-account.mdx b/docs/documentation/platform/secret-rotation/hp-ilo-local-account.mdxnew file mode 100644index 0000000000..2eb6450569--- /dev/null+++ b/docs/documentation/platform/secret-rotation/hp-ilo-local-account.mdx@@ -0,0 +1,193 @@+---+title: "HP iLO Local Account Rotation"+description: "Learn how to automatically rotate HP iLO local account passwords."+---++<Note>+ **Rotation Type: [Single-Phase](/documentation/platform/secret-rotation/overview#single-phase-rotation)**++ This rotation updates a single credential set in place. Old credentials become invalid immediately upon rotation. This means that clients using the previous credentials will fail to authenticate until they retrieve the new credentials.++ This is a limitation of the iLO provider and cannot be rectified by Infisical.+</Note>++<Warning>+ **iLO Password Constraints**++ HP iLO has a maximum password length of **39 characters**. Infisical uses iLO-specific defaults (39 characters, no symbols) to ensure compatibility. If you customize password requirements, ensure the total length does not exceed 39 characters.+</Warning>++## Prerequisites++- Create an [SSH Connection](/integrations/app-connections/ssh) with the **Secret Rotation** requirements+- Ensure your network security policies allow incoming requests from Infisical to this rotation provider, if network restrictions apply.++## Create an HP iLO Local Account Rotation in Infisical++<Tabs>+ <Tab title="Infisical UI">+ 1. Navigate to your Secret Manager Project's Dashboard and select **Add Secret Rotation** from the actions dropdown.+ ++ 2. Select the **HP iLO Local Account** option.+ ++ 3. Select the **SSH Connection** to use and configure the rotation behavior. Then click **Next**.+ ++ - **SSH Connection** - the connection that will perform the rotation of the configured user's password.+ - **Rotation Interval** - the interval, in days, that once elapsed will trigger a rotation.+ - **Rotate At** - the local time of day when rotation should occur once the interval has elapsed.+ - **Auto-Rotation Enabled** - whether secrets should automatically be rotated once the rotation interval has elapsed. Disable this option to manually rotate secrets or pause secret rotation.+ <Note>+ Due to HP iLO Local Account Rotations rotating a single credential set, auto-rotation may result in service interruptions. If you need to ensure service continuity, we recommend disabling this option.+ </Note>+++ 4. Configure the required Parameters for your rotation. Then click **Next**.+ ++ - **Rotation Method** - The method to use when rotating the target user's password.+ - **Login as Target** - Infisical will use the provided iLO username and password to log in and rotate its own password.+ - **Login as Root** - Infisical will use the SSH Connection's credentials to log in and rotate the provided user's password.+ - **Username** - The target iLO username whose password will be rotated.+ - **Current Password** - The current password of the target user (required when **Rotation Method** is set to **Login as Target**).+ - **Password Requirements** - The constraints to apply when generating new passwords.++ 5. Specify the secret names that the HP iLO credentials should be mapped to. Then click **Next**.+ ++ - **Username** - the name of the secret that the iLO username will be stored in.+ - **Password** - the name of the secret that the rotated password will be stored in.++ 6. Give your rotation a name and description (optional). Then click **Next**.+ ++ - **Name** - the name of the secret rotation configuration. Must be slug-friendly.+ - **Description** (optional) - a description of this rotation configuration.++ 7. Review your configuration, then click **Create Secret Rotation**.+ ++ 8. Your **HP iLO Local Account** credentials are now available for use via the mapped secrets.+ ++ ### Reconcile HP iLO Local Account++ If you suspect the credentials are out of sync (for example, after a manual password change on the iLO), you can regain access by using **Reconcile**. This will use the configured SSH App Connection's admin account to reset the target user's password and sync it with Infisical.++ + + </Tab>+ <Tab title="API">+ To create an HP iLO Local Account Rotation, make an API request to the [Create HP iLO+ Local Account Rotation](/api-reference/endpoints/secret-rotations/hp-ilo-local-account/create) API endpoint.++ ### Sample request++ ```bash Request+ curl --request POST \+ --url https://us.infisical.com/api/v2/secret-rotations/hp-ilo-local-account \+ --header 'Content-Type: application/json' \+ --data '{+ "name": "my-hp-ilo-rotation",+ "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "description": "my HP iLO local account rotation",+ "connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "environment": "dev",+ "secretPath": "/",+ "isAutoRotationEnabled": false,+ "rotationInterval": 30,+ "rotateAtUtc": {+ "hours": 0,+ "minutes": 0+ },+ "parameters": {+ "rotationMethod": "login-as-root",+ "username": "ilouser",+ "passwordRequirements": {+ "length": 48,+ "required": {+ "digits": 2,+ "lowercase": 2,+ "uppercase": 2,+ "symbols": 2+ },+ "allowedSymbols": "-_.~!*"+ }+ },+ "secretsMapping": {+ "username": "ILO_USERNAME",+ "password": "ILO_PASSWORD"+ }+ }'+ ```++ <Note>+ Due to HP iLO Local Account Rotations rotating a single credential set, auto-rotation may result in service interruptions. If you need to ensure service continuity, we recommend disabling this option.+ </Note>++ ### Sample response++ ```bash Response+ {+ "secretRotation": {+ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "name": "my-hp-ilo-rotation",+ "description": "my HP iLO local account rotation",+ "secretsMapping": {+ "username": "ILO_USERNAME",+ "password": "ILO_PASSWORD"+ },+ "isAutoRotationEnabled": false,+ "activeIndex": 0,+ "folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "createdAt": "2023-11-07T05:31:56Z",+ "updatedAt": "2023-11-07T05:31:56Z",+ "rotationInterval": 30,+ "rotationStatus": "success",+ "lastRotationAttemptedAt": "2023-11-07T05:31:56Z",+ "lastRotatedAt": "2023-11-07T05:31:56Z",+ "lastRotationJobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "nextRotationAt": "2023-11-07T05:31:56Z",+ "connection": {+ "app": "ssh",+ "name": "my-ssh-connection",+ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"+ },+ "environment": {+ "slug": "dev",+ "name": "Development",+ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"+ },+ "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "folder": {+ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "path": "/"+ },+ "rotateAtUtc": {+ "hours": 0,+ "minutes": 0+ },+ "lastRotationMessage": null,+ "type": "hp-ilo-local-account",+ "parameters": {+ "rotationMethod": "login-as-root",+ "username": "ilouser",+ "passwordRequirements": {+ "length": 48,+ "required": {+ "digits": 2,+ "lowercase": 2,+ "uppercase": 2,+ "symbols": 2+ },+ "allowedSymbols": "-_.~!*"+ }+ }+ }+ }+ ```+ </Tab>+</Tabs>diff --git a/docs/images/secret-rotations-v2/hp-ilo-local-account/hp-ilo-local-account-configuration.png b/docs/images/secret-rotations-v2/hp-ilo-local-account/hp-ilo-local-account-configuration.pngnew file mode 100644index 0000000000..d1591f3d58Binary files /dev/null and b/docs/images/secret-rotations-v2/hp-ilo-local-account/hp-ilo-local-account-configuration.png differdiff --git a/docs/images/secret-rotations-v2/hp-ilo-local-account/hp-ilo-local-account-confirm.png b/docs/images/secret-rotations-v2/hp-ilo-local-account/hp-ilo-local-account-confirm.pngnew file mode 100644index 0000000000..0ae9b718d8Binary files /dev/null and b/docs/images/secret-rotations-v2/hp-ilo-local-account/hp-ilo-local-account-confirm.png differdiff --git a/docs/images/secret-rotations-v2/hp-ilo-local-account/hp-ilo-local-account-created.png b/docs/images/secret-rotations-v2/hp-ilo-local-account/hp-ilo-local-account-created.pngnew file mode 100644index 0000000000..caf094b076Binary files /dev/null and b/docs/images/secret-rotations-v2/hp-ilo-local-account/hp-ilo-local-account-created.png differdiff --git a/docs/images/secret-rotations-v2/hp-ilo-local-account/hp-ilo-local-account-details.png b/docs/images/secret-rotations-v2/hp-ilo-local-account/hp-ilo-local-account-details.pngnew file mode 100644index 0000000000..f05cc8635aBinary files /dev/null and b/docs/images/secret-rotations-v2/hp-ilo-local-account/hp-ilo-local-account-details.png differdiff --git a/docs/images/secret-rotations-v2/hp-ilo-local-account/hp-ilo-local-account-parameters.png b/docs/images/secret-rotations-v2/hp-ilo-local-account/hp-ilo-local-account-parameters.pngnew file mode 100644index 0000000000..bcd95599d9Binary files /dev/null and b/docs/images/secret-rotations-v2/hp-ilo-local-account/hp-ilo-local-account-parameters.png differdiff --git a/docs/images/secret-rotations-v2/hp-ilo-local-account/hp-ilo-local-account-secrets-mapping.png b/docs/images/secret-rotations-v2/hp-ilo-local-account/hp-ilo-local-account-secrets-mapping.pngnew file mode 100644index 0000000000..66e5a717ecBinary files /dev/null and b/docs/images/secret-rotations-v2/hp-ilo-local-account/hp-ilo-local-account-secrets-mapping.png differdiff --git a/docs/images/secret-rotations-v2/hp-ilo-local-account/select-hp-ilo-local-account-option.png b/docs/images/secret-rotations-v2/hp-ilo-local-account/select-hp-ilo-local-account-option.pngnew file mode 100644index 0000000000..b654706216Binary files /dev/null and b/docs/images/secret-rotations-v2/hp-ilo-local-account/select-hp-ilo-local-account-option.png differdiff --git a/docs/snippets/RotationsBrowser.jsx b/docs/snippets/RotationsBrowser.jsxindex e48a450ccd..f6d006dd33 100644--- a/docs/snippets/RotationsBrowser.jsx+++ b/docs/snippets/RotationsBrowser.jsx@@ -65,6 +65,14 @@ export const RotationsBrowser = () => {category: "Identity & Auth",rotationType: "Single-Phase",},+ {+ name: "HP iLO Local Account",+ slug: "hp-ilo-local-account",+ path: "/documentation/platform/secret-rotation/hp-ilo-local-account",+ description: "Learn how to automatically rotate HP iLO local account passwords.",+ category: "Networking & DNS",+ rotationType: "Single-Phase",+ },{name: "Unix/Linux Local Account",slug: "unix-linux-local-account",diff --git a/frontend/src/components/secret-rotations-v2/ViewSecretRotationV2GeneratedCredentials/ViewHpIloRotationGeneratedCredentials.tsx b/frontend/src/components/secret-rotations-v2/ViewSecretRotationV2GeneratedCredentials/ViewHpIloRotationGeneratedCredentials.tsxnew file mode 100644index 0000000000..09604f16a8--- /dev/null+++ b/frontend/src/components/secret-rotations-v2/ViewSecretRotationV2GeneratedCredentials/ViewHpIloRotationGeneratedCredentials.tsx@@ -0,0 +1,37 @@+import { THpIloRotationGeneratedCredentialsResponse } from "@app/hooks/api/secretRotationsV2/types/hp-ilo-rotation";++import { CredentialDisplay, ViewRotationGeneratedCredentialsDisplay } from "./shared";++type Props = {+ generatedCredentialsResponse: THpIloRotationGeneratedCredentialsResponse;+};++export const ViewHpIloRotationGeneratedCredentials = ({+ generatedCredentialsResponse: { generatedCredentials, activeIndex }+}: Props) => {+ const inactiveIndex = activeIndex === 0 ? 1 : 0;++ const activeCredentials = generatedCredentials[activeIndex];+ const inactiveCredentials = generatedCredentials[inactiveIndex];++ return (+ <ViewRotationGeneratedCredentialsDisplay+ activeCredentials={+ <>+ <CredentialDisplay label="Username">{activeCredentials?.username}</CredentialDisplay>+ <CredentialDisplay isSensitive label="Password">+ {activeCredentials?.password}+ </CredentialDisplay>+ </>+ }+ inactiveCredentials={+ <>+ <CredentialDisplay label="Username">{inactiveCredentials?.username}</CredentialDisplay>+ <CredentialDisplay isSensitive label="Password">+ {inactiveCredentials?.password}+ </CredentialDisplay>+ </>+ }+ />+ );+};diff --git a/frontend/src/components/secret-rotations-v2/ViewSecretRotationV2GeneratedCredentials/ViewSecretRotationV2GeneratedCredentials.tsx b/frontend/src/components/secret-rotations-v2/ViewSecretRotationV2GeneratedCredentials/ViewSecretRotationV2GeneratedCredentials.tsxindex d8c92478f0..7fa9c7d5a0 100644--- a/frontend/src/components/secret-rotations-v2/ViewSecretRotationV2GeneratedCredentials/ViewSecretRotationV2GeneratedCredentials.tsx+++ b/frontend/src/components/secret-rotations-v2/ViewSecretRotationV2GeneratedCredentials/ViewSecretRotationV2GeneratedCredentials.tsx@@ -24,6 +24,7 @@ import {import { ViewSqlCredentialsRotationGeneratedCredentials } from "./shared";import { ViewAwsIamUserSecretRotationGeneratedCredentials } from "./ViewAwsIamUserSecretRotationGeneratedCredentials";import { ViewDbtServiceTokenRotationGeneratedCredentials } from "./ViewDbtSeviceTokenRotationGeneratedCredentials";+import { ViewHpIloRotationGeneratedCredentials } from "./ViewHpIloRotationGeneratedCredentials";import { ViewOktaClientSecretRotationGeneratedCredentials } from "./ViewOktaClientSecretRotationGeneratedCredentials";import { ViewOpenRouterApiKeyRotationGeneratedCredentials } from "./ViewOpenRouterApiKeyRotationGeneratedCredentials";import { ViewRedisCredentialsRotationGeneratedCredentials } from "./ViewRedisCredentialsRotationGeneratedCredentials";@@ -156,6 +157,13 @@ const Content = ({ secretRotation }: ContentProps) => {/>);break;+ case SecretRotation.HpIloLocalAccount:+ Component = (+ <ViewHpIloRotationGeneratedCredentials+ generatedCredentialsResponse={generatedCredentialsResponse}+ />+ );+ break;default:throw new Error("Unhandled View Generated Credential Rotation Type");}diff --git a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/HpIloRotationParametersFields.tsx b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/HpIloRotationParametersFields.tsxnew file mode 100644index 0000000000..2c47366686--- /dev/null+++ b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/HpIloRotationParametersFields.tsx@@ -0,0 +1,275 @@+import { Controller, useFormContext } from "react-hook-form";++import { TSecretRotationV2Form } from "@app/components/secret-rotations-v2/forms/schemas";+import { FormControl, Input, Select, SelectItem } from "@app/components/v2";+import { SecretRotation } from "@app/hooks/api/secretRotationsV2";+import { HpIloRotationMethod } from "@app/hooks/api/secretRotationsV2/types/hp-ilo-rotation";++// iLO 5 has a maximum password length of 39 characters+const HP_ILO_DEFAULT_PASSWORD_REQUIREMENTS = {+ length: 39,+ required: {+ lowercase: 1,+ uppercase: 1,+ digits: 1,+ symbols: 0+ }+};++const getRotationMethodHelperText = (+ isUpdate: boolean,+ value?: HpIloRotationMethod+): string | undefined => {+ if (isUpdate) return "Cannot be updated.";+ if (value === HpIloRotationMethod.LoginAsRoot) {+ return "The SSH connection credentials will change the target user's password";+ }+ return "The target user will change their own password";+};++export const HpIloRotationParametersFields = () => {+ const { control, watch, setValue } = useFormContext<+ TSecretRotationV2Form & {+ type: SecretRotation.HpIloLocalAccount;+ }+ >();++ const id = watch("id");+ const rotationMethod = watch("parameters.rotationMethod", HpIloRotationMethod.LoginAsTarget);+ const isUpdate = Boolean(id);++ return (+ <>+ <Controller+ name="parameters.rotationMethod"+ control={control}+ defaultValue={HpIloRotationMethod.LoginAsTarget}+ render={({ field: { value, onChange }, fieldState: { error } }) => (+ <FormControl+ tooltipText={+ <>+ <span>Determines how the rotation will be performed:</span>+ <ul className="mt-2 ml-4 flex list-disc flex-col gap-2">+ <li>+ <span className="font-medium">Login as Root</span> - The SSH connection+ credentials of the app connection linked will be used to change the target+ user's password.+ </li>+ <li>+ <span className="font-medium">Login as Target</span> - The target user will+ authenticate with their own credentials and change their own password.+ </li>+ </ul>+ </>+ }+ tooltipClassName="max-w-sm"+ errorText={error?.message}+ isError={Boolean(error?.message)}+ label="Rotation Method"+ helperText={getRotationMethodHelperText(isUpdate, value)}+ >+ <Select+ isDisabled={isUpdate}+ value={value}+ onValueChange={(val) => {+ setValue("temporaryParameters", {+ password: ""+ });+ onChange(val);+ }}+ className="w-full border border-mineshaft-500 capitalize"+ position="popper"+ dropdownContainerClassName="max-w-none"+ >+ {Object.values(HpIloRotationMethod).map((method) => {+ return (+ <SelectItem value={method} className="capitalize" key={method}>+ {method.replace(/-/g, " ")}+ </SelectItem>+ );+ })}+ </Select>+ </FormControl>+ )}+ />+ <div className="flex gap-3">+ <Controller+ name="parameters.username"+ control={control}+ render={({ field: { value, onChange }, fieldState: { error } }) => (+ <FormControl+ className="flex-1"+ isError={Boolean(error)}+ errorText={error?.message}+ label="Target Username"+ tooltipText="The HP iLO username of the account to rotate the password for."+ tooltipClassName="max-w-sm"+ helperText={isUpdate ? "Cannot be updated." : undefined}+ >+ <Input+ isDisabled={isUpdate}+ value={value}+ onChange={onChange}+ placeholder="ilo_user"+ />+ </FormControl>+ )}+ />+ {!isUpdate && rotationMethod === HpIloRotationMethod.LoginAsTarget && (+ <Controller+ name="temporaryParameters.password"+ control={control}+ render={({ field: { value, onChange }, fieldState: { error } }) => (+ <FormControl+ className="flex-1"+ isError={Boolean(error)}+ errorText={error?.message}+ label="Current Password"+ tooltipText="The current password of the target user. Required for initial rotation setup."+ >+ <Input+ value={value}+ onChange={onChange}+ type="password"+ placeholder="****************"+ />+ </FormControl>+ )}+ />+ )}+ </div>+ <div className="flex flex-col gap-3">+ <div className="w-full border-b border-mineshaft-600">+ <span className="text-sm text-mineshaft-300">Password Requirements</span>+ </div>+ <div className="grid grid-cols-2 gap-x-3 gap-y-1 rounded-sm border border-mineshaft-600 bg-mineshaft-700 px-3 pt-3">+ <Controller+ control={control}+ name="parameters.passwordRequirements.length"+ defaultValue={HP_ILO_DEFAULT_PASSWORD_REQUIREMENTS.length}+ render={({ field, fieldState: { error } }) => (+ <FormControl+ label="Password Length"+ isError={Boolean(error)}+ errorText={error?.message}+ tooltipText="The length of the password to generate"+ >+ <Input+ type="number"+ min={1}+ max={250}+ size="sm"+ {...field}+ onChange={(e) => field.onChange(Number(e.target.value))}+ />+ </FormControl>+ )}+ />+ <Controller+ control={control}+ name="parameters.passwordRequirements.required.digits"+ defaultValue={HP_ILO_DEFAULT_PASSWORD_REQUIREMENTS.required.digits}+ render={({ field, fieldState: { error } }) => (+ <FormControl+ label="Digit Count"+ isError={Boolean(error)}+ errorText={error?.message}+ tooltipText="Minimum number of digits"+ >+ <Input+ type="number"+ min={0}+ size="sm"+ {...field}+ onChange={(e) => field.onChange(Number(e.target.value))}+ />+ </FormControl>+ )}+ />+ <Controller+ control={control}+ name="parameters.passwordRequirements.required.lowercase"+ defaultValue={HP_ILO_DEFAULT_PASSWORD_REQUIREMENTS.required.lowercase}+ render={({ field, fieldState: { error } }) => (+ <FormControl+ label="Lowercase Character Count"+ isError={Boolean(error)}+ errorText={error?.message}+ tooltipText="Minimum number of lowercase characters"+ >+ <Input+ type="number"+ min={0}+ size="sm"+ {...field}+ onChange={(e) => field.onChange(Number(e.target.value))}+ />+ </FormControl>+ )}+ />+ <Controller+ control={control}+ name="parameters.passwordRequirements.required.uppercase"+ defaultValue={HP_ILO_DEFAULT_PASSWORD_REQUIREMENTS.required.uppercase}+ render={({ field, fieldState: { error } }) => (+ <FormControl+ label="Uppercase Character Count"+ isError={Boolean(error)}+ errorText={error?.message}+ tooltipText="Minimum number of uppercase characters"+ >+ <Input+ type="number"+ min={0}+ size="sm"+ {...field}+ onChange={(e) => field.onChange(Number(e.target.value))}+ />+ </FormControl>+ )}+ />+ <Controller+ control={control}+ name="parameters.passwordRequirements.required.symbols"+ defaultValue={HP_ILO_DEFAULT_PASSWORD_REQUIREMENTS.required.symbols}+ render={({ field, fieldState: { error } }) => (+ <FormControl+ label="Symbol Count"+ isError={Boolean(error)}+ errorText={error?.message}+ tooltipText="Minimum number of symbols"+ >+ <Input+ type="number"+ min={0}+ size="sm"+ {...field}+ onChange={(e) => field.onChange(Number(e.target.value))}+ />+ </FormControl>+ )}+ />+ <Controller+ control={control}+ name="parameters.passwordRequirements.allowedSymbols"+ render={({ field, fieldState: { error } }) => (+ <FormControl+ label="Allowed Symbols"+ isError={Boolean(error)}+ errorText={error?.message}+ tooltipText="Symbols to use in generated password"+ >+ <Input+ placeholder="-_.~!*"+ size="sm"+ {...field}+ onChange={(e) => field.onChange(e.target.value)}+ />+ </FormControl>+ )}+ />+ </div>+ </div>+ </>+ );+};diff --git a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/SecretRotationV2ParametersFields.tsx b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/SecretRotationV2ParametersFields.tsxindex 00723ae643..66d1035da1 100644--- a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/SecretRotationV2ParametersFields.tsx+++ b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/SecretRotationV2ParametersFields.tsx@@ -8,6 +8,7 @@ import { AwsIamUserSecretRotationParametersFields } from "./AwsIamUserSecretRotaimport { AzureClientSecretRotationParametersFields } from "./AzureClientSecretRotationParametersFields";import { DatabricksServicePrincipalSecretRotationParametersFields } from "./DatabricksServicePrincipalSecretRotationParametersFields";import { DbtServiceTokenRotationParametersFields } from "./DbtServiceTokenRotationParametersFields";+import { HpIloRotationParametersFields } from "./HpIloRotationParametersFields";import { LdapPasswordRotationParametersFields } from "./LdapPasswordRotationParametersFields";import { MongoRotationParametersFields } from "./MongoRotationParametersFields";import { OktaClientSecretRotationParametersFields } from "./OktaClientSecretRotationParametersFields";@@ -34,7 +35,8 @@ const COMPONENT_MAP: Record<SecretRotation, React.FC> = {[SecretRotation.UnixLinuxLocalAccount]: UnixLinuxLocalAccountRotationParametersFields,[SecretRotation.DbtServiceToken]: DbtServiceTokenRotationParametersFields,[SecretRotation.WindowsLocalAccount]: WindowsLocalAccountRotationParametersFields,- [SecretRotation.OpenRouterApiKey]: OpenRouterApiKeyRotationParametersFields+ [SecretRotation.OpenRouterApiKey]: OpenRouterApiKeyRotationParametersFields,+ [SecretRotation.HpIloLocalAccount]: HpIloRotationParametersFields};export const SecretRotationV2ParametersFields = () => {diff --git a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ReviewFields/HpIloRotationReviewFields.tsx b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ReviewFields/HpIloRotationReviewFields.tsxnew file mode 100644index 0000000000..529b04e6f2--- /dev/null+++ b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ReviewFields/HpIloRotationReviewFields.tsx@@ -0,0 +1,59 @@+import { useFormContext } from "react-hook-form";++import { TSecretRotationV2Form } from "@app/components/secret-rotations-v2/forms/schemas";+import { SecretRotation } from "@app/hooks/api/secretRotationsV2";++export const HpIloRotationReviewFields = () => {+ const { watch } = useFormContext<+ TSecretRotationV2Form & {+ type: SecretRotation.HpIloLocalAccount;+ }+ >();++ const parameters = watch("parameters");+ const secretsMapping = watch("secretsMapping");++ return (+ <div className="flex flex-col gap-4">+ <div>+ <h3 className="mb-2 text-sm font-semibold text-mineshaft-200">Parameters</h3>+ <div className="rounded-md border border-mineshaft-600 bg-mineshaft-800 p-3">+ <div className="grid grid-cols-2 gap-3">+ <div>+ <p className="text-xs text-mineshaft-400">Username</p>+ <p className="text-sm text-mineshaft-100">{parameters.username}</p>+ </div>+ <div>+ <p className="text-xs text-mineshaft-400">Rotation Method</p>+ <p className="text-sm text-mineshaft-100 capitalize">+ {parameters.rotationMethod?.replace(/-/g, " ") || "Login as target"}+ </p>+ </div>+ <div>+ <p className="text-xs text-mineshaft-400">Password Length</p>+ <p className="text-sm text-mineshaft-100">+ {parameters.passwordRequirements?.length || 32} characters+ </p>+ </div>+ </div>+ </div>+ </div>++ <div>+ <h3 className="mb-2 text-sm font-semibold text-mineshaft-200">Secrets Mapping</h3>+ <div className="rounded-md border border-mineshaft-600 bg-mineshaft-800 p-3">+ <div className="grid grid-cols-2 gap-3">+ <div>+ <p className="text-xs text-mineshaft-400">Username Key</p>+ <p className="text-sm text-mineshaft-100">{secretsMapping.username}</p>+ </div>+ <div>+ <p className="text-xs text-mineshaft-400">Password Key</p>+ <p className="text-sm text-mineshaft-100">{secretsMapping.password}</p>+ </div>+ </div>+ </div>+ </div>+ </div>+ );+};diff --git a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ReviewFields/SecretRotationReviewFields.tsx b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ReviewFields/SecretRotationReviewFields.tsxindex 80a6d19c99..907801493d 100644--- a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ReviewFields/SecretRotationReviewFields.tsx+++ b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ReviewFields/SecretRotationReviewFields.tsx@@ -11,6 +11,7 @@ import { AwsIamUserSecretRotationReviewFields } from "./AwsIamUserSecretRotationimport { AzureClientSecretRotationReviewFields } from "./AzureClientSecretRotationReviewFields";import { DatabricksServicePrincipalSecretRotationReviewFields } from "./DatabricksServicePrincipalSecretRotationReviewFields";import { DbtServiceTokenRotationReviewFields } from "./DbtServiceTokenRotationReviewFields";+import { HpIloRotationReviewFields } from "./HpIloRotationReviewFields";import { LdapPasswordRotationReviewFields } from "./LdapPasswordRotationReviewFields";import { OktaClientSecretRotationReviewFields } from "./OktaClientSecretRotationReviewFields";import { OpenRouterApiKeyRotationReviewFields } from "./OpenRouterApiKeyRotationReviewFields";@@ -36,7 +37,8 @@ const COMPONENT_MAP: Record<SecretRotation, React.FC> = {[SecretRotation.UnixLinuxLocalAccount]: UnixLinuxLocalAccountRotationReviewFields,[SecretRotation.DbtServiceToken]: DbtServiceTokenRotationReviewFields,[SecretRotation.WindowsLocalAccount]: WindowsLocalAccountRotationReviewFields,- [SecretRotation.OpenRouterApiKey]: OpenRouterApiKeyRotationReviewFields+ [SecretRotation.OpenRouterApiKey]: OpenRouterApiKeyRotationReviewFields,+ [SecretRotation.HpIloLocalAccount]: HpIloRotationReviewFields};export const SecretRotationV2ReviewFields = () => {diff --git a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2SecretsMappingFields/HpIloRotationSecretsMappingFields.tsx b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2SecretsMappingFields/HpIloRotationSecretsMappingFields.tsxnew file mode 100644index 0000000000..780c2c9075--- /dev/null+++ b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2SecretsMappingFields/HpIloRotationSecretsMappingFields.tsx@@ -0,0 +1,46 @@+import { Controller, useFormContext } from "react-hook-form";++import { TSecretRotationV2Form } from "@app/components/secret-rotations-v2/forms/schemas";+import { FormControl, Input } from "@app/components/v2";+import { SecretRotation } from "@app/hooks/api/secretRotationsV2";++export const HpIloRotationSecretsMappingFields = () => {+ const { control } = useFormContext<+ TSecretRotationV2Form & {+ type: SecretRotation.HpIloLocalAccount;+ }+ >();++ return (+ <>+ <Controller+ name="secretsMapping.username"+ control={control}+ render={({ field, fieldState: { error } }) => (+ <FormControl+ label="Username"+ isError={Boolean(error)}+ errorText={error?.message}+ helperText="The secret key where the iLO username will be stored"+ >+ <Input {...field} placeholder="ILO_USERNAME" />+ </FormControl>+ )}+ />+ <Controller+ name="secretsMapping.password"+ control={control}+ render={({ field, fieldState: { error } }) => (+ <FormControl+ label="Password"+ isError={Boolean(error)}+ errorText={error?.message}+ helperText="The secret key where the rotated iLO password will be stored"+ >+ <Input {...field} placeholder="ILO_PASSWORD" />+ </FormControl>+ )}+ />+ </>+ );+};diff --git a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2SecretsMappingFields/SecretRotationV2SecretsMappingFields.tsx b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2SecretsMappingFields/SecretRotationV2SecretsMappingFields.tsxindex e6771188f6..f4d02c179a 100644--- a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2SecretsMappingFields/SecretRotationV2SecretsMappingFields.tsx+++ b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2SecretsMappingFields/SecretRotationV2SecretsMappingFields.tsx@@ -8,6 +8,7 @@ import { AwsIamUserSecretRotationSecretsMappingFields } from "./AwsIamUserSecretimport { AzureClientSecretRotationSecretsMappingFields } from "./AzureClientSecretRotationSecretsMappingFields";import { DatabricksServicePrincipalSecretRotationSecretsMappingFields } from "./DatabricksServicePrincipalSecretRotationSecretsMappingFields";import { DbtServiceTokenRotationSecretsMappingFields } from "./DbtServiceTokenRotationSecretsMappingFields";+import { HpIloRotationSecretsMappingFields } from "./HpIloRotationSecretsMappingFields";import { LdapPasswordRotationSecretsMappingFields } from "./LdapPasswordRotationSecretsMappingFields";import { OktaClientSecretRotationSecretsMappingFields } from "./OktaClientSecretRotationSecretsMappingFields";import { OpenRouterApiKeyRotationSecretsMappingFields } from "./OpenRouterApiKeyRotationSecretsMappingFields";@@ -33,7 +34,8 @@ const COMPONENT_MAP: Record<SecretRotation, React.FC> = {[SecretRotation.UnixLinuxLocalAccount]: UnixLinuxLocalAccountRotationSecretsMappingFields,[SecretRotation.DbtServiceToken]: DbtServiceTokenRotationSecretsMappingFields,[SecretRotation.WindowsLocalAccount]: WindowsLocalAccountRotationSecretsMappingFields,- [SecretRotation.OpenRouterApiKey]: OpenRouterApiKeyRotationSecretsMappingFields+ [SecretRotation.OpenRouterApiKey]: OpenRouterApiKeyRotationSecretsMappingFields,+ [SecretRotation.HpIloLocalAccount]: HpIloRotationSecretsMappingFields};export const SecretRotationV2SecretsMappingFields = () => {diff --git a/frontend/src/components/secret-rotations-v2/forms/schemas/hp-ilo-rotation-schema.ts b/frontend/src/components/secret-rotations-v2/forms/schemas/hp-ilo-rotation-schema.tsnew file mode 100644index 0000000000..5eab65bc4a--- /dev/null+++ b/frontend/src/components/secret-rotations-v2/forms/schemas/hp-ilo-rotation-schema.ts@@ -0,0 +1,29 @@+import { z } from "zod";++import { SecretRotation } from "@app/hooks/api/secretRotationsV2";+import { HpIloRotationMethod } from "@app/hooks/api/secretRotationsV2/types/hp-ilo-rotation";++import { PasswordRequirementsSchema } from "./shared/password-requirements-schema";+import { BaseSecretRotationSchema } from "./base-secret-rotation-v2-schema";++export const HpIloRotationSchema = z+ .object({+ type: z.literal(SecretRotation.HpIloLocalAccount),+ parameters: z.object({+ username: z.string().trim().min(1, "Username is required"),+ rotationMethod: z.nativeEnum(HpIloRotationMethod).optional(),+ passwordRequirements: PasswordRequirementsSchema.optional()+ }),+ secretsMapping: z.object({+ username: z.string().min(1, "Username mapping is required"),+ password: z.string().min(1, "Password mapping is required")+ }),+ temporaryParameters: z+ .object({+ password: z.string().optional()+ })+ .optional()+ })+ .merge(BaseSecretRotationSchema);++export type THpIloRotationForm = z.infer<typeof HpIloRotationSchema>;diff --git a/frontend/src/components/secret-rotations-v2/forms/schemas/index.ts b/frontend/src/components/secret-rotations-v2/forms/schemas/index.tsindex cd7426f817..65689435ca 100644--- a/frontend/src/components/secret-rotations-v2/forms/schemas/index.ts+++ b/frontend/src/components/secret-rotations-v2/forms/schemas/index.ts@@ -10,11 +10,13 @@ import { MsSqlCredentialsRotationSchema } from "@app/components/secret-rotationsimport { MySqlCredentialsRotationSchema } from "@app/components/secret-rotations-v2/forms/schemas/mysql-credentials-rotation-schema";import { PostgresCredentialsRotationSchema } from "@app/components/secret-rotations-v2/forms/schemas/postgres-credentials-rotation-schema";import { SecretRotation } from "@app/hooks/api/secretRotationsV2";+import { HpIloRotationMethod } from "@app/hooks/api/secretRotationsV2/types/hp-ilo-rotation";import { LdapPasswordRotationMethod } from "@app/hooks/api/secretRotationsV2/types/ldap-password-rotation";import { UnixLinuxLocalAccountRotationMethod } from "@app/hooks/api/secretRotationsV2/types/unix-linux-local-account-rotation";import { WindowsLocalAccountRotationMethod } from "@app/hooks/api/secretRotationsV2/types/windows-local-account-rotation";import { DbtServiceTokenRotationSchema } from "./dbt-service-token-rotation-schema";+import { HpIloRotationSchema } from "./hp-ilo-rotation-schema";import { OktaClientSecretRotationSchema } from "./okta-client-secret-rotation-schema";import { OpenRouterApiKeyRotationSchema } from "./open-router-api-key-rotation-schema";import { OracleDBCredentialsRotationSchema } from "./oracledb-credentials-rotation-schema";@@ -41,7 +43,8 @@ export const SecretRotationV2FormSchema = (isUpdate: boolean) =>UnixLinuxLocalAccountRotationSchema,DbtServiceTokenRotationSchema,WindowsLocalAccountRotationSchema,- OpenRouterApiKeyRotationSchema+ OpenRouterApiKeyRotationSchema,+ HpIloRotationSchema]),z.object({ id: z.string().optional() }))@@ -87,6 +90,19 @@ export const SecretRotationV2FormSchema = (isUpdate: boolean) =>});}}++ if (val.type === SecretRotation.HpIloLocalAccount) {+ if (+ val.parameters.rotationMethod === HpIloRotationMethod.LoginAsTarget &&+ !val.temporaryParameters?.password+ ) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: "Password required",+ path: ["temporaryParameters", "password"]+ });+ }+ }});export type TSecretRotationV2Form = z.infer<ReturnType<typeof SecretRotationV2FormSchema>>;diff --git a/frontend/src/helpers/secretRotationsV2.ts b/frontend/src/helpers/secretRotationsV2.tsindex 64b2cf77b8..cdda10b1fd 100644--- a/frontend/src/helpers/secretRotationsV2.ts+++ b/frontend/src/helpers/secretRotationsV2.ts@@ -84,6 +84,11 @@ export const SECRET_ROTATION_MAP: Record<name: "OpenRouter API Key",image: "OpenRouter.png",size: 50+ },+ [SecretRotation.HpIloLocalAccount]: {+ name: "HP iLO Local Account",+ image: "SSH.png",+ size: 50}};@@ -103,7 +108,8 @@ export const SECRET_ROTATION_CONNECTION_MAP: Record<SecretRotation, AppConnectio[SecretRotation.UnixLinuxLocalAccount]: AppConnection.SSH,[SecretRotation.DbtServiceToken]: AppConnection.Dbt,[SecretRotation.WindowsLocalAccount]: AppConnection.SMB,- [SecretRotation.OpenRouterApiKey]: AppConnection.OpenRouter+ [SecretRotation.OpenRouterApiKey]: AppConnection.OpenRouter,+ [SecretRotation.HpIloLocalAccount]: AppConnection.SSH};// if a rotation can potentially have downtime due to rotating a single credential set this to false@@ -123,7 +129,8 @@ export const IS_ROTATION_DUAL_CREDENTIALS: Record<SecretRotation, boolean> = {[SecretRotation.UnixLinuxLocalAccount]: false,[SecretRotation.DbtServiceToken]: true,[SecretRotation.WindowsLocalAccount]: false,- [SecretRotation.OpenRouterApiKey]: true+ [SecretRotation.OpenRouterApiKey]: true,+ [SecretRotation.HpIloLocalAccount]: false};export const getRotateAtLocal = ({ hours, minutes }: TSecretRotationV2["rotateAtUtc"]) => {diff --git a/frontend/src/hooks/api/secretRotationsV2/enums.ts b/frontend/src/hooks/api/secretRotationsV2/enums.tsindex 0196528f2a..d7293ea08a 100644--- a/frontend/src/hooks/api/secretRotationsV2/enums.ts+++ b/frontend/src/hooks/api/secretRotationsV2/enums.ts@@ -14,7 +14,8 @@ export enum SecretRotation {UnixLinuxLocalAccount = "unix-linux-local-account",DbtServiceToken = "dbt-service-token",WindowsLocalAccount = "windows-local-account",- OpenRouterApiKey = "open-router-api-key"+ OpenRouterApiKey = "open-router-api-key",+ HpIloLocalAccount = "hp-ilo-local-account"}export enum SecretRotationStatus {diff --git a/frontend/src/hooks/api/secretRotationsV2/types/hp-ilo-rotation.ts b/frontend/src/hooks/api/secretRotationsV2/types/hp-ilo-rotation.tsnew file mode 100644index 0000000000..c2e1a3057c--- /dev/null+++ b/frontend/src/hooks/api/secretRotationsV2/types/hp-ilo-rotation.ts@@ -0,0 +1,45 @@+import { TPasswordRequirements } from "@app/components/secret-rotations-v2/forms/schemas/shared";+import { AppConnection } from "@app/hooks/api/appConnections/enums";+import { SecretRotation } from "@app/hooks/api/secretRotationsV2";+import {+ TSecretRotationV2Base,+ TSecretRotationV2GeneratedCredentialsResponseBase+} from "@app/hooks/api/secretRotationsV2/types/shared";++export enum HpIloRotationMethod {+ LoginAsTarget = "login-as-target",+ LoginAsRoot = "login-as-root"+}++export type THpIloRotation = TSecretRotationV2Base & {+ type: SecretRotation.HpIloLocalAccount;+ parameters: {+ username: string;+ rotationMethod?: HpIloRotationMethod;+ passwordRequirements?: TPasswordRequirements;+ };+ secretsMapping: {+ username: string;+ password: string;+ };+};++export type THpIloRotationGeneratedCredentials = {+ username: string;+ password: string;+};++export type THpIloRotationGeneratedCredentialsResponse =+ TSecretRotationV2GeneratedCredentialsResponseBase<+ SecretRotation.HpIloLocalAccount,+ THpIloRotationGeneratedCredentials+ >;++export type THpIloRotationOption = {+ name: string;+ type: SecretRotation.HpIloLocalAccount;+ connection: AppConnection.SSH;+ template: {+ secretsMapping: THpIloRotation["secretsMapping"];+ };+};diff --git a/frontend/src/hooks/api/secretRotationsV2/types/index.ts b/frontend/src/hooks/api/secretRotationsV2/types/index.tsindex 959150f7a7..30c18638b0 100644--- a/frontend/src/hooks/api/secretRotationsV2/types/index.ts+++ b/frontend/src/hooks/api/secretRotationsV2/types/index.ts@@ -41,6 +41,11 @@ import {TDbtServiceTokenRotationGeneratedCredentialsResponse,TDbtServiceTokenRotationOption} from "./dbt-service-token-rotation";+import {+ THpIloRotation,+ THpIloRotationGeneratedCredentialsResponse,+ THpIloRotationOption+} from "./hp-ilo-rotation";import {TMongoDBCredentialsRotation,TMongoDBCredentialsRotationGeneratedCredentialsResponse,@@ -97,6 +102,7 @@ export type TSecretRotationV2 = (| TDbtServiceTokenRotation| TWindowsLocalAccountRotation| TOpenRouterApiKeyRotation+ | THpIloRotation) & {secrets: (SecretV3RawSanitized | null)[];};@@ -114,7 +120,8 @@ export type TSecretRotationV2Option =| TUnixLinuxLocalAccountRotationOption| TDbtServiceTokenRotationOption| TWindowsLocalAccountRotationOption- | TOpenRouterApiKeyRotationOption;+ | TOpenRouterApiKeyRotationOption+ | THpIloRotationOption;export type TListSecretRotationV2Options = { secretRotationOptions: TSecretRotationV2Option[] };@@ -136,7 +143,8 @@ export type TViewSecretRotationGeneratedCredentialsResponse =| TUnixLinuxLocalAccountRotationGeneratedCredentialsResponse| TDbtServiceTokenRotationGeneratedCredentialsResponse| TWindowsLocalAccountRotationGeneratedCredentialsResponse- | TOpenRouterApiKeyRotationGeneratedCredentialsResponse;+ | TOpenRouterApiKeyRotationGeneratedCredentialsResponse+ | THpIloRotationGeneratedCredentialsResponse;export type TCreateSecretRotationV2DTO = DiscriminativePick<TSecretRotationV2,@@ -196,6 +204,7 @@ export type TSecretRotationOptionMap = {[SecretRotation.DbtServiceToken]: TDbtServiceTokenRotationOption;[SecretRotation.WindowsLocalAccount]: TWindowsLocalAccountRotationOption;[SecretRotation.OpenRouterApiKey]: TOpenRouterApiKeyRotationOption;+ [SecretRotation.HpIloLocalAccount]: THpIloRotationOption;};export type TSecretRotationGeneratedCredentialsResponseMap = {@@ -215,12 +224,16 @@ export type TSecretRotationGeneratedCredentialsResponseMap = {[SecretRotation.DbtServiceToken]: TDbtServiceTokenRotationGeneratedCredentialsResponse;[SecretRotation.WindowsLocalAccount]: TWindowsLocalAccountRotationGeneratedCredentialsResponse;[SecretRotation.OpenRouterApiKey]: TOpenRouterApiKeyRotationGeneratedCredentialsResponse;+ [SecretRotation.HpIloLocalAccount]: THpIloRotationGeneratedCredentialsResponse;};-// Unified type for local account reconciliation (Unix/Linux and Windows)+// Unified type for local account reconciliation (Unix/Linux, Windows, and HP iLO)export type TReconcileLocalAccountRotationDTO = {rotationId: string;- type: SecretRotation.UnixLinuxLocalAccount | SecretRotation.WindowsLocalAccount;+ type:+ | SecretRotation.UnixLinuxLocalAccount+ | SecretRotation.WindowsLocalAccount+ | SecretRotation.HpIloLocalAccount;// required for query invalidationsecretPath: string;projectId: string;@@ -229,5 +242,5 @@ export type TReconcileLocalAccountRotationDTO = {export type TReconcileLocalAccountRotationResponse = {message: string;reconciled: boolean;- secretRotation: TUnixLinuxLocalAccountRotation | TWindowsLocalAccountRotation;+ secretRotation: TUnixLinuxLocalAccountRotation | TWindowsLocalAccountRotation | THpIloRotation;};diff --git a/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx b/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsxindex b07ccc104b..32415daa31 100644--- a/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx+++ b/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx@@ -3214,7 +3214,9 @@ const OverviewPageContent = () => {((popUp.reconcileSecretRotation.data as TSecretRotationV2)?.type ===SecretRotationV2.UnixLinuxLocalAccount ||(popUp.reconcileSecretRotation.data as TSecretRotationV2)?.type ===- SecretRotationV2.WindowsLocalAccount)+ SecretRotationV2.WindowsLocalAccount ||+ (popUp.reconcileSecretRotation.data as TSecretRotationV2)?.type ===+ SecretRotationV2.HpIloLocalAccount)}secretRotation={popUp.reconcileSecretRotation.data as TSecretRotationV2}onOpenChange={(isOpen) => handlePopUpToggle("reconcileSecretRotation", isOpen)}diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/SecretOverviewSecretRotationRow/SecretOverviewSecretRotationRow.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/SecretOverviewSecretRotationRow/SecretOverviewSecretRotationRow.tsxindex 02504c15e2..4cab2e095d 100644--- a/frontend/src/pages/secret-manager/OverviewPage/components/SecretOverviewSecretRotationRow/SecretOverviewSecretRotationRow.tsx+++ b/frontend/src/pages/secret-manager/OverviewPage/components/SecretOverviewSecretRotationRow/SecretOverviewSecretRotationRow.tsx@@ -30,6 +30,7 @@ import {SecretRotationStatus,TSecretRotationV2} from "@app/hooks/api/secretRotationsV2";+import { HpIloRotationMethod } from "@app/hooks/api/secretRotationsV2/types/hp-ilo-rotation";import { UnixLinuxLocalAccountRotationMethod } from "@app/hooks/api/secretRotationsV2/types/unix-linux-local-account-rotation";import { WindowsLocalAccountRotationMethod } from "@app/hooks/api/secretRotationsV2/types/windows-local-account-rotation";import { getExpandedRowStyle } from "@app/pages/secret-manager/OverviewPage/components/utils";@@ -120,6 +121,25 @@ export const SecretOverviewSecretRotationRow = ({const { name: rotationType, image } = SECRET_ROTATION_MAP[type];+ const showReconcileButton =+ (secretRotation.type === SecretRotation.UnixLinuxLocalAccount &&+ secretRotation.parameters.rotationMethod ===+ UnixLinuxLocalAccountRotationMethod.LoginAsTarget) ||+ (secretRotation.type === SecretRotation.WindowsLocalAccount &&+ secretRotation.parameters.rotationMethod ===+ WindowsLocalAccountRotationMethod.LoginAsTarget) ||+ (secretRotation.type === SecretRotation.HpIloLocalAccount &&+ secretRotation.parameters.rotationMethod === HpIloRotationMethod.LoginAsTarget);++ console.log(+ "showReconcileButton:",+ showReconcileButton,+ "type:",+ secretRotation.type,+ "rotationMethod:",+ secretRotation.parameters+ );+return (<Tr key={`secret-rotation-${slug}-${secretRotationName}`}><Td@@ -218,12 +238,7 @@ export const SecretOverviewSecretRotationRow = ({</IconButton>)}</ProjectPermissionCan>- {((secretRotation.type === SecretRotation.UnixLinuxLocalAccount &&- secretRotation.parameters.rotationMethod ===- UnixLinuxLocalAccountRotationMethod.LoginAsTarget) ||- (secretRotation.type === SecretRotation.WindowsLocalAccount &&- secretRotation.parameters.rotationMethod ===- WindowsLocalAccountRotationMethod.LoginAsTarget)) && (+ {showReconcileButton && (<ProjectPermissionCanI={ProjectPermissionSecretRotationActions.RotateSecrets}a={subject(ProjectPermissionSub.SecretRotation, {diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretRotationListView/SecretRotationItem.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretRotationListView/SecretRotationItem.tsxindex 7d3f38e044..22743a6b6b 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretRotationListView/SecretRotationItem.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretRotationListView/SecretRotationItem.tsx@@ -21,6 +21,7 @@ import { ProjectPermissionSecretRotationActions } from "@app/context/ProjectPermimport { SECRET_ROTATION_MAP } from "@app/helpers/secretRotationsV2";import { UsedBySecretSyncs } from "@app/hooks/api/dashboard/types";import { SecretRotation, TSecretRotationV2 } from "@app/hooks/api/secretRotationsV2";+import { HpIloRotationMethod } from "@app/hooks/api/secretRotationsV2/types/hp-ilo-rotation";import { UnixLinuxLocalAccountRotationMethod } from "@app/hooks/api/secretRotationsV2/types/unix-linux-local-account-rotation";import { WindowsLocalAccountRotationMethod } from "@app/hooks/api/secretRotationsV2/types/windows-local-account-rotation";import { SecretV3RawSanitized, WsTag } from "@app/hooks/api/types";@@ -76,6 +77,25 @@ export const SecretRotationItem = ({const [showSecrets, setShowSecrets] = useState(false);const [isExpanded, setIsExpanded] = useState(true);+ const showReconcileButton =+ (secretRotation.type === SecretRotation.UnixLinuxLocalAccount &&+ secretRotation.parameters.rotationMethod ===+ UnixLinuxLocalAccountRotationMethod.LoginAsTarget) ||+ (secretRotation.type === SecretRotation.WindowsLocalAccount &&+ secretRotation.parameters.rotationMethod ===+ WindowsLocalAccountRotationMethod.LoginAsTarget) ||+ (secretRotation.type === SecretRotation.HpIloLocalAccount &&+ secretRotation.parameters.rotationMethod === HpIloRotationMethod.LoginAsTarget);++ console.log(+ "showReconcileButton:",+ showReconcileButton,+ "type:",+ secretRotation.type,+ "rotationMethod:",+ secretRotation.parameters+ );+return (<><div@@ -187,12 +207,7 @@ export const SecretRotationItem = ({</IconButton>)}</ProjectPermissionCan>- {((secretRotation.type === SecretRotation.UnixLinuxLocalAccount &&- secretRotation.parameters.rotationMethod ===- UnixLinuxLocalAccountRotationMethod.LoginAsTarget) ||- (secretRotation.type === SecretRotation.WindowsLocalAccount &&- secretRotation.parameters.rotationMethod ===- WindowsLocalAccountRotationMethod.LoginAsTarget)) && (+ {showReconcileButton && (<ProjectPermissionCanI={ProjectPermissionSecretRotationActions.RotateSecrets}a={subject(ProjectPermissionSub.SecretRotation, {@@ -203,21 +218,24 @@ export const SecretRotationItem = ({renderTooltipallowedLabel="Reconcile Secret">- {(isAllowed) => (- <IconButton- ariaLabel="Reconcile secret"- variant="plain"- size="sm"- isDisabled={!isAllowed}- className="w-0 overflow-hidden p-0 group-hover:w-5"- onClick={(e) => {- e.stopPropagation();- onReconcile();- }}- >- <FontAwesomeIcon icon={faHandshake} />- </IconButton>- )}+ {(isAllowed) => {+ console.log("isAllowed for reconcile:", isAllowed);+ return (+ <IconButton+ ariaLabel="Reconcile secret"+ variant="plain"+ size="sm"+ isDisabled={!isAllowed}+ className="w-0 overflow-hidden p-0 group-hover:w-5"+ onClick={(e) => {+ e.stopPropagation();+ onReconcile();+ }}+ >+ <FontAwesomeIcon icon={faHandshake} />+ </IconButton>+ );+ }}</ProjectPermissionCan>)}</div>diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretRotationListView/SecretRotationListView.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretRotationListView/SecretRotationListView.tsxindex a4c2e26d0d..beae124eaf 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretRotationListView/SecretRotationListView.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretRotationListView/SecretRotationListView.tsx@@ -87,7 +87,8 @@ export const SecretRotationListView = ({isOpen={popUp.reconcileSecretRotation.isOpen &&(popUp.reconcileSecretRotation.data?.type === SecretRotation.UnixLinuxLocalAccount ||- popUp.reconcileSecretRotation.data?.type === SecretRotation.WindowsLocalAccount)+ popUp.reconcileSecretRotation.data?.type === SecretRotation.WindowsLocalAccount ||+ popUp.reconcileSecretRotation.data?.type === SecretRotation.HpIloLocalAccount)}secretRotation={popUp.reconcileSecretRotation.data as TSecretRotationV2}onOpenChange={(isOpen) => handlePopUpToggle("reconcileSecretRotation", isOpen)}