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

[v14] Add more "Enroll Integration" tiles for Machine ID (#34985) #35050

Merged
merged 2 commits into from Nov 29, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
224 changes: 134 additions & 90 deletions gen/proto/go/prehog/v1alpha/teleport.pb.go

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions gen/proto/js/prehog/v1alpha/teleport_pb.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions gen/proto/js/prehog/v1alpha/teleport_pb.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion proto/prehog/v1alpha/teleport.proto
Expand Up @@ -638,6 +638,9 @@ enum CTA {
CTA_TRUSTED_DEVICES = 5;
CTA_UPGRADE_BANNER = 6;
CTA_BILLING_SUMMARY = 7;
CTA_ACCESS_LIST = 8;
CTA_ACCESS_MONITORING = 9;
CTA_EXTERNAL_AUDIT_STORAGE = 10;
}

// a request forwarded to a kube cluster's API server (other than exec and
Expand Down Expand Up @@ -838,6 +841,11 @@ enum IntegrationEnrollKind {
INTEGRATION_ENROLL_KIND_MACHINE_ID_GITLAB = 15;
INTEGRATION_ENROLL_KIND_MACHINE_ID_JENKINS = 16;
INTEGRATION_ENROLL_KIND_MACHINE_ID_ANSIBLE = 17;
INTEGRATION_ENROLL_KIND_MACHINE_ID_AWS = 18;
INTEGRATION_ENROLL_KIND_MACHINE_ID_GCP = 19;
INTEGRATION_ENROLL_KIND_MACHINE_ID_AZURE = 20;
INTEGRATION_ENROLL_KIND_MACHINE_ID_SPACELIFT = 21;
INTEGRATION_ENROLL_KIND_MACHINE_ID_KUBERNETES = 22;
}

// IntegrationEnrollMetadata contains common metadata
Expand Down Expand Up @@ -1014,7 +1022,7 @@ message DesktopClipboardEvent {

// TAGExecuteQueryEvent is an event that is emitted
// when a single query is executed in the Teleport Access Graph.
// This event is emitted for both successful and failed queries and for
// This event is emitted for both successful and failed queries. For
// successful queries, the total number of nodes and edges is reported.
message TAGExecuteQueryEvent {
// anonymized
Expand Down
82 changes: 82 additions & 0 deletions web/packages/design/src/SVGIcon/Azure.tsx
@@ -0,0 +1,82 @@
/*
Copyright 2023 Gravitational, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

import React from 'react';

import { SVGIcon } from './SVGIcon';

import type { SVGIconProps } from './common';

export function AzureIcon({ size = 80, fill }: SVGIconProps) {
return (
<SVGIcon size={size} fill={fill} viewBox="0 0 72 72">
<path
fill="url(#a)"
d="M24.003 2.058h21.305l-22.117 65.53a3.397 3.397 0 0 1-3.218 2.312H3.392a3.392 3.392 0 0 1-3.214-4.476L20.784 4.369a3.398 3.398 0 0 1 3.219-2.311Z"
/>
<path
fill="#0078D4"
d="M54.962 46.012H21.177a1.564 1.564 0 0 0-1.068 2.707l21.71 20.263c.632.59 1.464.918 2.328.918h19.13l-8.315-23.888Z"
/>
<path
fill="url(#b)"
d="M24.002 2.058a3.37 3.37 0 0 0-3.226 2.356L.203 65.368A3.388 3.388 0 0 0 3.4 69.9H20.41a3.636 3.636 0 0 0 2.79-2.373l4.102-12.091 14.655 13.668a3.468 3.468 0 0 0 2.182.796h19.059l-8.36-23.888-24.367.006 14.914-43.96H24.002Z"
/>
<path
fill="url(#c)"
d="M51.216 4.366A3.392 3.392 0 0 0 48 2.058H24.258a3.393 3.393 0 0 1 3.214 2.308l20.607 61.057a3.392 3.392 0 0 1-3.215 4.477H68.61a3.392 3.392 0 0 0 3.213-4.477L51.216 4.366Z"
/>
<defs>
<linearGradient
id="a"
x1="31.768"
x2="9.642"
y1="7.085"
y2="72.452"
gradientUnits="userSpaceOnUse"
>
<stop stopColor="#114A8B" />
<stop offset="1" stopColor="#0669BC" />
</linearGradient>
<linearGradient
id="b"
x1="38.679"
x2="33.561"
y1="37.548"
y2="39.279"
gradientUnits="userSpaceOnUse"
>
<stop stopOpacity=".3" />
<stop offset=".071" stopOpacity=".2" />
<stop offset=".321" stopOpacity=".1" />
<stop offset=".623" stopOpacity=".05" />
<stop offset="1" stopOpacity="0" />
</linearGradient>
<linearGradient
id="c"
x1="35.865"
x2="60.153"
y1="5.179"
y2="69.887"
gradientUnits="userSpaceOnUse"
>
<stop stopColor="#3CCBF4" />
<stop offset="1" stopColor="#2892DF" />
</linearGradient>
</defs>
</SVGIcon>
);
}
51 changes: 51 additions & 0 deletions web/packages/design/src/SVGIcon/GCP.tsx
@@ -0,0 +1,51 @@
/*
Copyright 2023 Gravitational, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

import React from 'react';

import { SVGIcon } from './SVGIcon';

import type { SVGIconProps } from './common';

export function GCPIcon({ size = 80, fill }: SVGIconProps) {
return (
<SVGIcon viewBox="0 0 72 72" size={size} fill={fill}>
<g clipPath="url(#clip0_6706_29779)">
<path
d="M45.8438 22.7812L48.1062 22.8726L54.2602 16.7693L54.5625 14.0625C51.0371 10.9765 46.7766 8.94827 42.1835 7.94929C37.5904 6.95032 32.8164 7.1291 28.3123 8.46875C23.8083 9.8084 19.7229 12.2647 16.4422 15.6056C13.1615 18.9465 10.7937 23.0617 9.5625 27.5625C10.2481 27.2838 11.0075 27.2386 11.7218 27.434L24.0299 25.421C24.0299 25.421 24.4261 24.6858 24.75 24.75C27.3872 21.8775 31.2618 19.8207 35.1676 19.5261C39.0735 19.2315 42.7988 20.3373 45.8438 22.7812Z"
fill="#EA4335"
/>
<path
d="M63.0578 27.6963C61.6192 22.4255 58.6656 17.6871 54.5594 14.0625L45.8438 22.7812C47.6744 24.2695 49.0732 26.1729 50.0661 28.3075C51.0589 30.4422 51.5516 32.7733 51.507 35.125V36.6763C52.5336 36.6763 53.5502 36.8775 54.4987 37.2684C55.4471 37.6593 56.309 38.2323 57.0349 38.9545C57.7608 39.6768 58.3367 40.5343 58.7296 41.478C59.1224 42.4217 59.3246 43.4332 59.3246 44.4546C59.3246 45.4761 59.1224 46.4875 58.7296 47.4312C58.3367 48.3749 57.7608 49.2324 57.0349 49.9547C56.309 50.677 55.4471 51.2499 54.4987 51.6408C53.5502 52.0317 52.5336 52.2329 51.507 52.2329L35.7188 52.3125L34.3125 53.806V63.1356L35.7188 64.6869L51.507 64.6869C55.8731 64.7207 60.1342 63.3554 63.66 60.7929C67.1857 58.2304 69.7889 54.6068 71.0843 50.4582C72.3798 46.3095 72.2988 41.8562 70.8532 37.7569C69.4077 33.6577 66.6745 30.1302 63.0578 27.6963Z"
fill="#4285F4"
/>
<path
d="M20.2148 64.6872L35.7188 64.6875V52.3125L20.2148 52.1714C19.1009 52.1711 18.1695 51.9315 17.1562 51.4688L14.7907 52.1494L8.48827 58.4073L7.875 60.75C11.4093 63.4185 15.7861 64.7064 20.2148 64.6872Z"
fill="#34A853"
/>
<path
d="M20.2134 24.1032C15.9769 24.1285 11.8541 25.4762 8.4209 27.958C4.98766 30.4399 2.41538 33.932 1.06334 37.9466C-0.288692 41.9611 -0.352967 46.2977 0.879497 50.3506C2.11196 54.4035 4.51682 58.1676 7.875 60.7501L17.1562 51.4689C16.0037 50.9482 14.8457 50.1711 14.0668 49.1748C13.2879 48.1786 12.7624 47.0082 12.5353 45.7642C12.3082 44.5201 12.3864 43.2396 12.7631 42.0324C13.1398 40.8252 13.8037 39.7275 14.698 38.8333C15.5923 37.9391 16.6902 37.2752 17.8975 36.8985C19.1048 36.5219 20.3855 36.4437 21.6296 36.6708C22.8738 36.8978 24.0443 37.4233 25.0407 38.2021C26.037 38.9809 26.8296 39.9898 27.3503 41.1422L36.4197 32.0738C34.5161 29.5854 32.0627 27.5711 29.2512 26.1884C26.4398 24.8057 23.3465 24.092 20.2134 24.1032Z"
fill="#FBBC05"
/>
</g>
<defs>
<clipPath id="clip0_6706_29779">
<rect width="72" height="72" fill="white" />
</clipPath>
</defs>
</SVGIcon>
);
}
29 changes: 29 additions & 0 deletions web/packages/design/src/SVGIcon/Spacelift.tsx
@@ -0,0 +1,29 @@
/*
Copyright 2023 Gravitational, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

import React from 'react';

import { SVGIcon } from './SVGIcon';

import type { SVGIconProps } from './common';

export function SpaceliftIcon({ size = 80, fill }: SVGIconProps) {
return (
<SVGIcon viewBox="0 0 76.56 65.65" size={size} fill={fill}>
<path d="M60.79 27.92c9.98-3.34 16.27-7.29 15.74-10.52-.52-3.19-7.56-4.93-17.86-4.98-5.89-11.3-19.82-15.69-31.12-9.81a23.07 23.07 0 0 0-12.13 16.83C5.65 22.76-.49 26.65.03 29.85c.53 3.24 7.75 4.99 18.29 4.99 1.68 2.84 3.94 5.28 6.64 7.18a34.968 34.968 0 0 0-8.59 23.67h5.99a29.249 29.249 0 0 1 6.23-18.67c-.9 6.19-1.46 12.42-1.69 18.67h10.63s-1.95-8.06 1.22-8.07c3.18 0 1.22 8.07 1.22 8.07h10.64c-.21-5.9-.73-11.79-1.55-17.65 1.18.95 2.51 1.71 3.94 2.24 1.64.61 3.38.87 5.13.75 3.17-.24 6.11-1.78 8.09-4.27 2.24-2.67 3.69-6.42 4.31-11.14l-5.94-.78c-.82 6.24-3.33 9.96-6.89 10.22a7.81 7.81 0 0 1-6.24-3.04c4.76-3.36 8.09-8.39 9.31-14.09ZM1.51 29.61c-.16-1 1.6-3.56 9.23-6.79 1.39-.59 2.89-1.16 4.47-1.71-.17 1.9-.11 3.81.19 5.7 1.11 6.89 46.79-.16 45.62-7.38-.31-1.89-.86-3.74-1.63-5.5 11.02.14 15.42 2.27 15.66 3.71.16 1-1.6 3.56-9.24 6.79-6.83 2.89-16.16 5.39-26.26 7.03-7.01 1.18-14.11 1.8-21.22 1.87-11.9 0-16.58-2.23-16.82-3.73Z" />
</SVGIcon>
);
}
3 changes: 3 additions & 0 deletions web/packages/design/src/SVGIcon/index.ts
Expand Up @@ -22,6 +22,7 @@ export { ApplicationsIcon } from './Applications';
export { AuditLogIcon } from './AuditLog';
export { AuthConnectorsIcon } from './AuthConnectors';
export { AWSIcon } from './AWS';
export { AzureIcon } from './Azure';
export { BrainIcon } from './Brain';
export { ChatIcon } from './Chat';
export { CheckIcon } from './Check';
Expand All @@ -39,6 +40,7 @@ export { EditIcon } from './Edit';
export { ErrorIcon } from './Error';
export { ExpandIcon } from './Expand';
export { ExternalLinkIcon } from './ExternalLink';
export { GCPIcon } from './GCP';
export { GitHubIcon } from './GitHub';
export { GitLabIcon } from './GitLab';
export { IntegrationsIcon } from './Integrations';
Expand All @@ -63,6 +65,7 @@ export { SessionRecordingsIcon } from './SessionRecordings';
export { SettingsIcon } from './Settings';
export { ShieldAlertIcon } from './ShieldAlert';
export { SidebarIcon } from './Sidebar';
export { SpaceliftIcon } from './Spacelift';
export { SupportIcon } from './Support';
export { TeleportGearIcon } from './TeleportGearIcon';
export { TerminalIcon } from './Terminal';
Expand Down
Expand Up @@ -16,11 +16,16 @@

import {
AnsibleIcon,
AWSIcon,
AzureIcon,
CircleCIIcon,
GCPIcon,
GitHubIcon,
GitLabIcon,
JenkinsIcon,
KubernetesIcon,
ServersIcon,
SpaceliftIcon,
} from 'design/SVGIcon';
import { Box, Flex, Link as ExternalLink, Text } from 'design';
import React from 'react';
Expand All @@ -43,34 +48,64 @@ interface Integration {
const integrations: Integration[] = [
{
title: 'GitHub Actions',
link: 'https://goteleport.com/docs/machine-id/guides/github-actions/',
link: 'https://goteleport.com/docs/machine-id/deployment/github-actions/',
icon: <GitHubIcon size={80} />,
kind: IntegrationEnrollKind.MachineIDGitHubActions,
},
{
title: 'CircleCI',
link: 'https://goteleport.com/docs/machine-id/guides/circleci/',
link: 'https://goteleport.com/docs/machine-id/deployment/circleci/',
icon: <CircleCIIcon size={80} />,
kind: IntegrationEnrollKind.MachineIDCircleCI,
},
{
title: 'GitLab CI/CD',
link: 'https://goteleport.com/docs/machine-id/guides/gitlab/',
link: 'https://goteleport.com/docs/machine-id/deployment/gitlab/',
icon: <GitLabIcon size={80} />,
kind: IntegrationEnrollKind.MachineIDGitLab,
},
{
title: 'Jenkins',
link: 'https://goteleport.com/docs/machine-id/guides/jenkins/',
link: 'https://goteleport.com/docs/machine-id/deployment/jenkins/',
icon: <JenkinsIcon size={80} />,
kind: IntegrationEnrollKind.MachineIDJenkins,
},
{
title: 'Ansible',
link: 'https://goteleport.com/docs/machine-id/guides/ansible/',
link: 'https://goteleport.com/docs/machine-id/access-guides/ansible/',
icon: <AnsibleIcon size={80} />,
kind: IntegrationEnrollKind.MachineIDAnsible,
},
{
title: 'Spacelift',
link: 'https://goteleport.com/docs/machine-id/deployment/spacelift/',
icon: <SpaceliftIcon size={80} />,
kind: IntegrationEnrollKind.MachineIDSpacelift,
},
{
title: 'AWS',
link: 'https://goteleport.com/docs/machine-id/deployment/aws/',
icon: <AWSIcon size={80} />,
kind: IntegrationEnrollKind.MachineIDAWS,
},
{
title: 'GCP',
link: 'https://goteleport.com/docs/machine-id/deployment/gcp/',
icon: <GCPIcon size={80} />,
kind: IntegrationEnrollKind.MachineIDGCP,
},
{
title: 'Azure',
link: 'https://goteleport.com/docs/machine-id/deployment/azure/',
icon: <AzureIcon size={80} />,
kind: IntegrationEnrollKind.MachineIDAzure,
},
{
title: 'Kubernetes',
link: 'https://goteleport.com/docs/machine-id/deployment/kubernetes/',
icon: <KubernetesIcon size={80} />,
kind: IntegrationEnrollKind.MachineIDKubernetes,
},
{
title: 'Generic',
link: 'https://goteleport.com/docs/machine-id/getting-started/',
Expand Down
5 changes: 5 additions & 0 deletions web/packages/teleport/src/services/userEvent/types.ts
Expand Up @@ -67,6 +67,11 @@ export enum IntegrationEnrollKind {
MachineIDGitLab = 'INTEGRATION_ENROLL_KIND_MACHINE_ID_GITLAB',
MachineIDJenkins = 'INTEGRATION_ENROLL_KIND_MACHINE_ID_JENKINS',
MachineIDAnsible = 'INTEGRATION_ENROLL_KIND_MACHINE_ID_ANSIBLE',
MachineIDAWS = 'INTEGRATION_ENROLL_KIND_MACHINE_ID_AWS',
MachineIDGCP = 'INTEGRATION_ENROLL_KIND_MACHINE_ID_GCP',
MachineIDAzure = 'INTEGRATION_ENROLL_KIND_MACHINE_ID_AZURE',
MachineIDSpacelift = 'INTEGRATION_ENROLL_KIND_MACHINE_ID_SPACELIFT',
MachineIDKubernetes = 'INTEGRATION_ENROLL_KIND_MACHINE_ID_KUBERNETES',
}

export enum DiscoverEvent {
Expand Down