From 3e887f5eaa384e4c1109b603876f45fd92e2dfd9 Mon Sep 17 00:00:00 2001
From: Josh Black <raskchanky@gmail.com>
Date: Thu, 26 Oct 2023 15:04:14 -0700
Subject: [PATCH 1/3] listing should only require keys

---
 physical/etcd/etcd3.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/physical/etcd/etcd3.go b/physical/etcd/etcd3.go
index 5529ac270647..3182f2d83c96 100644
--- a/physical/etcd/etcd3.go
+++ b/physical/etcd/etcd3.go
@@ -14,7 +14,7 @@ import (
 	"sync"
 	"time"
 
-	metrics "github.com/armon/go-metrics"
+	"github.com/armon/go-metrics"
 	log "github.com/hashicorp/go-hclog"
 	"github.com/hashicorp/go-secure-stdlib/parseutil"
 	"github.com/hashicorp/go-secure-stdlib/strutil"
@@ -247,7 +247,7 @@ func (c *EtcdBackend) List(ctx context.Context, prefix string) ([]string, error)
 	ctx, cancel := context.WithTimeout(context.Background(), c.requestTimeout)
 	defer cancel()
 	prefix = path.Join(c.path, prefix) + "/"
-	resp, err := c.etcd.Get(ctx, prefix, clientv3.WithPrefix())
+	resp, err := c.etcd.Get(ctx, prefix, clientv3.WithPrefix(), clientv3.WithKeysOnly())
 	if err != nil {
 		return nil, err
 	}

From 8c29df56f17d8eb6af7ab3755afd5e6d7fd1ab8b Mon Sep 17 00:00:00 2001
From: Josh Black <raskchanky@gmail.com>
Date: Thu, 26 Oct 2023 15:09:13 -0700
Subject: [PATCH 2/3] correct misspelling

---
 physical/etcd/etcd3_test.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/physical/etcd/etcd3_test.go b/physical/etcd/etcd3_test.go
index bdb086f8e07f..7af1ecd7163e 100644
--- a/physical/etcd/etcd3_test.go
+++ b/physical/etcd/etcd3_test.go
@@ -26,7 +26,7 @@ func TestEtcd3Backend(t *testing.T) {
 		"username": "root",
 		"password": "insecure",
 
-		// Syncing adverticed client urls should be disabled since docker port mapping confuses the client.
+		// Syncing advertised client urls should be disabled since docker port mapping confuses the client.
 		"sync": "false",
 	}
 

From 62afcb336e1469c2ab85c90dd3bc2ce0708f657f Mon Sep 17 00:00:00 2001
From: Josh Black <raskchanky@gmail.com>
Date: Thu, 26 Oct 2023 15:11:58 -0700
Subject: [PATCH 3/3] add changelog

---
 changelog/23872.txt | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 changelog/23872.txt

diff --git a/changelog/23872.txt b/changelog/23872.txt
new file mode 100644
index 000000000000..b486fd258a80
--- /dev/null
+++ b/changelog/23872.txt
@@ -0,0 +1,3 @@
+```release-note:improvement
+storage/etcd: etcd should only return keys when calling List()
+```