Skip to content

Backport of Fix audit log parse error into release/1.1.x#2917

Closed
hc-github-team-consul-core wants to merge 303 commits intorelease/1.1.xfrom
backport/net-5513/fix-integer/jolly-many-walrus
Closed

Backport of Fix audit log parse error into release/1.1.x#2917
hc-github-team-consul-core wants to merge 303 commits intorelease/1.1.xfrom
backport/net-5513/fix-integer/jolly-many-walrus

Conversation

@hc-github-team-consul-core
Copy link
Copy Markdown
Collaborator

Backport

This PR is auto-generated from #2905 to be assessed for backporting due to the inclusion of the label backport/1.1.x.

The below text is copied from the body of the original PR.


Changes proposed in this PR:

  • Fixes a bug in parsing the following audit log helm configuration
server:
  auditLogs:
      enabled: true
      sinks:
        - name: My Sink
          type: file
          format: json
          path: /tmp/audit.json
          delivery_guarantee: best-effort
          rotate_duration: 24h
          rotate_max_files: 15
          rotate_bytes: 25165824

where rotate_max_files and rotate_bytes get passed as string inputs to the server configuration file. This PR makes sure to perform special handling for rotate_max_files and rotate_bytes where they don't get passed with quotes.

Generated config (Before the fix)

    {
      "audit": {
        "enabled": true,
        "sink": {
          "MySink": {
              "delivery_guarantee": "best-effort",
              "format": "json",
              "path": "/tmp/audit.json",
              "rotate_bytes": "12455355", // note the presence of braces here
              "rotate_duration": "24h",
              "rotate_max_files": "20",
              "type": "file"
          }
        }
      }
    }

Generated config (After the fix)

    {
      "audit": {
        "enabled": true,
        "sink": {
          "MySink": {
              "delivery_guarantee": "best-effort",
              "format": "json",
              "path": "/tmp/audit.json",
              "rotate_bytes": 12455355, // note the absence of braces here
              "rotate_duration": "24h",
              "rotate_max_files": 20,
              "type": "file"
          }
        }
      }
    }

How I've tested this PR:

  1. CI
  2. Verified manually that the server no longer crashes with this issue.

How I expect reviewers to test this PR:

👀

Checklist:


Overview of commits

Maliz and others added 30 commits April 4, 2023 11:42
…xy-default

add failover policy to service resolver and proxy default
* Terraform: increase node sizes
* update GKE to use already created subnets
* Dispatch: dispatch to consul-k8s-workflows
* Update status on PRs
* Split pr and push into 2 different files so that context can be passed through
* Add a cleanup cron job
* draft of adding sameness group CRD

* move sameness group tests to ent test file

* update tests

* fix lint issues

* generate yaml and update helm charts

* update field descriptions and validation and its test

* remove unwanted files, add license comments back

* rename samenessgroups to samenessgroup

* fix resource names

* update failing unit test
* Fix Sync Catalog ACL Token Environment Var Name
* Update ACL variable name in tests
* add sameness group to exported services

* update CRDs

* update deep copy

* re add license line

* check if sameness group is wildcard

* remove experimental tag on peering fields

* update error message case

* update error message case in webhook test
…figured as secrets backend (#2083)

* Adjust mount based on whether Vault is enabled as secrets backend

* Add changelog entry

* Improve wording of changelog entry

* Use Vault serverca for CONSUL_CACERT when secrets backend enabled

* Add comment to Helm template explaining logic

* Add unit test for CONSUL_CACERT with Vault secret path

* Add unit tests for removing mounts when Vault is secrets backend
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
* add sameness group to service resolver, update manifests

* get the latest api and update acceptance tests

* get the latest api in acceptanc tests

* update validation code, remove dynamic validations, update tests

* check nil pointer

* go get latest api

* revert acceptance changes
* add sameness group to source intention

* add more test coverage

* add comment on metaValueMaxLength variable

* fix comment lint issue
* Add MaxEjectionPercent and BaseEjectionTime to servicedefaults

* test with sister branch in consul repo

* missed one

* fix tag names

* fix json tags and duration type

* update test

* generate yaml files and fix imports

---------

Co-authored-by: Semir Patel <semir.patel@hashicorp.com>
DanStough and others added 22 commits August 25, 2023 16:55
refator: make space for v2 controllers
Revert "Add readOnlyRootFilesystem to security context (#2771) (#2789)"

This reverts commit b75d803.
* Update comments on Deployment

* Move resources into managedGatewayClass

* Add resource configuration to GatewayClassConfig

* Regenerate CRDs

* Pass resource configuration into the gateway-resources-job

* Pull in resources from GatewayClassConfig

* Add flag for resources in `gateway-resources` subcommand

* Clean up some comments in existing code

* Add gateway-resources configmap

* Load configmap into gateway-resources job

* Load resources from json

* Update CRDs

* Read resources in from the configmap

* Add BATs for Gateway Resources Configmap

* Add Changelog

* Fix unquoted value in BATs

* Fix how resources.json is read

* Fix BATs errors for real

* Fix seg fault bug

* Fix reading of resources file

* Quote "$actual"

* Fix zsh/sh differences in BATs

* Update control-plane/api-gateway/common/helm_config.go

Co-authored-by: Nathan Coleman <nathan.coleman@hashicorp.com>

* Move resources into DeploymentSpec

* Remove extra split in crds

---------

Co-authored-by: Nathan Coleman <nathan.coleman@hashicorp.com>
* correct prometheus port and scheme annotations if tls is enabled
…iceDefault CRDs (#2796)

Co-authored-by: Andrew Stucki <andrew.stucki@hashicorp.com>
* added check if anonymous token policy exists

* changed checkIfAnonymousTokenPolicyExists impl

* made consts private

* added test for configureAnonymousPolicy

* fixed unit test

* fixed test and minor refactoring

* fix typo

* changed some var names

* added changelog
* enable argocd

* adds bats test and setting argo annotations if global.argocd.enabled = true

* update comment

* added change log

* Update charts/consul/templates/gateway-cleanup-job.yaml

Co-authored-by: Ganesh S <ganesh.seetharaman@hashicorp.com>

* comments fixes

* fix line diff

* change log fix

* fix comment

* Update .changelog/2785.txt

Co-authored-by: Luke Kysow <1034429+lkysow@users.noreply.github.com>

---------

Co-authored-by: Ganesh S <ganesh.seetharaman@hashicorp.com>
Co-authored-by: Luke Kysow <1034429+lkysow@users.noreply.github.com>
* Update values.yaml

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>
… from Gateway Resources Jobs (#2869)

* Remove  and  from Gateway Resources Jobs

* changelog

* Remove acl annotations from gateway resources unit tests
…nnect (#2880)

* Reduce api-gateway logging
* add changelog
* removed deprecated `patchesStrategicMerge`

* fixed some extra whitespace
…eployments (#2890)

Add NET_BIND_SERVICE to built-in PSPs for consul-dataplane deployments
* feat: add v2 pod controller w/ workload lifecycle
@david-yu
Copy link
Copy Markdown
Contributor

david-yu commented Sep 7, 2023

Looks like this failed, and needs a manual backport.

@Ganeshrockz Ganeshrockz closed this Sep 8, 2023
auto-merge was automatically disabled September 8, 2023 06:02

Pull request was closed

@github-actions github-actions bot deleted the backport/net-5513/fix-integer/jolly-many-walrus branch September 1, 2025 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.