mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-30 18:17:55 +00:00 
			
		
		
		
	VAULT-31409: trace postUnseal function (#28895)
* initial implementation of unseal trace * close file if we fail to start the trace didn't bother to check the error from traceFile.Close() * use reloadable config instead of env var * license * remove leftover * allow setting custom dir and remove new package * bring back StartDebugTrace after talking to Kuba it sounds like it's a good idea to try to move stuff out of core, so even if there's no immediate need for a generic debug trace function it's still fair to add it * track postUnseal instead of unsealInternal also some usability improvements from manual testing * address PR comments * address security review there were concerns about using the /tmp directory because of permissions, or having a default dir at all, so now it's required to set a dir in order to generate the traces. * add unit tests to StartDebugTrace * move back to default dir * document new parameters * add tiny integration test * avoid column in trace filename sounds like it might be forbidden in Windows and possibly cause problems in some MacOS applications. * address PR feedback * add go doc to test CI was complaining about missing comments on the new test function. It feels a bit silly to require this of tests but whatever XD * fix tests
This commit is contained in:
		 Bruno Oliveira de Souza
					Bruno Oliveira de Souza
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							42552f6303
						
					
				
				
					commit
					a2c467cc22
				
			| @@ -854,6 +854,8 @@ func testConfig_Sanitized(t *testing.T) { | ||||
| 		}, | ||||
| 		"administrative_namespace_path": "admin/", | ||||
| 		"imprecise_lease_role_tracking": false, | ||||
| 		"enable_post_unseal_trace":      true, | ||||
| 		"post_unseal_trace_directory":   "/tmp", | ||||
| 	} | ||||
|  | ||||
| 	addExpectedEntSanitizedConfig(expected, []string{"http"}) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user