forked from RutgerIddink/NullOps.RdpSigner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSignSettings.cs
More file actions
58 lines (47 loc) · 1.54 KB
/
Copy pathSignSettings.cs
File metadata and controls
58 lines (47 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
using Spectre.Console.Cli;
using System.ComponentModel;
using System.Collections.Generic;
using System.IO;
using System;
namespace NullOps.RdpSigner;
public enum AuthType
{
Default,
AzureCli,
VisualStudio,
VisualStudioCode,
InteractiveBrowser,
ManagedIdentity,
Environment,
ClientSecret,
Certificate
}
public sealed class SignSettings : CommandSettings
{
[CommandOption("-v|--vault")]
[Description("Azure Key Vault URI")]
public string? VaultUri { get; init; }
[CommandOption("-k|--key")]
[Description("Certificate/key name in Key Vault")]
public string? KeyName { get; init; }
[CommandOption("--auth")]
[Description("Authentication method")]
public AuthType AuthType { get; init; } = AuthType.Default;
[CommandOption("--client-id")]
[Description("Client ID for service principal")]
public string? ClientId { get; init; }
[CommandOption("--client-secret")]
[Description("Client secret for service principal")]
public string? ClientSecret { get; init; }
[CommandOption("--tenant-id")]
[Description("Tenant ID for service principal")]
public string? TenantId { get; init; }
[CommandOption("--cert")]
[Description("Path to certificate file (PFX) for certificate auth")]
public string? CertificatePath { get; init; }
[CommandOption("--cert-pass")]
[Description("Password for certificate file")]
public string? CertificatePassword { get; init; }
[CommandArgument(0, "<files>")]
public required string[] Files { get; init; }
}