From a6d330e4ef8d0125e47912578c55e71eeb98316f Mon Sep 17 00:00:00 2001 From: Evan Freed Date: Tue, 21 Nov 2023 16:35:14 -0600 Subject: [PATCH 1/3] fix enrolling new resource by adding missing read verb Signed-off-by: Evan Freed --- .../teleport/src/Discover/yamlTemplates/integrationRWE.yaml | 3 ++- .../src/Discover/yamlTemplates/integrationRWEAndDbCU.yaml | 1 + .../src/Discover/yamlTemplates/integrationRWEAndNodeRWE.yaml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/web/packages/teleport/src/Discover/yamlTemplates/integrationRWE.yaml b/web/packages/teleport/src/Discover/yamlTemplates/integrationRWE.yaml index 7c99f58c66659..a05c5b129cb5a 100644 --- a/web/packages/teleport/src/Discover/yamlTemplates/integrationRWE.yaml +++ b/web/packages/teleport/src/Discover/yamlTemplates/integrationRWE.yaml @@ -7,4 +7,5 @@ spec: verbs: - list - create - - use \ No newline at end of file + - use + - read diff --git a/web/packages/teleport/src/Discover/yamlTemplates/integrationRWEAndDbCU.yaml b/web/packages/teleport/src/Discover/yamlTemplates/integrationRWEAndDbCU.yaml index 61e643f3ae6cd..056954cccb2c9 100644 --- a/web/packages/teleport/src/Discover/yamlTemplates/integrationRWEAndDbCU.yaml +++ b/web/packages/teleport/src/Discover/yamlTemplates/integrationRWEAndDbCU.yaml @@ -8,6 +8,7 @@ spec: - list - create - use + - read - resources: - db verbs: diff --git a/web/packages/teleport/src/Discover/yamlTemplates/integrationRWEAndNodeRWE.yaml b/web/packages/teleport/src/Discover/yamlTemplates/integrationRWEAndNodeRWE.yaml index 376923730e645..62fbed76266bc 100644 --- a/web/packages/teleport/src/Discover/yamlTemplates/integrationRWEAndNodeRWE.yaml +++ b/web/packages/teleport/src/Discover/yamlTemplates/integrationRWEAndNodeRWE.yaml @@ -8,6 +8,7 @@ spec: - list - create - use + - read - resources: - node verbs: From 77a406869ebfc7e9e250cb2215609eb10a52d7b8 Mon Sep 17 00:00:00 2001 From: Evan Freed Date: Sun, 26 Nov 2023 19:34:18 -0600 Subject: [PATCH 2/3] add to list Signed-off-by: Evan Freed --- .../teleport/src/Discover/Shared/AwsAccount/AwsAccount.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/packages/teleport/src/Discover/Shared/AwsAccount/AwsAccount.tsx b/web/packages/teleport/src/Discover/Shared/AwsAccount/AwsAccount.tsx index 388c52cc3a0bf..c1a9b0da6017f 100644 --- a/web/packages/teleport/src/Discover/Shared/AwsAccount/AwsAccount.tsx +++ b/web/packages/teleport/src/Discover/Shared/AwsAccount/AwsAccount.tsx @@ -73,7 +73,7 @@ export function AwsAccount() { let roleTemplate = integrationRWE; let hasAccess = - integrationAccess.create && integrationAccess.list && integrationAccess.use; + integrationAccess.create && integrationAccess.list && integrationAccess.use && integrationAccess.read; // Ensure required permissions based on which flow this is in. if (viewConfig.kind === ResourceKind.Database) { From d6a0d445d78cec8f3a8f4b21a3fb1ce3d1160dc7 Mon Sep 17 00:00:00 2001 From: Evan Freed Date: Sun, 26 Nov 2023 20:07:43 -0600 Subject: [PATCH 3/3] lint Signed-off-by: Evan Freed --- .../teleport/src/Discover/Shared/AwsAccount/AwsAccount.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/packages/teleport/src/Discover/Shared/AwsAccount/AwsAccount.tsx b/web/packages/teleport/src/Discover/Shared/AwsAccount/AwsAccount.tsx index c1a9b0da6017f..7f79de95cb989 100644 --- a/web/packages/teleport/src/Discover/Shared/AwsAccount/AwsAccount.tsx +++ b/web/packages/teleport/src/Discover/Shared/AwsAccount/AwsAccount.tsx @@ -73,7 +73,10 @@ export function AwsAccount() { let roleTemplate = integrationRWE; let hasAccess = - integrationAccess.create && integrationAccess.list && integrationAccess.use && integrationAccess.read; + integrationAccess.create && + integrationAccess.list && + integrationAccess.use && + integrationAccess.read; // Ensure required permissions based on which flow this is in. if (viewConfig.kind === ResourceKind.Database) {