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

Move top level fiends into supplementaryConfiguration #84

Closed
kickroot opened this issue Apr 9, 2021 · 0 comments
Closed

Move top level fiends into supplementaryConfiguration #84

kickroot opened this issue Apr 9, 2021 · 0 comments
Assignees
Milestone

Comments

@kickroot
Copy link
Contributor

kickroot commented Apr 9, 2021

In the AWS Discovery services (for example: https://github.com/openraven/magpie/blob/main/magpie-aws/src/main/java/io/openraven/magpie/plugins/aws/discovery/services/S3Discovery.java) relocate any current top level fields (with the exception of the tags and current TODO) into /supplementaryConfiguration.

Using S3Discovery as an example it should take the form:

{
          "configuration" : {
            "name" : "...",
            "creationDate" : "2021-03-06T00:28:38Z"
          },
         "supplementaryConfiguration" : {
            "ServerSideEncryptionConfiguration" : null,
            "BucketWebsiteConfiguration" : null,
            "BucketACLConfiguration" : {
              "owner" : {
                "displayName" : "...",
                "id" : "...",
              },
              "grants" : [
                {
                  "grantee" : {
                    "emailAddress" : null,
                    "displayName" : "...",
                    "id" : "...",
                    "type" : "CanonicalUser",
                    "uri" : null
                  },
                  "permission" : "FULL_CONTROL"
                }
              ]
            },
            "PublicAccessBlockConfiguration" : null,
            "BucketLoggingConfiguration" : {
              "loggingEnabled" : null
            },
            "MetricsConfiguration" : {
              "id" : null,
              "filter" : null
            },
            "NotificationConfiguration" : {
              "topicConfigurations" : [ ],
              "queueConfigurations" : [
                {
                  "filter" : {
                    "key" : {
                      "filterRules" : [
                        {
                          "name" : "Prefix",
                          "value" : "...",
                        }
                      ]
                    }
                  },
                  "id" : "...",
                  "queueArn" : "...",
                  "events" : [
                    "s3:ObjectCreated:Put"
                  ]
                }
              ],
              "lambdaFunctionConfigurations" : [ ]
            },
            "BucketPolicyStatus" : null,
            "BucketPolicy" : null,
            "BucketObjectLockConfiguration" : null,
            "ReplicationConfiguration" : null,
            "isPublic" : false,
            "isPublicByPolicy" : false,
            "isPublicByACL" : false,
            "Versioning" : {
              "status" : null,
              "mfaDelete" : null
            },
            "size" : {
              "NumberOfObjects" : 0,
              "BucketSizeBytes" : 0
            },
         "tags" : {
            "DeployChannel" : "...",
            "OrgId" : "...",
            "aws:cloudformation:stack-name" : "...",
            "aws:cloudformation:stack-id" : "...",
            "OrgSlug" : "...",
            "aws:cloudformation:logical-id" : "...",
            "project" : "...",
          },
}

The resultant top level ObjectNode that gets put into MagpieEnvelope should contain 3 fields (configuration, supplementaryConfiguration, and tags).

When in doubt, the raw JSON on Open Raven's clusters should be authoritative WITH ONE DEVIATION: Use camelCase for all top level keys.

For example in S3 buckets:
supplementaryConfiguration.ServerSideEncryptionConfiguration should become supplementaryConfiguration.serverSideEncryptionConfiguration (note the lower case 's'). We are standardizing and ensuring consistency in naming.

All service updates fall under this ticket and can be submitted as a single (albeit massive) PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants