diff --git a/web/packages/teleport/src/Discover/SelectResource/types.ts b/web/packages/teleport/src/Discover/SelectResource/types.ts index cce21de26d7f1..7abe35622f901 100644 --- a/web/packages/teleport/src/Discover/SelectResource/types.ts +++ b/web/packages/teleport/src/Discover/SelectResource/types.ts @@ -69,7 +69,8 @@ export enum KubeLocation { Aws, } -/** SamlServiceProviderPreset defines SAML service provider preset types. +/** + * SamlServiceProviderPreset defines SAML service provider preset types. * Used to define custom or pre-defined configuration flow. */ export enum SamlServiceProviderPreset { diff --git a/web/packages/teleport/src/services/apps/apps.test.ts b/web/packages/teleport/src/services/apps/apps.test.ts index f393341102201..c9a7148c4e483 100644 --- a/web/packages/teleport/src/services/apps/apps.test.ts +++ b/web/packages/teleport/src/services/apps/apps.test.ts @@ -110,6 +110,7 @@ test('correct formatting of apps fetch response', async () => { userGroups: [], samlApp: true, samlAppSsoUrl: 'http://localhost/enterprise/saml-idp/login/saml-app', + samlAppPreset: 'gcp-workforce', integration: '', }, ], @@ -168,6 +169,7 @@ const mockResponse = { name: 'saml-app', description: 'SAML Application', samlApp: true, + samlAppPreset: 'gcp-workforce', }, ], startKey: 'mockKey', diff --git a/web/packages/teleport/src/services/apps/makeApps.ts b/web/packages/teleport/src/services/apps/makeApps.ts index 6b220809bb2b9..069598c46fde9 100644 --- a/web/packages/teleport/src/services/apps/makeApps.ts +++ b/web/packages/teleport/src/services/apps/makeApps.ts @@ -36,6 +36,7 @@ export default function makeApp(json: any): App { friendlyName = '', requiresRequest, integration = '', + samlAppPreset, } = json; const canCreateUrl = fqdn && clusterId && publicAddr; @@ -84,6 +85,7 @@ export default function makeApp(json: any): App { friendlyName, userGroups, samlApp, + samlAppPreset, samlAppSsoUrl, requiresRequest, integration, diff --git a/web/packages/teleport/src/services/apps/types.ts b/web/packages/teleport/src/services/apps/types.ts index 8f020456fc7de..183aae8d1b044 100644 --- a/web/packages/teleport/src/services/apps/types.ts +++ b/web/packages/teleport/src/services/apps/types.ts @@ -20,6 +20,8 @@ import { AwsRole } from 'shared/services/apps'; import { ResourceLabel } from 'teleport/services/agents'; +import type { SamlServiceProviderPreset } from 'teleport/Discover/SelectResource/types'; + export interface App { kind: 'app'; id: string; @@ -44,6 +46,8 @@ export interface App { samlApp: boolean; // samlAppSsoUrl is the URL that triggers IdP-initiated SSO for SAML Application; samlAppSsoUrl?: string; + // samlAppPreset is used to identify SAML service provider preset type. + samlAppPreset?: SamlServiceProviderPreset; // Integration is the integration name that must be used to access this Application. // Only applicable to AWS App Access. integration?: string;