mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-31 02:28:09 +00:00 
			
		
		
		
	backport of commit 425b1e333d (#23885)
				
					
				
			Co-authored-by: Josh Black <raskchanky@gmail.com>
This commit is contained in:
		 hc-github-team-secure-vault-core
					hc-github-team-secure-vault-core
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							274436c097
						
					
				
				
					commit
					930757314c
				
			
							
								
								
									
										3
									
								
								changelog/23872.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								changelog/23872.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | |||||||
|  | ```release-note:improvement | ||||||
|  | storage/etcd: etcd should only return keys when calling List() | ||||||
|  | ``` | ||||||
| @@ -14,7 +14,7 @@ import ( | |||||||
| 	"sync" | 	"sync" | ||||||
| 	"time" | 	"time" | ||||||
|  |  | ||||||
| 	metrics "github.com/armon/go-metrics" | 	"github.com/armon/go-metrics" | ||||||
| 	log "github.com/hashicorp/go-hclog" | 	log "github.com/hashicorp/go-hclog" | ||||||
| 	"github.com/hashicorp/go-secure-stdlib/parseutil" | 	"github.com/hashicorp/go-secure-stdlib/parseutil" | ||||||
| 	"github.com/hashicorp/go-secure-stdlib/strutil" | 	"github.com/hashicorp/go-secure-stdlib/strutil" | ||||||
| @@ -238,7 +238,7 @@ func (c *EtcdBackend) List(ctx context.Context, prefix string) ([]string, error) | |||||||
| 	ctx, cancel := context.WithTimeout(context.Background(), c.requestTimeout) | 	ctx, cancel := context.WithTimeout(context.Background(), c.requestTimeout) | ||||||
| 	defer cancel() | 	defer cancel() | ||||||
| 	prefix = path.Join(c.path, prefix) + "/" | 	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 { | 	if err != nil { | ||||||
| 		return nil, err | 		return nil, err | ||||||
| 	} | 	} | ||||||
|   | |||||||
| @@ -26,7 +26,7 @@ func TestEtcd3Backend(t *testing.T) { | |||||||
| 		"username": "root", | 		"username": "root", | ||||||
| 		"password": "insecure", | 		"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", | 		"sync": "false", | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user