diff --git a/app/scripts/modules/google/src/help/gce.help.ts b/app/scripts/modules/google/src/help/gce.help.ts index 6d5730ffc08..7ceb00602ff 100644 --- a/app/scripts/modules/google/src/help/gce.help.ts +++ b/app/scripts/modules/google/src/help/gce.help.ts @@ -77,6 +77,10 @@ const helpContents: { [key: string]: string } = { 'gce.securityGroup.sourceTags': 'Traffic is only allowed from sources that match one of these tags, or one of the source CIDR ranges below.', 'gce.securityGroup.targetTags': 'Traffic is only allowed if the target instance has one of these tags.', + 'gce.securityGroup.targetServiceAccounts': + 'Traffic is allowed if the target instance has one of these service accounts.', + 'gce.securityGroup.sourceServiceAccounts': + 'Traffic is allowed if the source instance has one of these service accounts.', 'gce.serverGroup.associatePublicIpAddress.providerField': 'Check if new GCE server groups in this application should be assigned a public IP address by default.', 'gce.serverGroup.resizeWithAutoscalingPolicy': ` diff --git a/app/scripts/modules/google/src/securityGroup/details/securityGroupDetail.controller.js b/app/scripts/modules/google/src/securityGroup/details/securityGroupDetail.controller.js index 5aa10764078..8808955a03e 100644 --- a/app/scripts/modules/google/src/securityGroup/details/securityGroupDetail.controller.js +++ b/app/scripts/modules/google/src/securityGroup/details/securityGroupDetail.controller.js @@ -89,6 +89,20 @@ module.exports = angular $scope.securityGroup.sourceTags = sourceTags.substring(1, sourceTags.length - 1).split(', '); } + // These come back from the global firewall endpoint as '[account-a@project.iam.gserviceaccount.com, account-b@project.iam.gserviceaccount.com]' + if (typeof $scope.securityGroup.targetServiceAccounts === 'string') { + let targetServiceAccounts = $scope.securityGroup.targetServiceAccounts; + $scope.securityGroup.targetServiceAccounts = targetServiceAccounts + .substring(1, targetServiceAccounts.length - 1) + .split(', '); + } + if (typeof $scope.securityGroup.sourceServiceAccounts === 'string') { + let sourceServiceAccounts = $scope.securityGroup.sourceServiceAccounts; + $scope.securityGroup.sourceServiceAccounts = sourceServiceAccounts + .substring(1, sourceServiceAccounts.length - 1) + .split(', '); + } + $scope.securityGroup.sourceRanges = _.chain($scope.securityGroup.ipRangeRules) .map(rule => { return rule.range.ip && rule.range.cidr ? rule.range.ip + rule.range.cidr : null; diff --git a/app/scripts/modules/google/src/securityGroup/details/securityGroupDetail.html b/app/scripts/modules/google/src/securityGroup/details/securityGroupDetail.html index 17d435f0218..63d0a66cb73 100644 --- a/app/scripts/modules/google/src/securityGroup/details/securityGroupDetail.html +++ b/app/scripts/modules/google/src/securityGroup/details/securityGroupDetail.html @@ -144,6 +144,22 @@

None
+ + +
None
+
+ + +
None
+