From 26d7cd4730ea43be434235f733592e6a865bb912 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alby=20Hern=C3=A1ndez?= Date: Tue, 30 Jun 2026 21:11:26 +0100 Subject: [PATCH] chore: add SPDX Apache-2.0 license headers to source files Use the two-line SPDX header (SPDX-FileCopyrightText + SPDX-License-Identifier: Apache-2.0) in every source file, replacing any longer Apache boilerplate. Comments-only. --- cmd/main.go | 3 +++ internal/celenv/data.go | 3 +++ internal/celenv/encoding.go | 3 +++ internal/celenv/env.go | 3 +++ internal/celenv/env_test.go | 3 +++ internal/celenv/http.go | 3 +++ internal/celenv/net.go | 3 +++ internal/celenv/strings.go | 3 +++ internal/celenv/time.go | 3 +++ internal/configwatch/watch.go | 3 +++ internal/configwatch/watch_test.go | 3 +++ internal/facts/facts.go | 3 +++ internal/facts/facts_test.go | 3 +++ internal/grpcserver/server.go | 3 +++ internal/grpcserver/server_test.go | 3 +++ internal/httpserver/access.go | 3 +++ internal/httpserver/access_test.go | 3 +++ internal/httpserver/metrics.go | 3 +++ internal/httpserver/server.go | 3 +++ internal/httpserver/server_test.go | 3 +++ internal/jsonpath/jsonpath.go | 3 +++ internal/log/log.go | 3 +++ internal/policy/extproc.go | 3 +++ internal/policy/extproc_test.go | 3 +++ internal/policy/policy.go | 3 +++ internal/policy/policy_facts_test.go | 3 +++ internal/policy/policy_test.go | 3 +++ 27 files changed, 81 insertions(+) diff --git a/cmd/main.go b/cmd/main.go index d8e5efb..ee0d00a 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + // request-validator is a generic ext-authz HTTP service that decides // allow / deny for incoming requests based on a declarative YAML policy. // diff --git a/internal/celenv/data.go b/internal/celenv/data.go index 06d7021..012a7be 100644 --- a/internal/celenv/data.go +++ b/internal/celenv/data.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + package celenv import ( diff --git a/internal/celenv/encoding.go b/internal/celenv/encoding.go index cb20fd8..66628e5 100644 --- a/internal/celenv/encoding.go +++ b/internal/celenv/encoding.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + package celenv import ( diff --git a/internal/celenv/env.go b/internal/celenv/env.go index 2a92025..04f4342 100644 --- a/internal/celenv/env.go +++ b/internal/celenv/env.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + // Package celenv builds the CEL environment used by request-validator // policies, registers the custom functions and provides a program cache. package celenv diff --git a/internal/celenv/env_test.go b/internal/celenv/env_test.go index 0b9278c..b228d43 100644 --- a/internal/celenv/env_test.go +++ b/internal/celenv/env_test.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + package celenv import ( diff --git a/internal/celenv/http.go b/internal/celenv/http.go index e05587f..642679d 100644 --- a/internal/celenv/http.go +++ b/internal/celenv/http.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + package celenv import ( diff --git a/internal/celenv/net.go b/internal/celenv/net.go index 4256427..e385c53 100644 --- a/internal/celenv/net.go +++ b/internal/celenv/net.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + package celenv import ( diff --git a/internal/celenv/strings.go b/internal/celenv/strings.go index f4c6fc6..ac735ce 100644 --- a/internal/celenv/strings.go +++ b/internal/celenv/strings.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + package celenv import ( diff --git a/internal/celenv/time.go b/internal/celenv/time.go index 0cff446..314c52b 100644 --- a/internal/celenv/time.go +++ b/internal/celenv/time.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + package celenv import ( diff --git a/internal/configwatch/watch.go b/internal/configwatch/watch.go index 352303b..0f92939 100644 --- a/internal/configwatch/watch.go +++ b/internal/configwatch/watch.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + // Package configwatch watches a single configuration file for changes and // invokes a callback whenever the file is rewritten. // diff --git a/internal/configwatch/watch_test.go b/internal/configwatch/watch_test.go index 732a0aa..203a3d3 100644 --- a/internal/configwatch/watch_test.go +++ b/internal/configwatch/watch_test.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + package configwatch import ( diff --git a/internal/facts/facts.go b/internal/facts/facts.go index fe8c795..ba091eb 100644 --- a/internal/facts/facts.go +++ b/internal/facts/facts.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + // Package facts owns the "facts" feature of the policy DSL. // // A `facts` entry is a named value that policies can reference from any CEL diff --git a/internal/facts/facts_test.go b/internal/facts/facts_test.go index 04d021b..df283a0 100644 --- a/internal/facts/facts_test.go +++ b/internal/facts/facts_test.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + package facts import ( diff --git a/internal/grpcserver/server.go b/internal/grpcserver/server.go index ef5ec9c..1105a95 100644 --- a/internal/grpcserver/server.go +++ b/internal/grpcserver/server.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + // Package grpcserver implements the Envoy external processing (ext_proc) gRPC server. package grpcserver diff --git a/internal/grpcserver/server_test.go b/internal/grpcserver/server_test.go index bfab854..008e223 100644 --- a/internal/grpcserver/server_test.go +++ b/internal/grpcserver/server_test.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + package grpcserver import ( diff --git a/internal/httpserver/access.go b/internal/httpserver/access.go index 0bf48ed..2ece4cd 100644 --- a/internal/httpserver/access.go +++ b/internal/httpserver/access.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + package httpserver import ( diff --git a/internal/httpserver/access_test.go b/internal/httpserver/access_test.go index e93c4e2..a8760cc 100644 --- a/internal/httpserver/access_test.go +++ b/internal/httpserver/access_test.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + package httpserver import ( diff --git a/internal/httpserver/metrics.go b/internal/httpserver/metrics.go index 66498cc..6514b71 100644 --- a/internal/httpserver/metrics.go +++ b/internal/httpserver/metrics.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + package httpserver import ( diff --git a/internal/httpserver/server.go b/internal/httpserver/server.go index 2dc501d..783b183 100644 --- a/internal/httpserver/server.go +++ b/internal/httpserver/server.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + // Package httpserver exposes the ext-authz HTTP endpoint. // // Envoy/Istio is expected to forward the original downstream request to this diff --git a/internal/httpserver/server_test.go b/internal/httpserver/server_test.go index 2954c0e..58f538b 100644 --- a/internal/httpserver/server_test.go +++ b/internal/httpserver/server_test.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + package httpserver import ( diff --git a/internal/jsonpath/jsonpath.go b/internal/jsonpath/jsonpath.go index 5088c52..cc1925c 100644 --- a/internal/jsonpath/jsonpath.go +++ b/internal/jsonpath/jsonpath.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + // Package jsonpath implements a tiny subset of JSONPath used by request-validator. // // Supported syntax (a deliberate, minimal subset): diff --git a/internal/log/log.go b/internal/log/log.go index fd0a8ed..5e6252e 100644 --- a/internal/log/log.go +++ b/internal/log/log.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + // Package log is a thin wrapper around log/slog that gives the rest of the // project a single, opinionated logger. // diff --git a/internal/policy/extproc.go b/internal/policy/extproc.go index b6afafe..8d1000c 100644 --- a/internal/policy/extproc.go +++ b/internal/policy/extproc.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + package policy import ( diff --git a/internal/policy/extproc_test.go b/internal/policy/extproc_test.go index 526ac40..f0263c7 100644 --- a/internal/policy/extproc_test.go +++ b/internal/policy/extproc_test.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + package policy import ( diff --git a/internal/policy/policy.go b/internal/policy/policy.go index 52a69ec..2b4c20d 100644 --- a/internal/policy/policy.go +++ b/internal/policy/policy.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + package policy import ( diff --git a/internal/policy/policy_facts_test.go b/internal/policy/policy_facts_test.go index e0cb5df..3391534 100644 --- a/internal/policy/policy_facts_test.go +++ b/internal/policy/policy_facts_test.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + package policy import ( diff --git a/internal/policy/policy_test.go b/internal/policy/policy_test.go index 0fb4236..54ac51e 100644 --- a/internal/policy/policy_test.go +++ b/internal/policy/policy_test.go @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2026 Alby Hernández +// SPDX-License-Identifier: Apache-2.0 + package policy import (