Skip to content

Commit

Permalink
Merge pull request #1956 from opengovern/fix-web-ui
Browse files Browse the repository at this point in the history
fix: update ui specs
  • Loading branch information
artaasadi authored Nov 12, 2024
2 parents a5b7eb7 + 4d19b1a commit 824f789
Show file tree
Hide file tree
Showing 5 changed files with 769 additions and 720 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func (i *AwsCloudAccountIntegration) GetConfiguration() interfaces.IntegrationCo
NatsManualJobsTopic: awsDescriberLocal.JobQueueTopicManuals,
NatsStreamName: awsDescriberLocal.StreamName,

UISpecFileName: "aws-cloud.json",
UISpecFileName: "aws-cloud-account.json",
}
}

Expand Down
381 changes: 381 additions & 0 deletions services/integration/integration-type/ui-specs/aws-cloud-account.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,381 @@
{
"integration_type_id": "aws_cloud_account",
"integration_name": "AWS Cloud Account",
"help_text_md": "AWS Cloud Account integration facilitates secure connections to your AWS resources. [Documentation](https://docs.aws.amazon.com).",
"platform_documentation": "https://docs.aws.amazon.com",
"provider_documentation": "https://aws.amazon.com",
"icon": "aws.svg",
"discover": {
"credentials": [
{
"type": "aws_single_account",
"label": "AWS Single Account",
"priority": 1,
"fields": [
{
"name": "aws_access_key_id",
"label": "AWS Access Key ID",
"inputType": "text",
"required": true,
"order": 1,
"validation": {
"pattern": "^[A-Z0-9]{20}$",
"errorMessage": "AWS Access Key ID must be a 20-character uppercase alphanumeric string."
},
"info": "Your AWS Access Key ID.",
"external_help_url": "https://docs.aws.amazon.com/access-key-id"
},
{
"name": "aws_secret_access_key",
"label": "AWS Secret Access Key",
"inputType": "password",
"required": true,
"order": 2,
"validation": {
"pattern": "^.{40}$",
"errorMessage": "AWS Secret Access Key must be a 40-character string."
},
"info": "Your AWS Secret Access Key.",
"external_help_url": "https://docs.aws.amazon.com/secret-access-key"
}
]
},
{
"type": "aws_multi_account",
"label": "AWS Multi-Account",
"priority": 2,
"fields": [
{
"name": "aws_access_key_id",
"label": "AWS Access Key ID",
"inputType": "text",
"required": true,
"order": 1,
"validation": {
"pattern": "^[A-Z0-9]{20}$",
"errorMessage": "AWS Access Key ID must be a 20-character uppercase alphanumeric string."
},
"info": "Your AWS Access Key ID.",
"external_help_url": "https://docs.aws.amazon.com/access-key-id"
},
{
"name": "aws_secret_access_key",
"label": "AWS Secret Access Key",
"inputType": "password",
"required": true,
"order": 2,
"validation": {
"pattern": "^.{40}$",
"errorMessage": "AWS Secret Access Key must be a 40-character string."
},
"info": "Your AWS Secret Access Key.",
"external_help_url": "https://docs.aws.amazon.com/secret-access-key"
},
{
"name": "cross_account_role_name",
"label": "Cross-Account Role Name",
"inputType": "text",
"required": true,
"default": "OpenGovernanceRoles",
"order": 3,
"validation": {
"pattern": "^[\\w+=,.@-]{1,64}$",
"errorMessage": "Cross-Account Role Name must be 1-64 characters long and can include letters, numbers, and the following characters: +=,.@-"
},
"info": "Name of the cross-account role (e.g., OpenGovernanceRoles).",
"external_help_url": "https://docs.aws.amazon.com/cross-account-role"
},
{
"name": "role_to_assume_in_main_account",
"label": "Role to Assume in Main Account",
"inputType": "text",
"required": false,
"default": "OpenGovernanceRoles",
"order": 4,
"validation": {
"pattern": "^[\\w+=,.@-]{1,64}$",
"errorMessage": "Role to Assume in Main Account must be 1-64 characters long and can include letters, numbers, and the following characters: +=,.@-"
},
"info": "Name of the role to assume in the main account (e.g., OpenGovernanceRoles).",
"external_help_url": "https://docs.aws.amazon.com/role-to-assume"
},
{
"name": "external_id",
"label": "External ID",
"inputType": "text",
"required": false,
"order": 5,
"validation": {
"pattern": "^[a-zA-Z0-9-_]{1,100}$",
"errorMessage": "External ID must be 1-100 characters long and can include letters, numbers, hyphens, and underscores."
},
"info": "External ID for enhanced security.",
"external_help_url": "https://docs.aws.amazon.com/external-id"
}
]
}
],
"integrations": [
{
"label": "AWS Cloud Account",
"type": "aws_cloud_account",
"fields": [
{
"name": "uuid",
"label": "Integration UUID",
"fieldType": "text",
"required": true,
"order": 1,
"info": "Unique identifier (UUID) for the integration."
},
{
"name": "account_id",
"label": "AWS Account ID",
"fieldType": "text",
"required": true,
"order": 2,
"info": "Unique identifier for the AWS account."
},
{
"name": "account_name",
"label": "Account Name",
"fieldType": "text",
"required": true,
"order": 3,
"info": "Name of the AWS account."
},
{
"name": "region",
"label": "Region",
"fieldType": "text",
"required": true,
"order": 4,
"info": "AWS region associated with the account."
},
{
"name": "credential_type",
"label": "Credential Type",
"fieldType": "text",
"required": true,
"order": 5,
"info": "Type of Credential used (Single Account/Multi-Account).",
"valueMap": {
"aws_single_account": "Single Account",
"aws_multi_account": "Multi-Account"
}
},
{
"name": "state",
"label": "State",
"fieldType": "status",
"required": true,
"order": 6,
"info": "Current state of the AWS Cloud Account integration.",
"statusOptions": [
{
"value": "ACTIVE",
"label": "Active",
"color": "green"
},
{
"value": "INACTIVE",
"label": "Inactive",
"color": "red"
},
{
"value": "ARCHIVED",
"label": "Pending",
"color": "blue"
}
]
},
{
"name": "created_at",
"label": "Created At",
"fieldType": "date",
"required": true,
"order": 7,
"info": "Timestamp when the integration was created."
},
{
"name": "last_updated",
"label": "Last Updated",
"fieldType": "date",
"required": true,
"order": 8,
"info": "Timestamp when the integration was last updated."
},
{
"name": "additional_notes",
"label": "Additional Notes",
"fieldType": "textarea",
"required": false,
"order": 9,
"info": "Any additional information about the integration."
}
]
}
]
},
"render": {
"credentials": {
"defaultPageSize": 10,
"fields": [
{
"name": "id",
"label": "ID",
"fieldType": "text",
"order": 1,
"sortable": true,
"filterable": true,
"info": "ID.",
"detail": false,
"detail_order": 1
},
{
"name": "created_at",
"label": "Created At",
"fieldType": "date",
"order": 2,
"sortable": true,
"filterable": true,
"info": "Timestamp when the integration was created.",
"detail": false,
"detail_order": 2
},
{
"name": "updated_at",
"label": "Updated At",
"fieldType": "date",
"order": 3,
"sortable": true,
"filterable": true,
"info": "Timestamp when the integration was last updated.",
"detail": false,
"detail_order": 3
},
{
"name": "credential_type",
"label": "Credential Type",
"fieldType": "text",
"required": true,
"order": 4,
"info": "Type of Credential used (Single Account/Multi-Account).",
"valueMap": {
"aws_single_account": "Single Account",
"aws_multi_account": "Multi-Account"
},
"detail": false,
"detail_order": 3
}
]
},
"integrations": {
"defaultPageSize": 15,
"fields": [
{
"name": "name",
"label": "Name",
"fieldType": "text",
"order": 1,
"sortable": true,
"filterable": true,
"info": "Name.",
"detail": false,
"detail_order": 1
},

{
"name": "provider_id",
"label": "Provider ID",
"fieldType": "text",
"order": 2,
"sortable": true,
"filterable": true,
"info": "Provider ID.",
"detail": false,
"detail_order": 2
},
{
"name": "state",
"label": "State",
"fieldType": "status",
"order": 3,
"sortable": true,
"filterable": true,
"detail": false,
"detail_order": 3,
"info": "Current state of the Azure Subscription integration.",
"statusOptions": [
{
"value": "ACTIVE",
"label": "Active",
"color": "green"
},
{
"value": "INACTIVE",
"label": "Inactive",
"color": "red"
},
{
"value": "ARCHIVED",
"label": "Pending",
"color": "blue"
}
]
}
]
}
},
"actions": {
"credentials": [
{
"type": "view",
"label": "View"
},
{
"type": "update",
"label": "Update",
"editableFields": [
"aws_access_key_id",
"aws_secret_access_key",
"cross_account_role_name",
"role_to_assume_in_main_account",
"external_id"
]
},
{
"type": "delete",
"label": "Delete",
"confirm": {
"message": "Are you sure you want to delete this credential? This action cannot be undone.",
"condition": {
"field": "integration_count",
"operator": "==",
"value": 0,
"errorMessage": "Credential cannot be deleted because it is used by active integrations."
}
}
}
],
"integrations": [
{
"type": "view",
"label": "View"
},

{
"type": "delete",
"label": "Delete",
"confirm": {
"message": "Are you sure you want to delete this integration? This action cannot be undone."
}
},
{
"type": "health_check",
"label": "Health Check",
"tooltip": "Run a health check on the integration to verify connectivity and configuration."
}
]
}
}
Loading

0 comments on commit 824f789

Please sign in to comment.