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

Backport of NET-5397 - wire up destination golden tests from sidecar-proxy controller for xds controller and xdsv2 into release/1.17.x #19350

Merged
Merged
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
20d1fb8
server: run the api checks against the path without params (#19205)
rboyer Oct 13, 2023
3d1a606
Clone proto into deepcopy correctly (#19204)
thisisnotashwin Oct 13, 2023
9b0f4b7
chore: update version and nightly CI for 1.17 (#19208)
zalimeni Oct 13, 2023
e94d6ce
mesh: add validation hook to proxy configuration (#19186)
ishustava Oct 13, 2023
2ea33e9
mesh: add more validations to Destinations resource (#19202)
ishustava Oct 13, 2023
105ebfd
catalog, mesh: implement missing ACL hooks (#19143)
ishustava Oct 13, 2023
a7fbd00
NET-5073 - ProxyConfiguration: implement various connection options (…
jmurret Oct 14, 2023
3716b69
Relplat 897 copywrite bot workarounds (#19200)
modrake Oct 16, 2023
6c7d075
mesh: add xRoute ACL hook tenancy tests (#19177)
rboyer Oct 16, 2023
ad17769
resource: enforce lowercase v2 resource names (#19218)
analogue Oct 16, 2023
df8ea43
mesh: add DestinationPolicy ACL hook tenancy tests (#19178)
rboyer Oct 16, 2023
6741392
catalog: add FailoverPolicy ACL hook tenancy test (#19179)
rboyer Oct 16, 2023
dcd5930
docs: Multi-port corrections (#19224)
boruszak Oct 16, 2023
b81c862
Add reason why port 53 is not used by default (#19222)
Oct 16, 2023
4c5a46e
v2tenancy: rename v1alpha1 -> v2beta1 (#19227)
analogue Oct 16, 2023
8eb074e
[NET-5944] security: Update Go version to 1.20.10 and `x/net` to 0.17…
zalimeni Oct 16, 2023
9f4f99c
NET-6097 - sidecar proxy controller - give name to first failover pol…
jmurret Oct 17, 2023
a6c990c
Cc 5545: Upgrade HDS packages and modifiers (#19226)
chris-hut Oct 17, 2023
b78465b
[NET-5810] CE changes for multiple virtual hosts (#19246)
jm96441n Oct 17, 2023
61bd08c
Net 4893- Ensure we're testing all the latest versions of Vault/Nomad…
sophie-gairo Oct 17, 2023
9976e08
docs: Fix example control-plane-request-limit HCL and JSON (#19105)
blake Oct 17, 2023
9b719e6
test: add 1.17 nightly integrations test (#19253)
DanStough Oct 17, 2023
51b58cd
fix expose paths (#19257)
ndhanushkodi Oct 17, 2023
c4d6d4d
docs: Multiport HCP constraint update (#19261)
boruszak Oct 17, 2023
16f0a24
docs: Fix multi-port install (#19262)
Oct 17, 2023
f45be22
Prevent circular dependencies between v2 resources and generate a mer…
erichaberkorn Oct 18, 2023
a94c013
build(docker): always publish full and minor version tags for dev ima…
DanStough Oct 18, 2023
d52ee6a
fix nightly integration test: envoy version and n-2 version (#19286)
huikang Oct 18, 2023
5e517c5
[NET-6221] Ensure LB policy set for locality-aware routing (CE) (#19283)
zalimeni Oct 19, 2023
2bd38d8
fix: allow snake case keys for ip based rate limit config entry (#19277)
JadhavPoonam Oct 19, 2023
e5a49bf
reformatted the JSON schema server conf ref (#19288)
trujillo-adam Oct 19, 2023
dfea3a0
acls,catalog,mesh: properly authorize workload selectors on writes (#…
ishustava Oct 19, 2023
ef27bc2
NET-6239: Temporarily disable verify envoy check (#19299)
NiniOak Oct 19, 2023
681aef3
Update supported Envoy versions (#19276)
cthain Oct 19, 2023
def66dd
mesh: provide missing domain to route configurations in ProxyStateTem…
ndhanushkodi Oct 19, 2023
6ffcf28
enable verify envoy script (#19303)
NiniOak Oct 19, 2023
9d00b13
Vault CA bugfixes (#19285)
Oct 20, 2023
b1871fd
Backout Envoy 1.28.0 (#19306)
cthain Oct 20, 2023
1280f45
added ent to ce downgrade changes (#19311)
aahel Oct 20, 2023
b962d91
skip envoy version check in ci (#19315)
NiniOak Oct 20, 2023
d5c9f11
Tenancy Bridge v2 (#19220)
dhiaayachi Oct 20, 2023
27f649c
remove branch name causing conflicts (#19319)
NiniOak Oct 20, 2023
809bf1d
mesh: ensure route configs are named uniquely per port (#19323)
ishustava Oct 20, 2023
46804c0
[NET-5327] Templated policies api/cli docs (#19270)
roncodingenthusiast Oct 23, 2023
fea35e6
More templated policies docs (#19312)
roncodingenthusiast Oct 23, 2023
62dec7e
Fixing docs to add more templated policies references (#19335)
roncodingenthusiast Oct 23, 2023
ee2f046
Upgrade Consul UI to Node 18 (#19252)
chris-hut Oct 23, 2023
96606d1
resource: default peername to local in list endpoints (#19340)
analogue Oct 23, 2023
f142c77
NET-5397 - wire up golden tests from sidecar-proxy controller for xds…
jmurret Oct 12, 2023
79eadd1
WIP
jmurret Oct 13, 2023
d269c63
WIP
jmurret Oct 13, 2023
532aad4
everything matching except leafCerts. need to mock those
jmurret Oct 16, 2023
2de83d4
single port destinations working except mixed destinations
jmurret Oct 16, 2023
c8af477
golden test input to xds controller tests for destinations
jmurret Oct 16, 2023
8822109
proposed fix for failover group naming errors
jmurret Oct 16, 2023
6a1e6c3
clean up test to use helper.
jmurret Oct 16, 2023
f8c81b6
clean up test to use helper.
jmurret Oct 16, 2023
ec5af3c
fix test file
jmurret Oct 16, 2023
854a6e1
add docstring for test function.
jmurret Oct 16, 2023
2b01f73
add docstring for test function.
jmurret Oct 16, 2023
b5fa4f2
fix linting error
jmurret Oct 17, 2023
bc9e8ec
backport of commit b5fa4f29c8f606ee91f0f6df35462564d1521070
jmurret Oct 17, 2023
71a3b1e
Merge b5fa4f29c8f606ee91f0f6df35462564d1521070 into backport/jm/NET-5…
hc-github-team-consul-core Oct 24, 2023
7a78096
backport of commit e7ff94b3a6cdc04a9d31f14781ef39d6ab309c48
jmurret Oct 24, 2023
4b50698
Merge branch 'release/1.17.x' into backport/jm/NET-5397/only-still-goose
jmurret Oct 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changelog/19225.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
```release-note:security
Upgrade Go to 1.20.10.
This resolves vulnerability [CVE-2023-39325](https://nvd.nist.gov/vuln/detail/CVE-2023-39325)
/ [CVE-2023-44487](https://nvd.nist.gov/vuln/detail/CVE-2023-44487)(`net/http`).
```
```release-note:security
Update `golang.org/x/net` to v0.17.0 to address [CVE-2023-39325](https://nvd.nist.gov/vuln/detail/CVE-2023-39325)
/ [CVE-2023-44487](https://nvd.nist.gov/vuln/detail/CVE-2023-44487)(`x/net/http2`).
```
3 changes: 3 additions & 0 deletions .changelog/19274.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:security
connect: update supported envoy versions to 1.24.12, 1.25.11, 1.26.6, 1.27.2 to address [CVE-2023-44487](https://github.com/envoyproxy/envoy/security/advisories/GHSA-jhv4-f7mr-xx76)
```
7 changes: 7 additions & 0 deletions .changelog/19285.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```release-note:bug
ca: Fix bug with Vault CA provider where token renewal goroutines could leak if CA failed to initialize.
```

```release-note:bug
ca: Fix bug with Vault CA provider where renewing a retracted token would cause retries in a tight loop, degrading performance.
```
4 changes: 4 additions & 0 deletions .changelog/19339.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```release-note:bug
connect: Fix bug where uncleanly closed xDS connections would influence connection balancing for too long and prevent envoy instances from starting. Two new configuration fields
`performance.grpc_keepalive_timeout` and `performance.grpc_keepalive_interval` now exist to allow for configuration on how often these dead connections will be cleaned up.
```
3 changes: 3 additions & 0 deletions .changelog/_7406.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
server: **(Enterprise Only)** Fixed an issue where snake case keys were rejected when configuring the control-plane-request-limit config entry
```
14 changes: 9 additions & 5 deletions .github/scripts/verify_envoy_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

set -euo pipefail

current_branch=$GITHUB_REF
current_branch=$GITHUB_REF_NAME
GITHUB_DEFAULT_BRANCH='main'

if [ -z "$GITHUB_TOKEN" ]; then
Expand All @@ -13,10 +13,15 @@ if [ -z "$GITHUB_TOKEN" ]; then
fi

if [ -z "$current_branch" ]; then
echo "GITHUB_REF must be set"
echo "GITHUB_REF_NAME must be set"
exit 1
fi

if [[ "$SKIP_VERIFY_ENVOY_VERSION" = "true" ]]; then
echo -e "*************** VERIFY ENVOY VERSION IS DISABLED. To enable, update environment variable in Github settings *****************"
exit 0
fi

# Get Consul and Envoy version
SCRIPT_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
pushd $SCRIPT_DIR/../.. # repository root
Expand Down Expand Up @@ -76,7 +81,6 @@ released_envoy_version=$(get_latest_envoy_version)
major_released_envoy_version="${released_envoy_version[@]:1:4}"

validate_envoy_version_main(){
echo "verify "main" GitHub branch has latest envoy version"
# Get envoy version for current branch
ENVOY_VERSIONS=$(sanitize_consul_envoy_version | awk '{print $2}' | tr ',' ' ')
envoy_version_main_branch=$(get_major_version ${ENVOY_VERSIONS})
Expand Down Expand Up @@ -118,8 +122,8 @@ echo checking out branch: "${current_branch}"
git checkout "${current_branch}"

echo
echo "Branch ${current_branch} =>Consul version: ${CONSUL_VERSION}; Envoy Version: ${ENVOY_VERSIONS}"
echo "Branch ${GITHUB_DEFAULT_BRANCH} =>Consul version: ${CONSUL_VERSION_DEFAULT_BRANCH}; Envoy Version: ${ENVOY_VERSIONS_DEFAULT_BRANCH}"
echo "Branch ${current_branch} => Consul version: ${CONSUL_VERSION}; Envoy Version: ${ENVOY_VERSIONS}"
echo "Branch ${GITHUB_DEFAULT_BRANCH} => Consul version: ${CONSUL_VERSION_DEFAULT_BRANCH}; Envoy Version: ${ENVOY_VERSIONS_DEFAULT_BRANCH}"

## Get major Consul and Envoy versions on release and default branch
MAJOR_CONSUL_VERSION=$(get_major_version ${CONSUL_VERSION})
Expand Down
49 changes: 29 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ jobs:
shared-ldflags: ${{ steps.shared-ldflags.outputs.shared-ldflags }}
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
# action-set-product-version implicitly sets fields like 'product-version' using version/VERSION
# https://github.com/hashicorp/actions-set-product-version
- name: set product version
id: set-product-version
uses: hashicorp/actions-set-product-version@v1
- name: get product version
id: get-product-version
run: |
CONSUL_DATE=$(build-support/scripts/build-date.sh)
## TODO: This assumes `make version` outputs 1.1.1+ent-prerel
echo "product-date=${CONSUL_DATE}" >> "$GITHUB_OUTPUT"

- name: Set shared -ldflags
Expand Down Expand Up @@ -85,15 +86,15 @@ jobs:
strategy:
matrix:
include:
- {go: "1.20.8", goos: "linux", goarch: "386"}
- {go: "1.20.8", goos: "linux", goarch: "amd64"}
- {go: "1.20.8", goos: "linux", goarch: "arm"}
- {go: "1.20.8", goos: "linux", goarch: "arm64"}
- {go: "1.20.8", goos: "freebsd", goarch: "386"}
- {go: "1.20.8", goos: "freebsd", goarch: "amd64"}
- {go: "1.20.8", goos: "windows", goarch: "386"}
- {go: "1.20.8", goos: "windows", goarch: "amd64"}
- {go: "1.20.8", goos: "solaris", goarch: "amd64"}
- {go: "1.20.10", goos: "linux", goarch: "386"}
- {go: "1.20.10", goos: "linux", goarch: "amd64"}
- {go: "1.20.10", goos: "linux", goarch: "arm"}
- {go: "1.20.10", goos: "linux", goarch: "arm64"}
- {go: "1.20.10", goos: "freebsd", goarch: "386"}
- {go: "1.20.10", goos: "freebsd", goarch: "amd64"}
- {go: "1.20.10", goos: "windows", goarch: "386"}
- {go: "1.20.10", goos: "windows", goarch: "amd64"}
- {go: "1.20.10", goos: "solaris", goarch: "amd64"}
fail-fast: true

name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build
Expand Down Expand Up @@ -182,7 +183,7 @@ jobs:
strategy:
matrix:
include:
- {go: "1.20.8", goos: "linux", goarch: "s390x"}
- {go: "1.20.10", goos: "linux", goarch: "s390x"}
fail-fast: true

name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build
Expand Down Expand Up @@ -233,7 +234,7 @@ jobs:
matrix:
goos: [ darwin ]
goarch: [ "amd64", "arm64" ]
go: [ "1.20.8" ]
go: [ "1.20.10" ]
fail-fast: true

name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build
Expand Down Expand Up @@ -299,8 +300,10 @@ jobs:
# This naming convention will be used ONLY for per-commit dev images
- name: Set docker dev tag
run: |
version="${{ env.version }}"
echo "dev_tag=${version%.*}-dev" >> $GITHUB_ENV
echo "full_dev_tag=${{ env.version }}"
echo "full_dev_tag=${{ env.version }}" >> $GITHUB_ENV
echo "minor_dev_tag=$(echo ${{ env.version }}| sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+(-[0-9a-zA-Z\+\.]+)?$/\1\2/')"
echo "minor_dev_tag=$(echo ${{ env.version }}| sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+(-[0-9a-zA-Z\+\.]+)?$/\1\2/')" >> $GITHUB_ENV

- name: Docker Build (Action)
uses: hashicorp/actions-docker-build@v1
Expand All @@ -312,8 +315,10 @@ jobs:
docker.io/hashicorp/${{env.repo}}:${{env.version}}
public.ecr.aws/hashicorp/${{env.repo}}:${{env.version}}
dev_tags: |
docker.io/hashicorppreview/${{ env.repo }}:${{ env.dev_tag }}
docker.io/hashicorppreview/${{ env.repo }}:${{ env.dev_tag }}-${{ github.sha }}
docker.io/hashicorppreview/${{ env.repo }}:${{ env.full_dev_tag }}
docker.io/hashicorppreview/${{ env.repo }}:${{ env.full_dev_tag }}-${{ github.sha }}
docker.io/hashicorppreview/${{ env.repo }}:${{ env.minor_dev_tag }}
docker.io/hashicorppreview/${{ env.repo }}:${{ env.minor_dev_tag }}-${{ github.sha }}
smoke_test: .github/scripts/verify_docker.sh v${{ env.version }}

build-docker-ubi-redhat:
Expand Down Expand Up @@ -353,8 +358,10 @@ jobs:
# This naming convention will be used ONLY for per-commit dev images
- name: Set docker dev tag
run: |
version="${{ env.version }}"
echo "dev_tag=${version%.*}-dev" >> $GITHUB_ENV
echo "full_dev_tag=${{ env.version }}"
echo "full_dev_tag=${{ env.version }}" >> $GITHUB_ENV
echo "minor_dev_tag=$(echo ${{ env.version }}| sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+(-[0-9a-zA-Z\+\.]+)?$/\1\2/')"
echo "minor_dev_tag=$(echo ${{ env.version }}| sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+(-[0-9a-zA-Z\+\.]+)?$/\1\2/')" >> $GITHUB_ENV

- uses: hashicorp/actions-docker-build@v1
with:
Expand All @@ -365,8 +372,10 @@ jobs:
docker.io/hashicorp/${{env.repo}}:${{env.version}}-ubi
public.ecr.aws/hashicorp/${{env.repo}}:${{env.version}}-ubi
dev_tags: |
docker.io/hashicorppreview/${{ env.repo }}:${{ env.dev_tag }}-ubi
docker.io/hashicorppreview/${{ env.repo }}:${{ env.dev_tag }}-ubi-${{ github.sha }}
docker.io/hashicorppreview/${{ env.repo }}:${{ env.full_dev_tag }}-ubi
docker.io/hashicorppreview/${{ env.repo }}:${{ env.full_dev_tag }}-ubi-${{ github.sha }}
docker.io/hashicorppreview/${{ env.repo }}:${{ env.minor_dev_tag }}-ubi
docker.io/hashicorppreview/${{ env.repo }}:${{ env.minor_dev_tag }}-ubi-${{ github.sha }}
smoke_test: .github/scripts/verify_docker.sh v${{ env.version }}

verify-linux:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly-test-integrations-1.15.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
# this is further going to multiplied in envoy-integration tests by the
# other dimensions in the matrix. Currently TOTAL_RUNNERS would be
# multiplied by 8 based on these values:
# envoy-version: ["1.22.11", "1.23.12", "1.24.10", "1.25.9"]
# envoy-version: ["1.22.11", "1.23.12", "1.24.12", "1.25.11"]
# xds-target: ["server", "client"]
TOTAL_RUNNERS: 4
JQ_SLICER: '[ inputs ] | [_nwise(length / $runnercount | floor)]'
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
strategy:
fail-fast: false
matrix:
envoy-version: ["1.22.11", "1.23.12", "1.24.10", "1.25.9"]
envoy-version: ["1.22.11", "1.23.12", "1.24.12", "1.25.11"]
xds-target: ["server", "client"]
test-cases: ${{ fromJSON(needs.generate-envoy-job-matrices.outputs.envoy-matrix) }}
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly-test-integrations-1.16.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
# this is further going to multiplied in envoy-integration tests by the
# other dimensions in the matrix. Currently TOTAL_RUNNERS would be
# multiplied by 8 based on these values:
# envoy-version: ["1.24.10", "1.25.9", "1.26.4", "1.27.0"]
# envoy-version: ["1.23.12", "1.24.12", "1.25.11", "1.26.6"]
# xds-target: ["server", "client"]
TOTAL_RUNNERS: 4
JQ_SLICER: '[ inputs ] | [_nwise(length / $runnercount | floor)]'
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
strategy:
fail-fast: false
matrix:
envoy-version: ["1.23.12", "1.24.10", "1.25.9", "1.26.4"]
envoy-version: ["1.23.12", "1.24.12", "1.25.11", "1.26.6"]
xds-target: ["server", "client"]
test-cases: ${{ fromJSON(needs.generate-envoy-job-matrices.outputs.envoy-matrix) }}
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly-test-integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
# this is further going to multiplied in envoy-integration tests by the
# other dimensions in the matrix. Currently TOTAL_RUNNERS would be
# multiplied by 8 based on these values:
# envoy-version: ["1.24.10", "1.25.9", "1.26.4", "1.27.0"]
# envoy-version: ["1.24.12", "1.25.11", "1.26.6", "1.27.2"]
# xds-target: ["server", "client"]
TOTAL_RUNNERS: 4
JQ_SLICER: '[ inputs ] | [_nwise(length / $runnercount | floor)]'
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
strategy:
fail-fast: false
matrix:
envoy-version: ["1.24.10", "1.25.9", "1.26.4", "1.27.0"]
envoy-version: ["1.24.12", "1.25.11", "1.26.6", "1.27.2"]
xds-target: ["server", "client"]
test-cases: ${{ fromJSON(needs.generate-envoy-job-matrices.outputs.envoy-matrix) }}
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-integrations-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
strategy:
fail-fast: false
matrix:
envoy-version: [ "1.27.0" ]
envoy-version: [ "1.27.2" ]
xds-target: [ "server", "client" ]
env:
ENVOY_VERSION: ${{ matrix.envoy-version }}
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/test-integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ jobs:
contents: read
strategy:
matrix:
nomad-version: ['v1.6.1', 'v1.5.8', 'v1.4.12']
nomad-version: ['v1.6.2', 'v1.5.9', 'v1.4.13']

steps:
- name: Checkout Nomad
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
Expand Down Expand Up @@ -159,7 +160,7 @@ jobs:
contents: read
strategy:
matrix:
vault-version: ["1.14.1", "1.13.5", "1.12.9", "1.11.12"]
vault-version: ["1.15.0", "1.14.4", "1.13.8", "1.12.11"]
env:
VAULT_BINARY_VERSION: ${{ matrix.vault-version }}
steps:
Expand Down Expand Up @@ -259,8 +260,8 @@ jobs:
env:
# this is further going to multiplied in envoy-integration tests by the
# other dimensions in the matrix. Currently TOTAL_RUNNERS would be
# multiplied by 8 based on these values:
# envoy-version: ["1.24.10", "1.25.9", "1.26.4", "1.27.0"]
# multiplied by 2 based on these values:
# envoy-version: ["1.27.2"]
# xds-target: ["server", "client"]
TOTAL_RUNNERS: 4
JQ_SLICER: '[ inputs ] | [_nwise(length / $runnercount | floor)]'
Expand Down Expand Up @@ -294,7 +295,7 @@ jobs:
strategy:
fail-fast: false
matrix:
envoy-version: ["1.27.0"]
envoy-version: ["1.27.2"]
xds-target: ["server", "client"]
test-cases: ${{ fromJSON(needs.generate-envoy-job-matrices.outputs.envoy-matrix) }}
env:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/verify-envoy-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
- main
- release/**

env:
SKIP_VERIFY_ENVOY_VERSION: ${{ vars.SKIP_VERIFY_ENVOY_VERSION }}

jobs:
verify-envoy-version:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,9 @@ codegen: codegen-tools ## Deep copy
@$(SHELL) $(CURDIR)/agent/consul/state/deep-copy.sh
@$(SHELL) $(CURDIR)/agent/config/deep-copy.sh
copywrite headers
# Special case for MPL headers in /api and /sdk
cd api && $(CURDIR)/build-support/scripts/copywrite-exceptions.sh
cd sdk && $(CURDIR)/build-support/scripts/copywrite-exceptions.sh

print-% : ; @echo $($*) ## utility to echo a makefile variable (i.e. 'make print-GOPATH')

Expand Down
5 changes: 5 additions & 0 deletions acl/MockAuthorizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,11 @@ func (m *MockAuthorizer) ServiceReadAll(ctx *AuthorizerContext) EnforcementDecis
return ret.Get(0).(EnforcementDecision)
}

func (m *MockAuthorizer) ServiceReadPrefix(prefix string, ctx *AuthorizerContext) EnforcementDecision {
ret := m.Called(ctx)
return ret.Get(0).(EnforcementDecision)
}

// ServiceWrite checks for permission to create or update a given
// service
func (m *MockAuthorizer) ServiceWrite(segment string, ctx *AuthorizerContext) EnforcementDecision {
Expand Down
12 changes: 12 additions & 0 deletions acl/acl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,14 @@ func checkDenyServiceReadAll(t *testing.T, authz Authorizer, _ string, entCtx *A
require.Equal(t, Deny, authz.ServiceReadAll(entCtx))
}

func checkAllowServiceReadPrefix(t *testing.T, authz Authorizer, prefix string, entCtx *AuthorizerContext) {
require.Equal(t, Allow, authz.ServiceReadPrefix(prefix, entCtx))
}

func checkDenyServiceReadPrefix(t *testing.T, authz Authorizer, prefix string, entCtx *AuthorizerContext) {
require.Equal(t, Deny, authz.ServiceReadPrefix(prefix, entCtx))
}

func checkDenyServiceWrite(t *testing.T, authz Authorizer, prefix string, entCtx *AuthorizerContext) {
require.Equal(t, Deny, authz.ServiceWrite(prefix, entCtx))
}
Expand Down Expand Up @@ -456,6 +464,10 @@ func checkDefaultServiceReadAll(t *testing.T, authz Authorizer, _ string, entCtx
require.Equal(t, Default, authz.ServiceReadAll(entCtx))
}

func checkDefaultServiceReadPrefix(t *testing.T, authz Authorizer, prefix string, entCtx *AuthorizerContext) {
require.Equal(t, Default, authz.ServiceReadPrefix(prefix, entCtx))
}

func checkDefaultServiceWrite(t *testing.T, authz Authorizer, prefix string, entCtx *AuthorizerContext) {
require.Equal(t, Default, authz.ServiceWrite(prefix, entCtx))
}
Expand Down
11 changes: 11 additions & 0 deletions acl/authorizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ type Authorizer interface {
// ServiceReadAll checks for permission to read all services
ServiceReadAll(*AuthorizerContext) EnforcementDecision

// ServiceReadPrefix checks for permission to read services within the given prefix.
ServiceReadPrefix(string, *AuthorizerContext) EnforcementDecision

// ServiceWrite checks for permission to create or update a given
// service
ServiceWrite(string, *AuthorizerContext) EnforcementDecision
Expand Down Expand Up @@ -507,6 +510,14 @@ func (a AllowAuthorizer) ServiceReadAllAllowed(ctx *AuthorizerContext) error {
return nil
}

// ServiceReadPrefixAllowed checks for permission to read services within the given prefix
func (a AllowAuthorizer) ServiceReadPrefixAllowed(prefix string, ctx *AuthorizerContext) error {
if a.Authorizer.ServiceReadPrefix(prefix, ctx) != Allow {
return PermissionDeniedByACL(a, ctx, ResourceService, AccessRead, prefix) // read
}
return nil
}

// ServiceWriteAllowed checks for permission to create or update a given
// service
func (a AllowAuthorizer) ServiceWriteAllowed(name string, ctx *AuthorizerContext) error {
Expand Down
6 changes: 6 additions & 0 deletions acl/chained_authorizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,12 @@ func (c *ChainedAuthorizer) ServiceReadAll(entCtx *AuthorizerContext) Enforcemen
})
}

func (c *ChainedAuthorizer) ServiceReadPrefix(prefix string, entCtx *AuthorizerContext) EnforcementDecision {
return c.executeChain(func(authz Authorizer) EnforcementDecision {
return authz.ServiceReadPrefix(prefix, entCtx)
})
}

// ServiceWrite checks for permission to create or update a given
// service
func (c *ChainedAuthorizer) ServiceWrite(name string, entCtx *AuthorizerContext) EnforcementDecision {
Expand Down
3 changes: 3 additions & 0 deletions acl/chained_authorizer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ func (authz testAuthorizer) ServiceRead(string, *AuthorizerContext) EnforcementD
func (authz testAuthorizer) ServiceReadAll(*AuthorizerContext) EnforcementDecision {
return EnforcementDecision(authz)
}
func (authz testAuthorizer) ServiceReadPrefix(string, *AuthorizerContext) EnforcementDecision {
return EnforcementDecision(authz)
}
func (authz testAuthorizer) ServiceWrite(string, *AuthorizerContext) EnforcementDecision {
return EnforcementDecision(authz)
}
Expand Down
Loading
Loading