Add tests and implement StubBearer authentication for Signer endpoints
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Docs CI / lint-and-preview (push) Has been cancelled
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Docs CI / lint-and-preview (push) Has been cancelled
				
			- Created SignerEndpointsTests to validate the SignDsse and VerifyReferrers endpoints. - Implemented StubBearerAuthenticationDefaults and StubBearerAuthenticationHandler for token-based authentication. - Developed ConcelierExporterClient for managing Trivy DB settings and export operations. - Added TrivyDbSettingsPageComponent for UI interactions with Trivy DB settings, including form handling and export triggering. - Implemented styles and HTML structure for Trivy DB settings page. - Created NotifySmokeCheck tool for validating Redis event streams and Notify deliveries.
This commit is contained in:
		| @@ -27,6 +27,7 @@ internal static class CommandFactory | ||||
|         root.Add(BuildExcititorCommand(services, verboseOption, cancellationToken)); | ||||
|         root.Add(BuildRuntimeCommand(services, verboseOption, cancellationToken)); | ||||
|         root.Add(BuildAuthCommand(services, options, verboseOption, cancellationToken)); | ||||
|         root.Add(BuildOfflineCommand(services, verboseOption, cancellationToken)); | ||||
|         root.Add(BuildConfigCommand(options)); | ||||
|  | ||||
|         return root; | ||||
| @@ -606,11 +607,102 @@ internal static class CommandFactory | ||||
|         return auth; | ||||
|     } | ||||
|  | ||||
|     private static Command BuildConfigCommand(StellaOpsCliOptions options) | ||||
|     { | ||||
|         var config = new Command("config", "Inspect CLI configuration state."); | ||||
|         var show = new Command("show", "Display resolved configuration values."); | ||||
|  | ||||
|     private static Command BuildOfflineCommand(IServiceProvider services, Option<bool> verboseOption, CancellationToken cancellationToken) | ||||
|     { | ||||
|         var offline = new Command("offline", "Offline kit workflows and utilities."); | ||||
|  | ||||
|         var kit = new Command("kit", "Manage offline kit bundles."); | ||||
|  | ||||
|         var pull = new Command("pull", "Download the latest offline kit bundle."); | ||||
|         var bundleIdOption = new Option<string?>("--bundle-id") | ||||
|         { | ||||
|             Description = "Optional bundle identifier. Defaults to the latest available." | ||||
|         }; | ||||
|         var destinationOption = new Option<string?>("--destination") | ||||
|         { | ||||
|             Description = "Directory to store downloaded bundles (defaults to the configured offline kits directory)." | ||||
|         }; | ||||
|         var overwriteOption = new Option<bool>("--overwrite") | ||||
|         { | ||||
|             Description = "Overwrite existing files even if checksums match." | ||||
|         }; | ||||
|         var noResumeOption = new Option<bool>("--no-resume") | ||||
|         { | ||||
|             Description = "Disable resuming partial downloads." | ||||
|         }; | ||||
|  | ||||
|         pull.Add(bundleIdOption); | ||||
|         pull.Add(destinationOption); | ||||
|         pull.Add(overwriteOption); | ||||
|         pull.Add(noResumeOption); | ||||
|         pull.SetAction((parseResult, _) => | ||||
|         { | ||||
|             var bundleId = parseResult.GetValue(bundleIdOption); | ||||
|             var destination = parseResult.GetValue(destinationOption); | ||||
|             var overwrite = parseResult.GetValue(overwriteOption); | ||||
|             var resume = !parseResult.GetValue(noResumeOption); | ||||
|             var verbose = parseResult.GetValue(verboseOption); | ||||
|             return CommandHandlers.HandleOfflineKitPullAsync(services, bundleId, destination, overwrite, resume, verbose, cancellationToken); | ||||
|         }); | ||||
|  | ||||
|         var import = new Command("import", "Upload an offline kit bundle to the backend."); | ||||
|         var bundleArgument = new Argument<string>("bundle") | ||||
|         { | ||||
|             Description = "Path to the offline kit tarball (.tgz)." | ||||
|         }; | ||||
|         var manifestOption = new Option<string?>("--manifest") | ||||
|         { | ||||
|             Description = "Offline manifest JSON path (defaults to metadata or sibling file)." | ||||
|         }; | ||||
|         var bundleSignatureOption = new Option<string?>("--bundle-signature") | ||||
|         { | ||||
|             Description = "Detached signature for the offline bundle (e.g. .sig)." | ||||
|         }; | ||||
|         var manifestSignatureOption = new Option<string?>("--manifest-signature") | ||||
|         { | ||||
|             Description = "Detached signature for the offline manifest (e.g. .jws)." | ||||
|         }; | ||||
|  | ||||
|         import.Add(bundleArgument); | ||||
|         import.Add(manifestOption); | ||||
|         import.Add(bundleSignatureOption); | ||||
|         import.Add(manifestSignatureOption); | ||||
|         import.SetAction((parseResult, _) => | ||||
|         { | ||||
|             var bundlePath = parseResult.GetValue(bundleArgument) ?? string.Empty; | ||||
|             var manifest = parseResult.GetValue(manifestOption); | ||||
|             var bundleSignature = parseResult.GetValue(bundleSignatureOption); | ||||
|             var manifestSignature = parseResult.GetValue(manifestSignatureOption); | ||||
|             var verbose = parseResult.GetValue(verboseOption); | ||||
|             return CommandHandlers.HandleOfflineKitImportAsync(services, bundlePath, manifest, bundleSignature, manifestSignature, verbose, cancellationToken); | ||||
|         }); | ||||
|  | ||||
|         var status = new Command("status", "Display offline kit installation status."); | ||||
|         var jsonOption = new Option<bool>("--json") | ||||
|         { | ||||
|             Description = "Emit status as JSON." | ||||
|         }; | ||||
|         status.Add(jsonOption); | ||||
|         status.SetAction((parseResult, _) => | ||||
|         { | ||||
|             var asJson = parseResult.GetValue(jsonOption); | ||||
|             var verbose = parseResult.GetValue(verboseOption); | ||||
|             return CommandHandlers.HandleOfflineKitStatusAsync(services, asJson, verbose, cancellationToken); | ||||
|         }); | ||||
|  | ||||
|         kit.Add(pull); | ||||
|         kit.Add(import); | ||||
|         kit.Add(status); | ||||
|  | ||||
|         offline.Add(kit); | ||||
|         return offline; | ||||
|     } | ||||
|  | ||||
|     private static Command BuildConfigCommand(StellaOpsCliOptions options) | ||||
|     { | ||||
|         var config = new Command("config", "Inspect CLI configuration state."); | ||||
|         var show = new Command("show", "Display resolved configuration values."); | ||||
|  | ||||
|         show.SetAction((_, _) => | ||||
|         { | ||||
|             var authority = options.Authority ?? new StellaOpsCliAuthorityOptions(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user