diff --git a/backend/src/ee/services/license/license-fns.ts b/backend/src/ee/services/license/license-fns.ts index bd3949a7e..6620e14d4 100644 --- a/backend/src/ee/services/license/license-fns.ts +++ b/backend/src/ee/services/license/license-fns.ts @@ -18,50 +18,50 @@ export const getDefaultOnPremFeatures = (): TFeatureSet => ({ environmentsUsed: 0, identityLimit: null, identitiesUsed: 0, - dynamicSecret: false, + dynamicSecret: true, secretVersioning: true, - pitRecovery: false, - ipAllowlisting: false, - rbac: false, - githubOrgSync: false, - customRateLimits: false, - customAlerts: false, - secretAccessInsights: false, - auditLogs: false, + pitRecovery: true, + ipAllowlisting: true, + rbac: true, + githubOrgSync: true, + customRateLimits: true, + customAlerts: true, + secretAccessInsights: true, + auditLogs: true, auditLogsRetentionDays: 0, - auditLogStreams: false, + auditLogStreams: true, auditLogStreamLimit: 3, - samlSSO: false, - hsm: false, - oidcSSO: false, - scim: false, - ldap: false, - groups: false, + samlSSO: true, + hsm: true, + oidcSSO: true, + scim: true, + ldap: true, + groups: true, status: null, trial_end: null, has_used_trial: true, - secretApproval: false, - secretRotation: false, - caCrl: false, - instanceUserManagement: false, - externalKms: false, + secretApproval: true, + secretRotation: true, + caCrl: true, + instanceUserManagement: true, + externalKms: true, rateLimits: { readLimit: 60, writeLimit: 200, secretsLimit: 40 }, - pkiEst: false, - enforceMfa: false, - projectTemplates: false, - kmip: false, - gateway: false, - sshHostGroups: false, - secretScanning: false, - enterpriseSecretSyncs: false, - enterpriseAppConnections: false, - fips: false, - eventSubscriptions: false, - machineIdentityAuthTemplates: false + pkiEst: true, + enforceMfa: true, + projectTemplates: true, + kmip: true, + gateway: true, + sshHostGroups: true, + secretScanning: true, + enterpriseSecretSyncs: true, + enterpriseAppConnections: true, + fips: true, + eventSubscriptions: true, + machineIdentityAuthTemplates: true }); export const setupLicenseRequestWithStore = ( diff --git a/backend/src/server/routes/v1/identity-router.ts b/backend/src/server/routes/v1/identity-router.ts index c0578fc0a..82ab82637 100644 --- a/backend/src/server/routes/v1/identity-router.ts +++ b/backend/src/server/routes/v1/identity-router.ts @@ -478,4 +478,27 @@ export const registerIdentityRouter = async (server: FastifyZodProvider) => { return { identityMemberships }; } }); + + server.route({ + method: "GET", + url: "/details", + config: { + rateLimit: readLimit + }, + schema: { + response: { + 200: z.object({ + id: z.string(), + name: z.string(), + slug: z.string(), + role: z.string() + }) + } + }, + onRequest: verifyAuth([AuthMode.IDENTITY_ACCESS_TOKEN], { requireOrg: false }), + handler: async (req) => { + const organization = await server.services.org.findIdentityOrganization(req.permission.id); + return organization; + } + }); }; diff --git a/backend/src/server/routes/v1/organization-router.ts b/backend/src/server/routes/v1/organization-router.ts index dfd87fa11..323354bc1 100644 --- a/backend/src/server/routes/v1/organization-router.ts +++ b/backend/src/server/routes/v1/organization-router.ts @@ -29,30 +29,18 @@ export const registerOrgRouter = async (server: FastifyZodProvider) => { }, schema: { response: { - 200: z.union([ - z.object({ - id: z.string(), - name: z.string(), - slug: z.string(), - role: z.string() - }), - z.object({ - organizations: sanitizedOrganizationSchema - .extend({ - orgAuthMethod: z.string(), - userRole: z.string() - }) - .array() - }) - ]) + 200: z.object({ + organizations: sanitizedOrganizationSchema + .extend({ + orgAuthMethod: z.string(), + userRole: z.string() + }) + .array() + }) } }, - onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN], { requireOrg: false }), + onRequest: verifyAuth([AuthMode.JWT], { requireOrg: false }), handler: async (req) => { - if (req.permission.type === ActorType.IDENTITY) { - const organization = await server.services.org.findIdentityOrganization(req.permission.id); - return organization; - } const organizations = await server.services.org.findAllOrganizationOfUser(req.permission.id); return { organizations }; }