Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v16] Web: Process SAML IdP service provider preset value in Apps type #44128

Merged
merged 2 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion web/packages/teleport/src/Discover/SelectResource/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions web/packages/teleport/src/services/apps/apps.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '',
},
],
Expand Down Expand Up @@ -168,6 +169,7 @@ const mockResponse = {
name: 'saml-app',
description: 'SAML Application',
samlApp: true,
samlAppPreset: 'gcp-workforce',
},
],
startKey: 'mockKey',
Expand Down
2 changes: 2 additions & 0 deletions web/packages/teleport/src/services/apps/makeApps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export default function makeApp(json: any): App {
friendlyName = '',
requiresRequest,
integration = '',
samlAppPreset,
} = json;

const canCreateUrl = fqdn && clusterId && publicAddr;
Expand Down Expand Up @@ -84,6 +85,7 @@ export default function makeApp(json: any): App {
friendlyName,
userGroups,
samlApp,
samlAppPreset,
samlAppSsoUrl,
requiresRequest,
integration,
Expand Down
4 changes: 4 additions & 0 deletions web/packages/teleport/src/services/apps/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Loading