From de3a9187d324b3a32768b0e8e9a05b47e334bb23 Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Wed, 12 Jun 2024 13:09:57 +0200 Subject: [PATCH] Initial commit --- .github/workflows/ci.yml | 27 +++++++ LICENSE.md | 170 +++++++++++++++++++++++++++++++++++++++ README.md | 9 +++ generator/main.go | 114 ++++++++++++++++++++++++++ go.mod | 8 ++ go.sum | 4 + regioncert.go | 72 +++++++++++++++++ regioncert_gen.go | 77 ++++++++++++++++++ regioncert_test.go | 54 +++++++++++++ testdata/iid0.json | 17 ++++ testdata/iid0.sig | 3 + testdata/iid1.json | 17 ++++ testdata/iid1.sig | 3 + 13 files changed, 575 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 LICENSE.md create mode 100644 README.md create mode 100644 generator/main.go create mode 100644 go.mod create mode 100644 go.sum create mode 100644 regioncert.go create mode 100644 regioncert_gen.go create mode 100644 regioncert_test.go create mode 100644 testdata/iid0.json create mode 100644 testdata/iid0.sig create mode 100644 testdata/iid1.json create mode 100644 testdata/iid1.sig diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9cef50d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: ci + +on: + pull_request: + push: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Check out source code + uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v5 + + - name: Run go test + run: go test -cover ./... + + - name: Install staticcheck + run: go install honnef.co/go/tools/cmd/staticcheck@latest + + - name: Run staticcheck + run: | + staticcheck ./... diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..537fde8 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,170 @@ +Apache License +============== + +_Version 2.0, January 2004_ +_<>_ + +### Terms and Conditions for use, reproduction, and distribution + +#### 1. Definitions + +“License” shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +“Licensor” shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +“Legal Entity” shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, “control” means **(i)** the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or **(ii)** ownership of fifty percent (50%) or more of the +outstanding shares, or **(iii)** beneficial ownership of such entity. + +“You” (or “Your”) shall mean an individual or Legal Entity exercising +permissions granted by this License. + +“Source” form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +“Object” form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +“Work” shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +“Derivative Works” shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +“Contribution” shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +“submitted” means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as “Not a Contribution.” + +“Contributor” shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +#### 2. Grant of Copyright License + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +#### 3. Grant of Patent License + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +#### 4. Redistribution + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +* **(a)** You must give any other recipients of the Work or Derivative Works a copy of +this License; and +* **(b)** You must cause any modified files to carry prominent notices stating that You +changed the files; and +* **(c)** You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +* **(d)** If the Work includes a “NOTICE” text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. + +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +#### 5. Submission of Contributions + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +#### 6. Trademarks + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +#### 7. Disclaimer of Warranty + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an “AS IS” BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +#### 8. Limitation of Liability + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +#### 9. Accepting Warranty or Additional Liability + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +_END OF TERMS AND CONDITIONS_ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..805677e --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +## AWS Region Certificates for Go + +Embeds region certificates from AWS (run `go generate ./...` to refresh them) - AFAIU they can only be downloaded as part of documentation. + +Can be used to validate EC2 [instance identity documents](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html) using the `rsa`/`base64-encoded signature`. + +## Credits + +Special thanks to [@vstakhov](https://github.com/vstakhov) for sponsoring this work. diff --git a/generator/main.go b/generator/main.go new file mode 100644 index 0000000..6af6673 --- /dev/null +++ b/generator/main.go @@ -0,0 +1,114 @@ +// +build generate + +package main + +import ( + "fmt" + "net/http" + "os" + "path" + "runtime" + "sort" + "strings" + + . "github.com/dave/jennifer/jen" + "golang.org/x/net/html" +) + +const ( + RC_URL = "https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/regions-certs.html" +) + +func main() { + tempDir, err := os.MkdirTemp("", "aws-region-certs-generator") + if err != nil { + panic(err) + } + defer os.RemoveAll(tempDir) + + _, ourFile, _, _ := runtime.Caller(0) + parentDir := path.Join(path.Dir(ourFile), "..") + + f, err := os.Create(path.Join(parentDir, "regioncert_gen.go")) + if err != nil { + panic(err) + } + + j := NewFile("awsregioncertificates") + j.HeaderComment("Code generated by robots, DO NOT EDIT.") + + resp, err := http.Get(RC_URL) + if err != nil { + panic(err) + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusOK { + panic(fmt.Sprintf("bad http status %d", resp.StatusCode)) + } + + var region string + var wantText bool + regionCertMap := make(map[string]string) + tokenizer := html.NewTokenizer(resp.Body) + for { + tt:= tokenizer.Next() + if tt == html.ErrorToken { + break + } + if tt == html.StartTagToken { + token := tokenizer.Token() + if token.Data == "awsui-expandable-section" { + for _, attr := range token.Attr { + if attr.Key == "id" { + region = strings.TrimSuffix(attr.Val, "-cert") + break + } + } + } + if token.Data == "dd" { + for _, attr := range token.Attr { + if attr.Key == "tab-id" && attr.Val == "rsa" { + wantText = true + break + } + } + } + } + if tt == html.TextToken && wantText { + token := tokenizer.Token() + regionCertMap[region] = token.String() + wantText = false + } + } + + d := make(Dict) + ops := make([]Code, len(regionCertMap)) + i := 0 + regionList := make([]string, len(regionCertMap)) + for region := range regionCertMap { + regionList[i] = region + i++ + } + sort.Strings(regionList) + i = 0 + for _, region := range regionList { + cert := regionCertMap[region] + constName := strings.Replace(region, "-", "_", -1) + "_cert" + ops[i] = Id(constName).Op("=").Lit(cert) + i++ + d[Lit(region)] = Id(constName) + } + j.Const().Defs(ops...) + + j.Func().Id("GetRegionCertStrings").Params().Map(String()).String().Block( + Return(Map(String()).String().Values(d)), + ) + + fmt.Fprintln(f, fmt.Sprintf("%#v", j)) + + err = f.Close() + if err != nil { + panic(err) + } +} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..5766f64 --- /dev/null +++ b/go.mod @@ -0,0 +1,8 @@ +module github.com/rspamd/awsregioncertificates + +go 1.22 + +require ( + github.com/dave/jennifer v1.7.0 + golang.org/x/net v0.25.0 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..2b5b871 --- /dev/null +++ b/go.sum @@ -0,0 +1,4 @@ +github.com/dave/jennifer v1.7.0 h1:uRbSBH9UTS64yXbh4FrMHfgfY762RD+C7bUPKODpSJE= +github.com/dave/jennifer v1.7.0/go.mod h1:nXbxhEmQfOZhWml3D1cDK5M1FLnMSozpbFN/m3RmGZc= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= diff --git a/regioncert.go b/regioncert.go new file mode 100644 index 0000000..6865470 --- /dev/null +++ b/regioncert.go @@ -0,0 +1,72 @@ +// awsregioncertificates provides embedded region certificates for AWS +// and can be used to validate instance IDs +package awsregioncertificates + +import ( + "bytes" + "crypto" + "crypto/rsa" + "crypto/sha256" + "crypto/x509" + "encoding/base64" + "encoding/pem" + "errors" +) + +var ( + // ErrNoKey is returned if an error is encountered processing embedded data + ErrNoKey = errors.New("failed to extract key") + + // ErrRegionUnknown is returned if an unrecognised region was specified + ErrRegionUnknown = errors.New("region was unrecognized") +) + +// RegionKeys is a map of regions (as strings) to *rsa.PublicKey +type RegionKeys struct { + keys map[string]*rsa.PublicKey +} + +// ValidateID validates a given signature against a given instance ID using the key of the specified region. +func (r *RegionKeys) ValidateID(region string, iib []byte, sig []byte) error { + key, ok := r.keys[region] + if !ok { + return ErrRegionUnknown + } + decodedSig := make([]byte, base64.StdEncoding.DecodedLen(len(sig))) + _, err := base64.StdEncoding.Decode(decodedSig, sig) + if err != nil { + return err + } + decodedSig, _ = bytes.CutSuffix(decodedSig, []byte{00}) // 🤔 + h := sha256.Sum256(iib) + err = rsa.VerifyPKCS1v15(key, crypto.SHA256, h[:], decodedSig) + if err != nil { + return err + } + return nil +} + + +// GetRegionKeys returns a map of regions to *rsa.PublicKey +// or an error in case the embedded data could not be processed. +func GetRegionKeys() (RegionKeys, error) { + r := RegionKeys{ + keys: make(map[string]*rsa.PublicKey), + } + for region, certStr := range getRegionCertStrings() { + block, _ := pem.Decode([]byte(certStr)) + cert, err := x509.ParseCertificate(block.Bytes) + if err != nil { + return r, err + } + key, ok := cert.PublicKey.(*rsa.PublicKey) + if !ok { + return r, ErrNoKey + } + r.keys[region] = key + } + return r, nil +} + +//go:generate go run generator/main.go +//go:generate go fmt regioncert_gen.go diff --git a/regioncert_gen.go b/regioncert_gen.go new file mode 100644 index 0000000..b06d40b --- /dev/null +++ b/regioncert_gen.go @@ -0,0 +1,77 @@ +// Code generated by robots, DO NOT EDIT. + +package awsregioncertificates + +const ( + af_south_1_cert = "-----BEGIN CERTIFICATE-----\nMIICNjCCAZ+gAwIBAgIJAKumfZiRrNvHMA0GCSqGSIb3DQEBCwUAMFwxCzAJBgNV\nBAYTAlVTMRkwFwYDVQQIExBXYXNoaW5ndG9uIFN0YXRlMRAwDgYDVQQHEwdTZWF0\ndGxlMSAwHgYDVQQKExdBbWF6b24gV2ViIFNlcnZpY2VzIExMQzAgFw0xOTExMjcw\nNzE0MDVaGA8yMTk5MDUwMjA3MTQwNVowXDELMAkGA1UEBhMCVVMxGTAXBgNVBAgT\nEFdhc2hpbmd0b24gU3RhdGUxEDAOBgNVBAcTB1NlYXR0bGUxIDAeB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I81D\nIrKGGftg4Z+2KETYU4x76HSf0s//vfH3QA57qFaAwddhKYy4BhteFQl/Wex3xTlX\nLiwI07kwJvJy3mS6UfQ4HcvZy219tY+0iyOWrz/jVxwq7TOkCw==\n-----END CERTIFICATE-----\n" + ca_west_1_cert = "-----BEGIN CERTIFICATE-----\nMIICMzCCAZygAwIBAgIGAYPou9weMA0GCSqGSIb3DQEBBQUAMFwxCzAJBgNVBAYTAlVTMRkwFwYDVQQIDBBXYXNoaW5ndG9uIFN0YXRlMRAwDgYDVQQHDAdTZWF0dGxlMSAwHgYDVQQKDBdBbWF6b24gV2ViIFNlcnZpY2VzIExMQzAgFw0yMjEwMTgwMTM2MDlaGA8yMjAxMTAxODAxMzYwOVowXDELMAkGA1UEBhMCVVMxGTAXBgNVBAgMEFdhc2hpbmd0b24gU3RhdGUxEDAOBgNVBAcMB1NlYXR0bGUxIDAeBgNVBAoMF0FtYXpvbiBXZWIgU2VydmljZXMgTExDMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDK1kIcG5Q6adBXQM75GldfTSiXl7tn54p10TnspI0ErDdb2B6q2Ji/v4XBVH13ZCMgqlRHMqV8AWI5iO6gFn2A9sN3AZXTMqwtZeiDdebq3k6Wt7ieYvpXTg0qvgsjQIovRZWaBDBJy9x8C2hW+w9lMQjFHkJ7Jy/PHCJ69EzebQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAGe9Snkz1A6rHBH6/5kDtYvtPYwhx2sXNxztbhkXErFk40Nw5l459NZxEeudxJBLoCkkSgYjhRcOZ/gvDVtWG7qyb6fAqgoisyAbk8K9LzxSim2S1nmT9vD84B/t/VvwQBylc+ej8kRxMH7fquZLp7IXfmtBzyUqu6Dpbne+chG2\n-----END CERTIFICATE-----\n" + cn_north_1_cert = "-----BEGIN CERTIFICATE-----\nMIIDCzCCAnSgAwIBAgIJALSOMbOoU2svMA0GCSqGSIb3DQEBCwUAMFwxCzAJBgNV\nBAYTAlVTMRkwFwYDVQQIEx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nWD4pARg89KZnZI8FN35HQ\nO/LYOVHCknuPL123VmVRNs51qQA9hkPjvw21UzpDLxaUxt9Z/w==\n-----END CERTIFICATE-----\n" + eu_central_2_cert = "-----BEGIN CERTIFICATE-----\nMIICMzCCAZygAwIBAgIGAXjSGFGiMA0GCSqGSIb3DQEBBQUAMFwxCzAJBgNVBAYTAlVTMRkwFwYDVQQIDBBXYXNoaW5ndG9uIFN0YXRlMRAwDgYDVQQHDAdTZWF0dGxlMSAwHgYDVQQKDBdBbWF6b24gV2ViIFNlcnZpY2VzIExMQzAgFw0yMTA0MTQyMDM1MTJaGA8yMjAwMDQxNDIwMzUxMlowXDELMAkGA1UEBhMCVVMxGTAXBgNVBAgMEFdhc2hpbmd0b24gU3RhdGUxEDAOBgNVBAcMB1NlYXR0bGUxIDAeBgNVBAoMF0FtYXpvbiBXZWIgU2VydmljZXMgTExDMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2mdGdps5Rz2jzYcGNsgETTGUthJRrVqSnUWJXTlVaIbkGPLKO6Or7AfWKFp2sgRJ8vLsjoBVR5cESVK7cuK1wItjvJyi/opKZAUusJx2hpgU3pUHhlp9ATh/VeVD582jTd9IY+8t5MDa6Z3fGliByEiXz0LEHdi8MBacLREu1TwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAILlpoE3k9o7KdALAxsFJNitVS+g3RMzdbiFM+7MA63Nv5fsf+0xgcjSNBElvPCDKFvTJl4QQhToy056llO5GvdS9RK+H8xrP2mrqngApoKTApv93vHBixgFSn5KrczRO0YSm3OjkqbydU7DFlmkXXR7GYE+5jbHvQHYiT1J5sMu\n-----END CERTIFICATE-----\n" + eu_north_1_cert = "-----BEGIN CERTIFICATE-----\nMIIDITCCAoqgAwIBAgIUN1c9U6U/xiVDFgJcYKZB4NkH1QEwDQYJKoZIhvcNAQEL\nBQAwXDELMAkGA1UEBhMCVVMxGTAXBgNVBAgTEFdhc2hpbmd0b24gU3RhdGUxEDAO\nBgNVBAcTB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B1NlYXR0bGUxIDAeBgNVBAoTF0FtYXpvbiBXZWIgU2VydmljZXMgTExD\nMB4XDTI0MDQyOTE3MjM1OVoXDTI5MDQyODE3MjM1OVowXDELMAkGA1UEBhMCVVMx\nGTAXBgNVBAgTEFdhc2hpbmd0b24gU3RhdGUxEDAOBgNVBAcTB1NlYXR0bGUxIDAe\nBgNVBAoTF0FtYXpvbiBXZWIgU2VydmljZXMgTExDMIGfMA0GCSqGSIb3DQEBAQUA\nA4GNADCBiQKBgQCHvRjf/0kStpJ248khtIaN8qkDN3tkw4VjvA9nvPl2anJO+eIB\nUqPfQG09kZlwpWpmyO8bGB2RWqWxCwuB/dcnIob6w420k9WY5C0IIGtDRNauN3ku\nvGXkw3HEnF0EjYr0pcyWUvByWY4KswZV42X7Y7XSS13hOIcL6NLA+H94/QIDAQAB\no4HfMIHcMAsGA1UdDwQEAwIHgDAdBgNVHQ4EFgQUJdbMCBXKtvCcWdwUUizvtUF2\nUTgwgZkGA1UdIwSBkTCBjoAUJdbMCBXKtvCcWdwUUizvtUF2UTihYKReMFwxCzAJ\nBgNVBAYTAlVTMRkwFwYDVQQIExBXYXNoaW5ndG9uIFN0YXRlMRAwDgYDVQQHEwdT\nZWF0dGxlMSAwHgYDVQQKExdBbWF6b24gV2ViIFNlcnZpY2VzIExMQ4IUFx8PxCkb\nHwpD31bOyCtyz3GclbgwEgYDVR0TAQH/BAgwBgEB/wIBADANBgkqhkiG9w0BAQsF\nAAOBgQBzOl+9Xy1+UsbUBI95HO9mbbdnuX+aMJXgG9uFZNjgNEbMcvx+h8P9IMko\nz7PzFdheQQ1NLjsHH9mSR1SyC4m9ja6BsejH5nLBWyCdjfdP3muZM4O5+r7vUa1O\ndWU+hP/T7DUrPAIVMOE7mpYa+WPWJrN6BlRwQkKQ7twm9kDalA==\n-----END CERTIFICATE-----\n" +) + +func getRegionCertStrings() map[string]string { + return map[string]string{ + "af-south-1": af_south_1_cert, + "ap-east-1": ap_east_1_cert, + "ap-northeast-1": ap_northeast_1_cert, + "ap-northeast-2": ap_northeast_2_cert, + "ap-northeast-3": ap_northeast_3_cert, + "ap-south-1": ap_south_1_cert, + "ap-south-2": ap_south_2_cert, + "ap-southeast-1": ap_southeast_1_cert, + "ap-southeast-2": ap_southeast_2_cert, + "ap-southeast-3": ap_southeast_3_cert, + "ap-southeast-4": ap_southeast_4_cert, + "ca-central-1": ca_central_1_cert, + "ca-west-1": ca_west_1_cert, + "cn-north-1": cn_north_1_cert, + "cn-northwest-1": cn_northwest_1_cert, + "eu-central-1": eu_central_1_cert, + "eu-central-2": eu_central_2_cert, + "eu-north-1": eu_north_1_cert, + "eu-south-1": eu_south_1_cert, + "eu-south-2": eu_south_2_cert, + "eu-west-1": eu_west_1_cert, + "eu-west-2": eu_west_2_cert, + "eu-west-3": eu_west_3_cert, + "il-central-1": il_central_1_cert, + "me-central-1": me_central_1_cert, + "me-south-1": me_south_1_cert, + "sa-east-1": sa_east_1_cert, + "us-east-1": us_east_1_cert, + "us-east-2": us_east_2_cert, + "us-gov-east-1": us_gov_east_1_cert, + "us-gov-west-1": us_gov_west_1_cert, + "us-west-1": us_west_1_cert, + "us-west-2": us_west_2_cert, + } +} diff --git a/regioncert_test.go b/regioncert_test.go new file mode 100644 index 0000000..96f7503 --- /dev/null +++ b/regioncert_test.go @@ -0,0 +1,54 @@ +package awsregioncertificates + +import ( + "io" + "os" + "path" + "runtime" + "testing" +) + +var ( + testIDs = map[[3]string]error{ + [3]string{"iid0.json", "iid0.sig", "us-east-1"}: nil, + [3]string{"iid1.json", "iid1.sig", "us-east-1"}: nil, + } +) + +func TestValidateID(t *testing.T) { + regionKeys, err := GetRegionKeys() + if err != nil { + t.Fatal(err) + } + _, ourFile, _, _ := runtime.Caller(0) + testDataDir := path.Join(path.Dir(ourFile), "testdata") + + for testFiles, expectErr := range testIDs { + + f, err := os.Open(path.Join(testDataDir, testFiles[0])) + if err != nil { + t.Fatal(err) + } + iib, err := io.ReadAll(f) + if err != nil { + t.Fatal(err) + } + err = f.Close() + if err != nil { + t.Fatal(err) + } + f, err = os.Open(path.Join(testDataDir, testFiles[1])) + if err != nil { + t.Fatal(err) + } + var sig []byte + sig, err = io.ReadAll(f) + if err != nil { + t.Fatal(err) + } + err = regionKeys.ValidateID(testFiles[2], iib, sig) + if err != expectErr { + t.Fatalf("%s: %s (actual) != %s (expected)", testFiles[0], err, expectErr) + } + } +} diff --git a/testdata/iid0.json b/testdata/iid0.json new file mode 100644 index 0000000..a045ac7 --- /dev/null +++ b/testdata/iid0.json @@ -0,0 +1,17 @@ +{ + "accountId" : "975050371289", + "architecture" : "x86_64", + "availabilityZone" : "us-east-1b", + "billingProducts" : null, + "devpayProductCodes" : null, + "marketplaceProductCodes" : null, + "imageId" : "ami-0c7217cdde317cfec", + "instanceId" : "i-0b02d936754a6d637", + "instanceType" : "t2.micro", + "kernelId" : null, + "pendingTime" : "2024-02-15T14:12:11Z", + "privateIp" : "172.31.17.154", + "ramdiskId" : null, + "region" : "us-east-1", + "version" : "2017-09-30" +} \ No newline at end of file diff --git a/testdata/iid0.sig b/testdata/iid0.sig new file mode 100644 index 0000000..71e88c1 --- /dev/null +++ b/testdata/iid0.sig @@ -0,0 +1,3 @@ +OQTgfPTsc7hXR+3OWP7dk7qY1S1RNGvVvoVPzn/WogAqJpGBtei2pSx3OfZ7F1PDMpClQswDcF9N +iZmPD09xyJSrSRwYvx8SFoBWzUXS1hd9T1ZxpqWtloe/k//YmK7h9f7rjuT3/CxDDCWrbsKp8F0N +ck+YPKGzD+dtxEm6g1g= \ No newline at end of file diff --git a/testdata/iid1.json b/testdata/iid1.json new file mode 100644 index 0000000..91b16eb --- /dev/null +++ b/testdata/iid1.json @@ -0,0 +1,17 @@ +{ + "accountId" : "975050371289", + "architecture" : "x86_64", + "availabilityZone" : "us-east-1c", + "billingProducts" : null, + "devpayProductCodes" : null, + "marketplaceProductCodes" : [ "4i20ezfza3p7xx2kt2g8weu2u" ], + "imageId" : "ami-0b76fe9a9986f66a7", + "instanceId" : "i-0ce4441c840a0a941", + "instanceType" : "t2.micro", + "kernelId" : null, + "pendingTime" : "2024-04-12T13:56:49Z", + "privateIp" : "172.31.43.11", + "ramdiskId" : null, + "region" : "us-east-1", + "version" : "2017-09-30" +} \ No newline at end of file diff --git a/testdata/iid1.sig b/testdata/iid1.sig new file mode 100644 index 0000000..1712b3b --- /dev/null +++ b/testdata/iid1.sig @@ -0,0 +1,3 @@ +SAzcO69oS4Cc2Zcs28rOpodVxTyjRyfVswe7GgCOTTeo+GC14MHdTQA0YEV97JNAXMorb719EyFu +C2thke+aLzXbeTYBRz2isKIKfazQE8f0221OBpdwENX5I/HVUlhQW8Yi1s234IV42ydnDNJtj12T +zwVN+SrhVyvndrWv/t8= \ No newline at end of file