mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-05 10:26:35 +00:00
fix: further cleanup
This commit is contained in:
@@ -3,34 +3,34 @@ import { Knex } from "knex";
|
|||||||
import { TableName } from "../schemas";
|
import { TableName } from "../schemas";
|
||||||
import { createOnUpdateTrigger, dropOnUpdateTrigger } from "../utils";
|
import { createOnUpdateTrigger, dropOnUpdateTrigger } from "../utils";
|
||||||
|
|
||||||
const encryptedMicrosoftTeamsAppIdColumn = "encryptedMicrosoftTeamsAppId";
|
|
||||||
const encryptedMicrosoftTeamsClientSecretColumn = "encryptedMicrosoftTeamsClientSecret";
|
|
||||||
const encryptedMicrosoftTeamsBotIdColumn = "encryptedMicrosoftTeamsBotId";
|
|
||||||
|
|
||||||
export async function up(knex: Knex): Promise<void> {
|
export async function up(knex: Knex): Promise<void> {
|
||||||
const superAdminHasEncryptedMicrosoftTeamsClientIdColumn = await knex.schema.hasColumn(
|
const superAdminHasEncryptedMicrosoftTeamsClientIdColumn = await knex.schema.hasColumn(
|
||||||
TableName.SuperAdmin,
|
TableName.SuperAdmin,
|
||||||
encryptedMicrosoftTeamsAppIdColumn
|
"encryptedMicrosoftTeamsAppId"
|
||||||
);
|
);
|
||||||
const superAdminHasEncryptedMicrosoftTeamsClientSecretColumn = await knex.schema.hasColumn(
|
const superAdminHasEncryptedMicrosoftTeamsClientSecret = await knex.schema.hasColumn(
|
||||||
TableName.SuperAdmin,
|
TableName.SuperAdmin,
|
||||||
encryptedMicrosoftTeamsClientSecretColumn
|
"encryptedMicrosoftTeamsClientSecret"
|
||||||
);
|
);
|
||||||
const superAdminHasEncryptedMicrosoftTeamsBotIdColumn = await knex.schema.hasColumn(
|
const superAdminHasEncryptedMicrosoftTeamsBotId = await knex.schema.hasColumn(
|
||||||
TableName.SuperAdmin,
|
TableName.SuperAdmin,
|
||||||
encryptedMicrosoftTeamsBotIdColumn
|
"encryptedMicrosoftTeamsBotId"
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!superAdminHasEncryptedMicrosoftTeamsClientIdColumn || !superAdminHasEncryptedMicrosoftTeamsClientSecretColumn) {
|
if (
|
||||||
|
!superAdminHasEncryptedMicrosoftTeamsClientIdColumn ||
|
||||||
|
!superAdminHasEncryptedMicrosoftTeamsClientSecret ||
|
||||||
|
!superAdminHasEncryptedMicrosoftTeamsBotId
|
||||||
|
) {
|
||||||
await knex.schema.alterTable(TableName.SuperAdmin, (table) => {
|
await knex.schema.alterTable(TableName.SuperAdmin, (table) => {
|
||||||
if (!superAdminHasEncryptedMicrosoftTeamsClientIdColumn) {
|
if (!superAdminHasEncryptedMicrosoftTeamsClientIdColumn) {
|
||||||
table.binary(encryptedMicrosoftTeamsAppIdColumn).nullable();
|
table.binary("encryptedMicrosoftTeamsAppId").nullable();
|
||||||
}
|
}
|
||||||
if (!superAdminHasEncryptedMicrosoftTeamsClientSecretColumn) {
|
if (!superAdminHasEncryptedMicrosoftTeamsClientSecret) {
|
||||||
table.binary(encryptedMicrosoftTeamsClientSecretColumn).nullable();
|
table.binary("encryptedMicrosoftTeamsClientSecret").nullable();
|
||||||
}
|
}
|
||||||
if (!superAdminHasEncryptedMicrosoftTeamsBotIdColumn) {
|
if (!superAdminHasEncryptedMicrosoftTeamsBotId) {
|
||||||
table.binary(encryptedMicrosoftTeamsBotIdColumn).nullable();
|
table.binary("encryptedMicrosoftTeamsBotId").nullable();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -82,27 +82,31 @@ export async function up(knex: Knex): Promise<void> {
|
|||||||
export async function down(knex: Knex): Promise<void> {
|
export async function down(knex: Knex): Promise<void> {
|
||||||
const hasEncryptedMicrosoftTeamsClientIdColumn = await knex.schema.hasColumn(
|
const hasEncryptedMicrosoftTeamsClientIdColumn = await knex.schema.hasColumn(
|
||||||
TableName.SuperAdmin,
|
TableName.SuperAdmin,
|
||||||
encryptedMicrosoftTeamsAppIdColumn
|
"encryptedMicrosoftTeamsAppId"
|
||||||
);
|
);
|
||||||
const hasEncryptedMicrosoftTeamsClientSecretColumn = await knex.schema.hasColumn(
|
const hasEncryptedMicrosoftTeamsClientSecret = await knex.schema.hasColumn(
|
||||||
TableName.SuperAdmin,
|
TableName.SuperAdmin,
|
||||||
encryptedMicrosoftTeamsClientSecretColumn
|
"encryptedMicrosoftTeamsClientSecret"
|
||||||
);
|
);
|
||||||
const hasEncryptedMicrosoftTeamsBotIdColumn = await knex.schema.hasColumn(
|
const hasEncryptedMicrosoftTeamsBotId = await knex.schema.hasColumn(
|
||||||
TableName.SuperAdmin,
|
TableName.SuperAdmin,
|
||||||
encryptedMicrosoftTeamsBotIdColumn
|
"encryptedMicrosoftTeamsBotId"
|
||||||
);
|
);
|
||||||
|
|
||||||
if (hasEncryptedMicrosoftTeamsClientIdColumn || hasEncryptedMicrosoftTeamsClientSecretColumn) {
|
if (
|
||||||
|
hasEncryptedMicrosoftTeamsClientIdColumn ||
|
||||||
|
hasEncryptedMicrosoftTeamsClientSecret ||
|
||||||
|
hasEncryptedMicrosoftTeamsBotId
|
||||||
|
) {
|
||||||
await knex.schema.alterTable(TableName.SuperAdmin, (table) => {
|
await knex.schema.alterTable(TableName.SuperAdmin, (table) => {
|
||||||
if (hasEncryptedMicrosoftTeamsClientIdColumn) {
|
if (hasEncryptedMicrosoftTeamsClientIdColumn) {
|
||||||
table.dropColumn(encryptedMicrosoftTeamsAppIdColumn);
|
table.dropColumn("encryptedMicrosoftTeamsAppId");
|
||||||
}
|
}
|
||||||
if (hasEncryptedMicrosoftTeamsClientSecretColumn) {
|
if (hasEncryptedMicrosoftTeamsClientSecret) {
|
||||||
table.dropColumn(encryptedMicrosoftTeamsClientSecretColumn);
|
table.dropColumn("encryptedMicrosoftTeamsClientSecret");
|
||||||
}
|
}
|
||||||
if (hasEncryptedMicrosoftTeamsBotIdColumn) {
|
if (hasEncryptedMicrosoftTeamsBotId) {
|
||||||
table.dropColumn(encryptedMicrosoftTeamsBotIdColumn);
|
table.dropColumn("encryptedMicrosoftTeamsBotId");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export const getDefaultOnPremFeatures = (): TFeatureSet => ({
|
|||||||
auditLogsRetentionDays: 0,
|
auditLogsRetentionDays: 0,
|
||||||
auditLogStreams: false,
|
auditLogStreams: false,
|
||||||
auditLogStreamLimit: 3,
|
auditLogStreamLimit: 3,
|
||||||
samlSSO: true,
|
samlSSO: false,
|
||||||
hsm: false,
|
hsm: false,
|
||||||
oidcSSO: false,
|
oidcSSO: false,
|
||||||
scim: false,
|
scim: false,
|
||||||
@@ -38,7 +38,7 @@ export const getDefaultOnPremFeatures = (): TFeatureSet => ({
|
|||||||
status: null,
|
status: null,
|
||||||
trial_end: null,
|
trial_end: null,
|
||||||
has_used_trial: true,
|
has_used_trial: true,
|
||||||
secretApproval: true,
|
secretApproval: false,
|
||||||
secretRotation: false,
|
secretRotation: false,
|
||||||
caCrl: false,
|
caCrl: false,
|
||||||
instanceUserManagement: false,
|
instanceUserManagement: false,
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ export const injectIdentity = fp(async (server: FastifyZodProvider) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Authentication is handled on a route-level here.
|
||||||
if (req.url.includes("/api/v1/workflow-integrations/microsoft-teams/message-endpoint")) {
|
if (req.url.includes("/api/v1/workflow-integrations/microsoft-teams/message-endpoint")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,7 @@ export enum WorkflowIntegration {
|
|||||||
|
|
||||||
export enum WorkflowIntegrationStatus {
|
export enum WorkflowIntegrationStatus {
|
||||||
PENDING = "pending",
|
PENDING = "pending",
|
||||||
INSTALLED = "installed",
|
INSTALLED = "installed"
|
||||||
FAILED = "failed"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TGetWorkflowIntegrationsByOrg = Omit<TOrgPermission, "orgId">;
|
export type TGetWorkflowIntegrationsByOrg = Omit<TOrgPermission, "orgId">;
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.11/MicrosoftTeams.schema.json",
|
|
||||||
"manifestVersion": "1.11",
|
|
||||||
"id": "78c44cc5-275f-468d-862d-4191485e5267",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"name": {
|
|
||||||
"short": "Infisical",
|
|
||||||
"full": "Infisical"
|
|
||||||
},
|
|
||||||
"description": {
|
|
||||||
"short": "Infisical",
|
|
||||||
"full": "Infisical"
|
|
||||||
},
|
|
||||||
"icons": {
|
|
||||||
"outline": "outline.png",
|
|
||||||
"color": "color.png"
|
|
||||||
},
|
|
||||||
"accentColor": "#FFFFFF",
|
|
||||||
"developer": {
|
|
||||||
"name": "Infisical Inc.",
|
|
||||||
"websiteUrl": "https://infisical.com",
|
|
||||||
"privacyUrl": "https://infisical.com/privacy",
|
|
||||||
"termsOfUseUrl": "https://infisical.com/terms"
|
|
||||||
},
|
|
||||||
"webApplicationInfo": {
|
|
||||||
"id": "78c44cc5-275f-468d-862d-4191485e5267",
|
|
||||||
"resource": "api://78c44cc5-275f-468d-862d-4191485e5267"
|
|
||||||
},
|
|
||||||
"bots": [
|
|
||||||
{
|
|
||||||
"botId": "78c44cc5-275f-468d-862d-4191485e5267",
|
|
||||||
"scopes": ["team", "personal"],
|
|
||||||
"isNotificationOnly": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"validDomains": [
|
|
||||||
"*.infisical.com",
|
|
||||||
"*danielinfisical.onmicrosoft.com"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user