mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-31 02:28:09 +00:00 
			
		
		
		
	Update generate-root output (#4807)
In current Vault server EncodedToken will always be populated regardless of type (root, DR), so prioritize that, and properly refer to it as Encoded Token instead of Root Token. Additionally refer to the nonce as the Operation nonce instead of the Root generation operation nonce since it's used for both strategies.
This commit is contained in:
		 Jeff Mitchell
					Jeff Mitchell
				
			
				
					committed by
					
						 Chris Hoffman
						Chris Hoffman
					
				
			
			
				
	
			
			
			 Chris Hoffman
						Chris Hoffman
					
				
			
						parent
						
							9591e44bef
						
					
				
				
					commit
					7532e82ebe
				
			| @@ -395,7 +395,7 @@ func (c *OperatorGenerateRootCommand) provide(client *api.Client, key string, dr | ||||
| 		nonce = status.Nonce | ||||
|  | ||||
| 		w := getWriterFromUI(c.UI) | ||||
| 		fmt.Fprintf(w, "Root generation operation nonce: %s\n", nonce) | ||||
| 		fmt.Fprintf(w, "Operation nonce: %s\n", nonce) | ||||
| 		fmt.Fprintf(w, "Unseal Key (will be hidden): ") | ||||
| 		key, err = password.Read(os.Stdin) | ||||
| 		fmt.Fprintf(w, "\n") | ||||
| @@ -489,10 +489,10 @@ func (c *OperatorGenerateRootCommand) printStatus(status *api.GenerateRootStatus | ||||
| 		out = append(out, fmt.Sprintf("PGP Fingerprint | %s", status.PGPFingerprint)) | ||||
| 	} | ||||
| 	switch { | ||||
| 	case status.EncodedRootToken != "": | ||||
| 		out = append(out, fmt.Sprintf("Root Token | %s", status.EncodedRootToken)) | ||||
| 	case status.EncodedToken != "": | ||||
| 		out = append(out, fmt.Sprintf("Root Token | %s", status.EncodedToken)) | ||||
| 		out = append(out, fmt.Sprintf("Encoded Token | %s", status.EncodedToken)) | ||||
| 	case status.EncodedRootToken != "": | ||||
| 		out = append(out, fmt.Sprintf("Encoded Root Token | %s", status.EncodedRootToken)) | ||||
| 	} | ||||
|  | ||||
| 	output := columnOutput(out, nil) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user