From c3bf1e8d3b81943a748f54c2bba4a0c1adaf1ee2 Mon Sep 17 00:00:00 2001 From: Julien Pivotto Date: Tue, 18 Oct 2022 12:35:46 +0200 Subject: [PATCH] Update build to github action & release 0.8.0 Signed-off-by: Julien Pivotto --- .circleci/config.yml | 59 ++++++++----------- .github/workflows/ci.yml | 31 ++++++++++ .github/workflows/codeql-analysis.yml | 50 ++++++++-------- .github/workflows/golangci-lint.yml | 30 ---------- .yamllint | 28 +++++++++ CHANGELOG.md | 6 ++ go.mod | 6 +- go.sum | 11 ++-- .../web_config_auth_clientCAs_invalid.bad.yml | 8 +-- .../web_config_auth_clientCAs_missing.bad.yml | 8 +-- .../web_config_auth_user_list_invalid.bad.yml | 6 +- web/testdata/web_config_junk_key.yml | 2 +- web/testdata/web_config_noAuth.bad.yml | 8 +-- .../web_config_noAuth.good.blocking.yml | 8 +-- web/testdata/web_config_noAuth.good.yml | 8 +-- .../web_config_noAuth_allCiphers.good.yml | 9 ++- .../web_config_noAuth_allCurves.good.yml | 8 +-- .../web_config_noAuth_certPath_empty.bad.yml | 6 +- ...web_config_noAuth_certPath_invalid.bad.yml | 6 +- ...nfig_noAuth_certPath_keyPath_empty.bad.yml | 6 +- ...ig_noAuth_certPath_keyPath_invalid.bad.yml | 6 +- .../web_config_noAuth_inventedCiphers.bad.yml | 9 ++- .../web_config_noAuth_inventedCurves.bad.yml | 8 +-- .../web_config_noAuth_keyPath_empty.bad.yml | 6 +- .../web_config_noAuth_keyPath_invalid.bad.yml | 6 +- .../web_config_noAuth_noHTTP2.good.yml | 8 +-- .../web_config_noAuth_noHTTP2Cipher.bad.yml | 8 +-- .../web_config_noAuth_someCiphers.good.yml | 8 +-- ...config_noAuth_someCiphers_noOrder.good.yml | 8 +-- .../web_config_noAuth_someCurves.good.yml | 8 +-- .../web_config_noAuth_wrongTLSVersion.bad.yml | 8 +-- web/testdata/web_config_users.good.yml | 6 +- web/web-config.yml | 1 - 33 files changed, 207 insertions(+), 187 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/golangci-lint.yml create mode 100644 .yamllint diff --git a/.circleci/config.yml b/.circleci/config.yml index 9f882b61..965b2739 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,46 +1,33 @@ --- +# Prometheus has switched to GitHub action. +# Circle CI is not disabled repository-wise so that previous pull requests +# continue working. +# This file does not generate any CircleCI workflow. + version: 2.1 -orbs: - go: circleci/go@1.7.1 +executors: + golang: + docker: + - image: busybox jobs: - test: - parameters: - go_version: - type: string - use_gomod_cache: - type: boolean - default: true - docker: - - image: cimg/go:<< parameters.go_version >> + noopjob: + executor: golang + steps: - - checkout - - when: - condition: << parameters.use_gomod_cache >> - steps: - - go/load-cache: - key: v1-go<< parameters.go_version >> - - run: make test - - when: - condition: << parameters.use_gomod_cache >> - steps: - - go/save-cache: - key: v1-go<< parameters.go_version >> - - store_test_results: - path: test-results + - run: + command: "true" workflows: version: 2 - tests: + prometheus: jobs: - # Support the last two go releases, as per https://golang.org/dl/. - - test: - name: go-1-17 - go_version: "1.17" - - test: - name: go-1-18 - go_version: "1.18" - - test: - name: go-1-19 - go_version: "1.19" + - noopjob + triggers: + - schedule: + cron: "0 0 30 2 *" + filters: + branches: + only: + - main diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..937f6f18 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +--- +name: CI +on: # yamllint disable-line rule:truthy + pull_request: + push: +jobs: + test: + name: Test + runs-on: ubuntu-latest + container: + image: quay.io/prometheus/golang-builder:1.19-base + steps: + - uses: actions/checkout@v3 + - uses: prometheus/promci@v0.0.2 + - uses: ./.github/promci/actions/setup_environment + - run: make test + + golangci: + name: golangci-lint + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install Go + uses: actions/setup-go@v3 + with: + go-version: '<1.19' + - name: Lint + uses: golangci/golangci-lint-action@v3.2.0 + with: + version: v1.49.0 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 030087be..77c634fa 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -34,34 +34,34 @@ jobs: # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed steps: - - name: Checkout repository - uses: actions/checkout@v2 + - name: Checkout repository + uses: actions/checkout@v2 - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language + # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language - #- run: | - # make bootstrap - # make release + #- run: | + # make bootstrap + # make release - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml deleted file mode 100644 index 6034bcbf..00000000 --- a/.github/workflows/golangci-lint.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: golangci-lint -on: - push: - paths: - - "go.sum" - - "go.mod" - - "**.go" - - "scripts/errcheck_excludes.txt" - - ".github/workflows/golangci-lint.yml" - - ".golangci.yml" - pull_request: - -jobs: - golangci: - name: lint - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - name: install Go - uses: actions/setup-go@v2 - with: - go-version: 1.18.x - - name: Install snmp_exporter/generator dependencies - run: sudo apt-get update && sudo apt-get -y install libsnmp-dev - if: github.repository == 'prometheus/snmp_exporter' - - name: Lint - uses: golangci/golangci-lint-action@v3.2.0 - with: - version: v1.45.2 diff --git a/.yamllint b/.yamllint new file mode 100644 index 00000000..3878a31d --- /dev/null +++ b/.yamllint @@ -0,0 +1,28 @@ +--- +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + commas: disable + comments: disable + comments-indentation: disable + document-start: disable + indentation: + spaces: consistent + indent-sequences: consistent + key-duplicates: + ignore: | + config/testdata/section_key_dup.bad.yml + line-length: disable + truthy: + ignore: | + .github/workflows/codeql-analysis.yml + .github/workflows/funcbench.yml + .github/workflows/fuzzing.yml + .github/workflows/prombench.yml + .github/workflows/golangci-lint.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 272e4233..e4899a4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.8.0 / 2022-10-10 + +* [CHANGE] Change some structs suffix from `Struct` to `Config` #114 +* [FEATURE] Add multiple listeners and systemd socket support #95 +* [FEATURE] Allow TLS parameters to be set in code #110 + ## 0.7.1 / 2021-12-02 * [BUGFIX] Effectively enable HTTP/2 support. #72 diff --git a/go.mod b/go.mod index e1a00d50..5a3fde17 100644 --- a/go.mod +++ b/go.mod @@ -3,11 +3,11 @@ module github.com/prometheus/exporter-toolkit go 1.17 require ( - github.com/coreos/go-systemd/v22 v22.3.2 + github.com/coreos/go-systemd/v22 v22.4.0 github.com/go-kit/log v0.2.1 github.com/prometheus/common v0.37.0 - golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 - golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f + golang.org/x/crypto v0.0.0-20221012134737-56aed061732a + golang.org/x/sync v0.1.0 gopkg.in/alecthomas/kingpin.v2 v2.2.6 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index f31fee00..93458bce 100644 --- a/go.sum +++ b/go.sum @@ -89,8 +89,8 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/go-systemd/v22 v22.4.0 h1:y9YHcjnjynCd/DVbg5j9L/33jQM3MxJlbj/zWskzfGU= +github.com/coreos/go-systemd/v22 v22.4.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -302,8 +302,8 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM= -golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20221012134737-56aed061732a h1:NmSIgad6KjE6VvHciPZuNRTKxGhlPfD6OA87W/PLkqg= +golang.org/x/crypto v0.0.0-20221012134737-56aed061732a/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -420,8 +420,9 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/web/testdata/web_config_auth_clientCAs_invalid.bad.yml b/web/testdata/web_config_auth_clientCAs_invalid.bad.yml index b2cd2bbb..02c5722d 100644 --- a/web/testdata/web_config_auth_clientCAs_invalid.bad.yml +++ b/web/testdata/web_config_auth_clientCAs_invalid.bad.yml @@ -1,4 +1,4 @@ -tls_server_config : - cert_file : "server.crt" - key_file : "server.key" - client_ca_file : "somefile" \ No newline at end of file +tls_server_config: + cert_file: "server.crt" + key_file: "server.key" + client_ca_file: "somefile" diff --git a/web/testdata/web_config_auth_clientCAs_missing.bad.yml b/web/testdata/web_config_auth_clientCAs_missing.bad.yml index c78e53b8..c5a8787d 100644 --- a/web/testdata/web_config_auth_clientCAs_missing.bad.yml +++ b/web/testdata/web_config_auth_clientCAs_missing.bad.yml @@ -1,4 +1,4 @@ -tls_server_config : - cert_file : "server.crt" - key_file : "server.key" - client_auth_type : "RequireAndVerifyClientCert" \ No newline at end of file +tls_server_config: + cert_file: "server.crt" + key_file: "server.key" + client_auth_type: "RequireAndVerifyClientCert" diff --git a/web/testdata/web_config_auth_user_list_invalid.bad.yml b/web/testdata/web_config_auth_user_list_invalid.bad.yml index 1a4f625c..4a696ae2 100644 --- a/web/testdata/web_config_auth_user_list_invalid.bad.yml +++ b/web/testdata/web_config_auth_user_list_invalid.bad.yml @@ -1,5 +1,5 @@ -tls_server_config : - cert_file : "server.crt" - key_file : "server.key" +tls_server_config: + cert_file: "server.crt" + key_file: "server.key" basic_auth_users: john: doe diff --git a/web/testdata/web_config_junk_key.yml b/web/testdata/web_config_junk_key.yml index 9d6a4617..1614ae67 100644 --- a/web/testdata/web_config_junk_key.yml +++ b/web/testdata/web_config_junk_key.yml @@ -1,2 +1,2 @@ -tls_server_config : +tls_server_config: cert_filse: "server.crt" diff --git a/web/testdata/web_config_noAuth.bad.yml b/web/testdata/web_config_noAuth.bad.yml index ac506ed3..1e0fb423 100644 --- a/web/testdata/web_config_noAuth.bad.yml +++ b/web/testdata/web_config_noAuth.bad.yml @@ -1,4 +1,4 @@ -tls_server_config : - cert_file : "server.crt" - key_file : "server.key" - client_ca_file : "/dev/null" +tls_server_config: + cert_file: "server.crt" + key_file: "server.key" + client_ca_file: "/dev/null" diff --git a/web/testdata/web_config_noAuth.good.blocking.yml b/web/testdata/web_config_noAuth.good.blocking.yml index 5457f686..c5a8787d 100644 --- a/web/testdata/web_config_noAuth.good.blocking.yml +++ b/web/testdata/web_config_noAuth.good.blocking.yml @@ -1,4 +1,4 @@ -tls_server_config : - cert_file : "server.crt" - key_file : "server.key" - client_auth_type : "RequireAndVerifyClientCert" +tls_server_config: + cert_file: "server.crt" + key_file: "server.key" + client_auth_type: "RequireAndVerifyClientCert" diff --git a/web/testdata/web_config_noAuth.good.yml b/web/testdata/web_config_noAuth.good.yml index 703c8153..433e53d8 100644 --- a/web/testdata/web_config_noAuth.good.yml +++ b/web/testdata/web_config_noAuth.good.yml @@ -1,4 +1,4 @@ -tls_server_config : - cert_file : "server.crt" - key_file : "server.key" - client_auth_type : "VerifyClientCertIfGiven" +tls_server_config: + cert_file: "server.crt" + key_file: "server.key" + client_auth_type: "VerifyClientCertIfGiven" diff --git a/web/testdata/web_config_noAuth_allCiphers.good.yml b/web/testdata/web_config_noAuth_allCiphers.good.yml index d082bea7..2e2217b5 100644 --- a/web/testdata/web_config_noAuth_allCiphers.good.yml +++ b/web/testdata/web_config_noAuth_allCiphers.good.yml @@ -1,7 +1,7 @@ -tls_server_config : - cert_file : "server.crt" - key_file : "server.key" - client_auth_type : "VerifyClientCertIfGiven" +tls_server_config: + cert_file: "server.crt" + key_file: "server.key" + client_auth_type: "VerifyClientCertIfGiven" cipher_suites: - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 - TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 @@ -20,4 +20,3 @@ tls_server_config : - TLS_RSA_WITH_AES_256_CBC_SHA - TLS_RSA_WITH_AES_128_GCM_SHA256 - TLS_RSA_WITH_AES_256_GCM_SHA384 - diff --git a/web/testdata/web_config_noAuth_allCurves.good.yml b/web/testdata/web_config_noAuth_allCurves.good.yml index 8872f545..2b29808c 100644 --- a/web/testdata/web_config_noAuth_allCurves.good.yml +++ b/web/testdata/web_config_noAuth_allCurves.good.yml @@ -1,7 +1,7 @@ -tls_server_config : - cert_file : "server.crt" - key_file : "server.key" - client_auth_type : "VerifyClientCertIfGiven" +tls_server_config: + cert_file: "server.crt" + key_file: "server.key" + client_auth_type: "VerifyClientCertIfGiven" curve_preferences: - CurveP256 - CurveP384 diff --git a/web/testdata/web_config_noAuth_certPath_empty.bad.yml b/web/testdata/web_config_noAuth_certPath_empty.bad.yml index 5fa3d74e..4f9a96af 100644 --- a/web/testdata/web_config_noAuth_certPath_empty.bad.yml +++ b/web/testdata/web_config_noAuth_certPath_empty.bad.yml @@ -1,3 +1,3 @@ -tls_server_config : - cert_file : "" - key_file : "server.key" \ No newline at end of file +tls_server_config: + cert_file: "" + key_file: "server.key" diff --git a/web/testdata/web_config_noAuth_certPath_invalid.bad.yml b/web/testdata/web_config_noAuth_certPath_invalid.bad.yml index 5bb2afba..b5af5410 100644 --- a/web/testdata/web_config_noAuth_certPath_invalid.bad.yml +++ b/web/testdata/web_config_noAuth_certPath_invalid.bad.yml @@ -1,3 +1,3 @@ -tls_server_config : - cert_file : "somefile" - key_file : "server.key" \ No newline at end of file +tls_server_config: + cert_file: "somefile" + key_file: "server.key" diff --git a/web/testdata/web_config_noAuth_certPath_keyPath_empty.bad.yml b/web/testdata/web_config_noAuth_certPath_keyPath_empty.bad.yml index 4e366adf..90abf218 100644 --- a/web/testdata/web_config_noAuth_certPath_keyPath_empty.bad.yml +++ b/web/testdata/web_config_noAuth_certPath_keyPath_empty.bad.yml @@ -1,4 +1,4 @@ -tls_server_config : - cert_file : "" - key_file : "" +tls_server_config: + cert_file: "" + key_file: "" client_auth_type: "x" diff --git a/web/testdata/web_config_noAuth_certPath_keyPath_invalid.bad.yml b/web/testdata/web_config_noAuth_certPath_keyPath_invalid.bad.yml index ab0a262e..f031adfa 100644 --- a/web/testdata/web_config_noAuth_certPath_keyPath_invalid.bad.yml +++ b/web/testdata/web_config_noAuth_certPath_keyPath_invalid.bad.yml @@ -1,3 +1,3 @@ -tls_server_config : - cert_file : "somefile" - key_file : "somefile" \ No newline at end of file +tls_server_config: + cert_file: "somefile" + key_file: "somefile" diff --git a/web/testdata/web_config_noAuth_inventedCiphers.bad.yml b/web/testdata/web_config_noAuth_inventedCiphers.bad.yml index b9a502a6..f097e6dd 100644 --- a/web/testdata/web_config_noAuth_inventedCiphers.bad.yml +++ b/web/testdata/web_config_noAuth_inventedCiphers.bad.yml @@ -1,7 +1,6 @@ -tls_server_config : - cert_file : "server.crt" - key_file : "server.key" - client_auth_type : "VerifyClientCertIfGiven" +tls_server_config: + cert_file: "server.crt" + key_file: "server.key" + client_auth_type: "VerifyClientCertIfGiven" cipher_suites: - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA2048 - diff --git a/web/testdata/web_config_noAuth_inventedCurves.bad.yml b/web/testdata/web_config_noAuth_inventedCurves.bad.yml index f0fc9013..bf58a9c0 100644 --- a/web/testdata/web_config_noAuth_inventedCurves.bad.yml +++ b/web/testdata/web_config_noAuth_inventedCurves.bad.yml @@ -1,6 +1,6 @@ -tls_server_config : - cert_file : "server.crt" - key_file : "server.key" - client_auth_type : "VerifyClientCertIfGiven" +tls_server_config: + cert_file: "server.crt" + key_file: "server.key" + client_auth_type: "VerifyClientCertIfGiven" curve_preferences: - CurveP257 diff --git a/web/testdata/web_config_noAuth_keyPath_empty.bad.yml b/web/testdata/web_config_noAuth_keyPath_empty.bad.yml index 809463b4..bf35bb4d 100644 --- a/web/testdata/web_config_noAuth_keyPath_empty.bad.yml +++ b/web/testdata/web_config_noAuth_keyPath_empty.bad.yml @@ -1,3 +1,3 @@ -tls_server_config : - cert_file : "server.crt" - key_file : "" \ No newline at end of file +tls_server_config: + cert_file: "server.crt" + key_file: "" diff --git a/web/testdata/web_config_noAuth_keyPath_invalid.bad.yml b/web/testdata/web_config_noAuth_keyPath_invalid.bad.yml index d6f2e079..6e773cdd 100644 --- a/web/testdata/web_config_noAuth_keyPath_invalid.bad.yml +++ b/web/testdata/web_config_noAuth_keyPath_invalid.bad.yml @@ -1,3 +1,3 @@ -tls_server_config : - cert_file : "server.cert" - key_file : "somefile" \ No newline at end of file +tls_server_config: + cert_file: "server.cert" + key_file: "somefile" diff --git a/web/testdata/web_config_noAuth_noHTTP2.good.yml b/web/testdata/web_config_noAuth_noHTTP2.good.yml index b81793fa..e3f481f6 100644 --- a/web/testdata/web_config_noAuth_noHTTP2.good.yml +++ b/web/testdata/web_config_noAuth_noHTTP2.good.yml @@ -1,7 +1,7 @@ -tls_server_config : - cert_file : "server.crt" - key_file : "server.key" - client_auth_type : "VerifyClientCertIfGiven" +tls_server_config: + cert_file: "server.crt" + key_file: "server.key" + client_auth_type: "VerifyClientCertIfGiven" cipher_suites: - TLS_RSA_WITH_AES_128_CBC_SHA max_version: TLS12 diff --git a/web/testdata/web_config_noAuth_noHTTP2Cipher.bad.yml b/web/testdata/web_config_noAuth_noHTTP2Cipher.bad.yml index 2ee06f5b..b9ce5c91 100644 --- a/web/testdata/web_config_noAuth_noHTTP2Cipher.bad.yml +++ b/web/testdata/web_config_noAuth_noHTTP2Cipher.bad.yml @@ -1,7 +1,7 @@ -tls_server_config : - cert_file : "server.crt" - key_file : "server.key" - client_auth_type : "VerifyClientCertIfGiven" +tls_server_config: + cert_file: "server.crt" + key_file: "server.key" + client_auth_type: "VerifyClientCertIfGiven" cipher_suites: - TLS_RSA_WITH_AES_128_CBC_SHA max_version: TLS12 diff --git a/web/testdata/web_config_noAuth_someCiphers.good.yml b/web/testdata/web_config_noAuth_someCiphers.good.yml index 651c82bf..8cbfc94b 100644 --- a/web/testdata/web_config_noAuth_someCiphers.good.yml +++ b/web/testdata/web_config_noAuth_someCiphers.good.yml @@ -1,7 +1,7 @@ -tls_server_config : - cert_file : "server.crt" - key_file : "server.key" - client_auth_type : "VerifyClientCertIfGiven" +tls_server_config: + cert_file: "server.crt" + key_file: "server.key" + client_auth_type: "VerifyClientCertIfGiven" cipher_suites: - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 - TLS_RSA_WITH_AES_128_CBC_SHA diff --git a/web/testdata/web_config_noAuth_someCiphers_noOrder.good.yml b/web/testdata/web_config_noAuth_someCiphers_noOrder.good.yml index 3d7edfba..bdb31ed2 100644 --- a/web/testdata/web_config_noAuth_someCiphers_noOrder.good.yml +++ b/web/testdata/web_config_noAuth_someCiphers_noOrder.good.yml @@ -1,7 +1,7 @@ -tls_server_config : - cert_file : "server.crt" - key_file : "server.key" - client_auth_type : "VerifyClientCertIfGiven" +tls_server_config: + cert_file: "server.crt" + key_file: "server.key" + client_auth_type: "VerifyClientCertIfGiven" cipher_suites: - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 diff --git a/web/testdata/web_config_noAuth_someCurves.good.yml b/web/testdata/web_config_noAuth_someCurves.good.yml index d875e9aa..776f800c 100644 --- a/web/testdata/web_config_noAuth_someCurves.good.yml +++ b/web/testdata/web_config_noAuth_someCurves.good.yml @@ -1,7 +1,7 @@ -tls_server_config : - cert_file : "server.crt" - key_file : "server.key" - client_auth_type : "VerifyClientCertIfGiven" +tls_server_config: + cert_file: "server.crt" + key_file: "server.key" + client_auth_type: "VerifyClientCertIfGiven" min_version: TLS13 curve_preferences: - CurveP521 diff --git a/web/testdata/web_config_noAuth_wrongTLSVersion.bad.yml b/web/testdata/web_config_noAuth_wrongTLSVersion.bad.yml index cd6afd4e..b4aafd3e 100644 --- a/web/testdata/web_config_noAuth_wrongTLSVersion.bad.yml +++ b/web/testdata/web_config_noAuth_wrongTLSVersion.bad.yml @@ -1,5 +1,5 @@ -tls_server_config : - cert_file : "server.crt" - key_file : "server.key" - client_auth_type : "VerifyClientCertIfGiven" +tls_server_config: + cert_file: "server.crt" + key_file: "server.key" + client_auth_type: "VerifyClientCertIfGiven" min_version: TLS111 diff --git a/web/testdata/web_config_users.good.yml b/web/testdata/web_config_users.good.yml index ad295abc..feeee187 100644 --- a/web/testdata/web_config_users.good.yml +++ b/web/testdata/web_config_users.good.yml @@ -1,6 +1,6 @@ -tls_server_config : - cert_file : "server.crt" - key_file : "server.key" +tls_server_config: + cert_file: "server.crt" + key_file: "server.key" basic_auth_users: alice: $2y$12$1DpfPeqF9HzHJt.EWswy1exHluGfbhnn3yXhR7Xes6m3WJqFg0Wby bob: $2y$18$4VeFDzXIoPHKnKTU3O3GH.N.vZu06CVqczYZ8WvfzrddFU6tGqjR. diff --git a/web/web-config.yml b/web/web-config.yml index 7d40d9b7..984aa0db 100644 --- a/web/web-config.yml +++ b/web/web-config.yml @@ -3,4 +3,3 @@ tls_server_config: cert_file: server.crt key_file: server.key -