mirror of
https://github.com/Infisical/infisical.git
synced 2025-03-27 09:40:45 +00:00
add secretGroup attribute to model definition
This commit is contained in:
@ -61,15 +61,13 @@ const syncSecrets = async ({
|
||||
integrationAuth,
|
||||
secrets,
|
||||
accessId,
|
||||
accessToken,
|
||||
secretGroupID
|
||||
accessToken
|
||||
}: {
|
||||
integration: IIntegration;
|
||||
integrationAuth: IIntegrationAuth;
|
||||
secrets: any;
|
||||
accessId: string | null;
|
||||
accessToken: string;
|
||||
secretGroupID?: string;
|
||||
}) => {
|
||||
switch (integration.integration) {
|
||||
case INTEGRATION_AZURE_KEY_VAULT:
|
||||
@ -210,8 +208,7 @@ const syncSecrets = async ({
|
||||
await syncSecretsNorthflank({
|
||||
integration,
|
||||
secrets,
|
||||
accessToken,
|
||||
secretGroupID
|
||||
accessToken
|
||||
});
|
||||
break;
|
||||
}
|
||||
@ -1957,13 +1954,11 @@ const syncSecretsCloudflarePages = async ({
|
||||
const syncSecretsNorthflank = async ({
|
||||
integration,
|
||||
secrets,
|
||||
accessToken,
|
||||
secretGroupID
|
||||
accessToken
|
||||
}: {
|
||||
integration: IIntegration;
|
||||
secrets: any;
|
||||
accessToken: string;
|
||||
secretGroupID?: string;
|
||||
}) => {
|
||||
|
||||
const modifiedFormatForSecretInjection = {
|
||||
@ -1973,7 +1968,7 @@ const syncSecretsNorthflank = async ({
|
||||
}
|
||||
|
||||
await standardRequest.post(
|
||||
`${INTEGRATION_NORTHFLANK_API_URL}/v1/projects/${integration.appId}/secrets/${secretGroupID}`,
|
||||
`${INTEGRATION_NORTHFLANK_API_URL}/v1/projects/${integration.appId}/secrets/${integration.secretGroup}`,
|
||||
modifiedFormatForSecretInjection,
|
||||
{
|
||||
headers: {
|
||||
|
@ -37,6 +37,7 @@ export interface IIntegration {
|
||||
path: string;
|
||||
region: string;
|
||||
secretPath: string;
|
||||
secretGroup: string;
|
||||
integration:
|
||||
| "azure-key-vault"
|
||||
| "aws-parameter-store"
|
||||
@ -160,6 +161,10 @@ const integrationSchema = new Schema<IIntegration>(
|
||||
required: true,
|
||||
default: "/",
|
||||
},
|
||||
secretGroup: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
timestamps: true,
|
||||
|
@ -4,6 +4,7 @@ interface Props {
|
||||
integrationAuthId: string;
|
||||
isActive: boolean;
|
||||
secretPath: string;
|
||||
secretGroup: string;
|
||||
app: string | null;
|
||||
appId: string | null;
|
||||
sourceEnvironment: string;
|
||||
@ -34,7 +35,8 @@ const createIntegration = ({
|
||||
owner,
|
||||
path,
|
||||
region,
|
||||
secretPath
|
||||
secretPath,
|
||||
secretGroup
|
||||
}: Props) =>
|
||||
SecurityClient.fetchCall("/api/v1/integration", {
|
||||
method: "POST",
|
||||
@ -54,7 +56,8 @@ const createIntegration = ({
|
||||
owner,
|
||||
path,
|
||||
region,
|
||||
secretPath
|
||||
secretPath,
|
||||
secretGroup
|
||||
})
|
||||
}).then(async (res) => {
|
||||
if (res && res.status === 200) {
|
||||
|
@ -86,7 +86,8 @@ export default function NorthflankCreateIntegrationPage() {
|
||||
owner: null,
|
||||
path: null,
|
||||
region: null,
|
||||
secretPath
|
||||
secretPath,
|
||||
secretGroup: targetSecretGroup
|
||||
});
|
||||
|
||||
setIsLoading(false);
|
||||
|
Reference in New Issue
Block a user