mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-30 18:17:55 +00:00 
			
		
		
		
	Quit agent endpoint with config (#14223)
* Add agent/v1/quit endpoint * Closes https://github.com/hashicorp/vault/issues/11089 * Agent quit API behind config setting * Normalise test config whitespace * Document config option Co-authored-by: Rémi Lapeyre <remi.lapeyre@lenstra.fr> Co-authored-by: Ben Ash <32777270+benashz@users.noreply.github.com>
This commit is contained in:
		| @@ -780,22 +780,25 @@ func testConfig_Sanitized(t *testing.T) { | ||||
| func testParseListeners(t *testing.T) { | ||||
| 	obj, _ := hcl.Parse(strings.TrimSpace(` | ||||
| listener "tcp" { | ||||
| 	address = "127.0.0.1:443" | ||||
| 	cluster_address = "127.0.0.1:8201" | ||||
| 	tls_disable = false | ||||
| 	tls_cert_file = "./certs/server.crt" | ||||
| 	tls_key_file = "./certs/server.key" | ||||
| 	tls_client_ca_file = "./certs/rootca.crt" | ||||
| 	tls_min_version = "tls12" | ||||
| 	tls_max_version = "tls13" | ||||
| 	tls_require_and_verify_client_cert = true | ||||
| 	tls_disable_client_certs = true | ||||
|     telemetry { | ||||
|       unauthenticated_metrics_access = true | ||||
|     } | ||||
|     profiling { | ||||
|       unauthenticated_pprof_access = true | ||||
|     } | ||||
|   address = "127.0.0.1:443" | ||||
|   cluster_address = "127.0.0.1:8201" | ||||
|   tls_disable = false | ||||
|   tls_cert_file = "./certs/server.crt" | ||||
|   tls_key_file = "./certs/server.key" | ||||
|   tls_client_ca_file = "./certs/rootca.crt" | ||||
|   tls_min_version = "tls12" | ||||
|   tls_max_version = "tls13" | ||||
|   tls_require_and_verify_client_cert = true | ||||
|   tls_disable_client_certs = true | ||||
|   telemetry { | ||||
|     unauthenticated_metrics_access = true | ||||
|   } | ||||
|   profiling { | ||||
|     unauthenticated_pprof_access = true | ||||
|   } | ||||
|   agent_api { | ||||
|     enable_quit = true | ||||
|   } | ||||
| }`)) | ||||
|  | ||||
| 	config := Config{ | ||||
| @@ -833,6 +836,9 @@ listener "tcp" { | ||||
| 					Profiling: configutil.ListenerProfiling{ | ||||
| 						UnauthenticatedPProfAccess: true, | ||||
| 					}, | ||||
| 					AgentAPI: &configutil.AgentAPI{ | ||||
| 						EnableQuit: true, | ||||
| 					}, | ||||
| 					CustomResponseHeaders: DefaultCustomHeaders, | ||||
| 				}, | ||||
| 			}, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Tom Proctor
					Tom Proctor