123 references to RadiusSecretStoreType
Aspire.Hosting.Radius (35)
Publishing\RadiusInfrastructureBuilder.cs (2)
1508/// <see cref="RadiusSecretStoreType"/> enum, but <c>StoreType</c> is a public, freely settable 1524if (!RadiusSecretStoreTypeExtensions.TryParseRadiusTypeString(storeTypeString, out var storeType))
Secrets\RadiusSecretStoreExtensions.cs (2)
57RadiusSecretStoreType type) 104RadiusSecretStoreType type,
Secrets\RadiusSecretStoreResource.cs (2)
36internal RadiusSecretStoreResource(string name, RadiusSecretStoreType type, RadiusSecretStoreScope scope) 44public RadiusSecretStoreType Type { get; }
Secrets\RadiusSecretStoreType.cs (25)
54/// Internal helpers mapping <see cref="RadiusSecretStoreType"/> to the Radius 60internal static string ToRadiusTypeString(this RadiusSecretStoreType type) => type switch 62RadiusSecretStoreType.Generic => "generic", 63RadiusSecretStoreType.Certificate => "certificate", 64RadiusSecretStoreType.BasicAuthentication => "basicAuthentication", 65RadiusSecretStoreType.AzureWorkloadIdentity => "azureWorkloadIdentity", 66RadiusSecretStoreType.AwsIrsa => "awsIRSA", 75Enum.GetValues<RadiusSecretStoreType>().Select(ToRadiusTypeString).ToList(); 85/// <summary>Returns the keys Radius requires for <paramref name="type"/> (empty for <see cref="RadiusSecretStoreType.Generic"/>).</summary> 86internal static IReadOnlyList<string> RequiredKeys(this RadiusSecretStoreType type) => type switch 88RadiusSecretStoreType.Certificate => ["tls.crt", "tls.key"], 89RadiusSecretStoreType.BasicAuthentication => ["username", "password"], 90RadiusSecretStoreType.AzureWorkloadIdentity => ["clientId", "tenantId"], 91RadiusSecretStoreType.AwsIrsa => ["roleARN"], 107internal static bool TryParseRadiusTypeString(string? value, out RadiusSecretStoreType type) 112type = RadiusSecretStoreType.Generic; 115type = RadiusSecretStoreType.Certificate; 118type = RadiusSecretStoreType.BasicAuthentication; 121type = RadiusSecretStoreType.AzureWorkloadIdentity; 124type = RadiusSecretStoreType.AwsIrsa; 134/// <see cref="RadiusSecretStoreType.Certificate"/> (Radius enforces it), <c>raw</c> otherwise. 136internal static string DefaultEncoding(this RadiusSecretStoreType type) => 137type == RadiusSecretStoreType.Certificate ? "base64" : "raw"; 144internal static bool IsValidEncoding(this RadiusSecretStoreType type, [NotNullWhen(true)] string? encoding) 151if (type == RadiusSecretStoreType.Certificate)
Secrets\RadiusSecretStoreValidation.cs (3)
248store.Type != RadiusSecretStoreType.BasicAuthentication) 252$"{DescribeKind(consumer.Kind)} consumer, which requires a '{RadiusSecretStoreType.BasicAuthentication.ToRadiusTypeString()}' store. " + 274$"(typically a '{RadiusSecretStoreType.Generic.ToRadiusTypeString()}' store). Declared keys: " +
Secrets\RadiusSecuritySecretKinds.cs (1)
12/// This is deliberately separate from <see cref="RadiusSecretStoreType"/>, which describes the
Aspire.Hosting.Radius.Tests (88)
Publishing\ExistingSecretStoreBicepTests.cs (2)
34env.WithSecretStore("tls-cert", RadiusSecretStoreType.Certificate, s => 50env.WithSecretStore("tls-cert", RadiusSecretStoreType.Certificate, s =>
Publishing\InlineSecretStoreBicepTests.cs (2)
35env.WithSecretStore("db-creds", RadiusSecretStoreType.BasicAuthentication, s => 58env.WithSecretStore("tls", RadiusSecretStoreType.Certificate, s =>
Publishing\PostCallbackSecretValidationTests.cs (19)
308builder.AddRadiusSecretStore("store", RadiusSecretStoreType.Generic) 329builder.AddRadiusSecretStore("store", RadiusSecretStoreType.Generic) 385builder.AddRadiusSecretStore("store", RadiusSecretStoreType.Generic) 406builder.AddRadiusSecretStore("store", RadiusSecretStoreType.Generic) 427builder.AddRadiusSecretStore("store", RadiusSecretStoreType.Generic) 446builder.AddRadiusSecretStore("store", RadiusSecretStoreType.Generic) 474builder.AddRadiusSecretStore("api-env-secret", RadiusSecretStoreType.Generic) 498builder.AddRadiusSecretStore("api-env-secret", RadiusSecretStoreType.Generic) 524builder.AddRadiusSecretStore("api-env-secret", RadiusSecretStoreType.Generic) 749builder.AddRadiusSecretStore("creds-user", RadiusSecretStoreType.Generic) 751builder.AddRadiusSecretStore("creds-password", RadiusSecretStoreType.Generic) 768builder.AddRadiusSecretStore("creds", RadiusSecretStoreType.Generic) 795RadiusSecretStoreType.Generic, 816.WithSecretStore("creds-user", RadiusSecretStoreType.Generic, s => s.WithSealedSecret(manifest, "username")) 817.WithSecretStore("creds-password", RadiusSecretStoreType.Generic, s => s.WithSealedSecret(manifest, "password"))); 835.WithSecretStore("creds-user", RadiusSecretStoreType.Generic, s => s.WithSealedSecret(first, "username")) 836.WithSecretStore("creds-password", RadiusSecretStoreType.Generic, s => s.WithSealedSecret(second, "password")))); 858RadiusSecretStoreType.Generic, 877builder.AddRadiusSecretStore("shared", RadiusSecretStoreType.Generic)
Publishing\SealedSecretPublishTests.cs (6)
56env.WithSecretStore("db-creds", RadiusSecretStoreType.BasicAuthentication, s => 73var store = builder.AddRadiusSecretStore("db-creds", RadiusSecretStoreType.Generic) 91env.WithSecretStore("db-creds", RadiusSecretStoreType.Generic, s => 115env.WithSecretStore("db-creds", RadiusSecretStoreType.Generic, s => 130env.WithSecretStore("db-creds", RadiusSecretStoreType.BasicAuthentication, s => 204env.WithSecretStore(storeName, RadiusSecretStoreType.BasicAuthentication, s =>
Publishing\SecretStoreConsumerBicepTests.cs (2)
22var store = builder.AddRadiusSecretStore("registry-creds", RadiusSecretStoreType.BasicAuthentication) 52env.WithSecretStore("db-creds", RadiusSecretStoreType.Generic, s => s.WithData(d => d.Add("k", pass)));
Secrets\AddRadiusSecretStoreTests.cs (26)
21var store = builder.AddRadiusSecretStore("db-creds", RadiusSecretStoreType.BasicAuthentication); 24Assert.Equal(RadiusSecretStoreType.BasicAuthentication, store.Resource.Type); 38var returned = env.WithSecretStore("api-key", RadiusSecretStoreType.Generic, s => 57env.WithSecretStore("db-creds", RadiusSecretStoreType.BasicAuthentication, s => 75.AddRadiusSecretStore("db-creds", RadiusSecretStoreType.BasicAuthentication) 98builder.AddRadiusSecretStore(invalid, RadiusSecretStoreType.Generic)); 110var store = builder.AddRadiusSecretStore(valid, RadiusSecretStoreType.Generic); 120var store = builder.AddRadiusSecretStore("db-creds", RadiusSecretStoreType.Generic) 132var store = builder.AddRadiusSecretStore("db-creds", RadiusSecretStoreType.Generic) 144var store = builder.AddRadiusSecretStore("db-creds", RadiusSecretStoreType.Generic); 154var store = builder.AddRadiusSecretStore("db-creds", RadiusSecretStoreType.Generic); 172var store = builder.AddRadiusSecretStore("tls", RadiusSecretStoreType.Generic); 184var store = builder.AddRadiusSecretStore("tls", RadiusSecretStoreType.Generic) 194var store = builder.AddRadiusSecretStore("tls", RadiusSecretStoreType.Generic); 203var store = builder.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 217var store = builder.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 228var store = builder.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 238var store = builder.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic); 252var store = builder.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic); 273var store = builder.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic); 283var store = builder.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic); 297var store = builder.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic); 311var store = builder.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 335var store = builder.AddRadiusSecretStore("tls", RadiusSecretStoreType.Generic); 344var store = builder.AddRadiusSecretStore("tls", RadiusSecretStoreType.Generic); 357var store = builder.AddRadiusSecretStore("tls", RadiusSecretStoreType.Generic);
Secrets\SecretStoreConsumerTests.cs (2)
21var store = builder.AddRadiusSecretStore("registry-creds", RadiusSecretStoreType.BasicAuthentication) 48var store = builder.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic);
Secrets\SecretStoreDefaultPathTests.cs (2)
36builder.AddRadiusSecretStore("db-creds", RadiusSecretStoreType.Generic) 52builder.AddRadiusSecretStore("db-creds", RadiusSecretStoreType.Generic)
Secrets\SecretStoreValidationTests.cs (27)
91b => b.AddRadiusSecretStore("appsecrets", RadiusSecretStoreType.Generic) 109b.AddRadiusSecretStore("appsecrets", RadiusSecretStoreType.Generic) 119var store = builder.AddRadiusSecretStore("appsecrets", RadiusSecretStoreType.Generic) 144b.AddRadiusSecretStore("tls", RadiusSecretStoreType.Certificate) 157b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic); 168var store = builder.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 185b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 198b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 213b.AddRadiusSecretStore("tls", RadiusSecretStoreType.Certificate) 232builder.AddRadiusSecretStore("db-creds", RadiusSecretStoreType.Generic).WithData(d => d.Add("k", p)); 235builder.AddRadiusSecretStore("db-creds", RadiusSecretStoreType.Generic)); 246var store = b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 264var store = b.AddRadiusSecretStore("git-creds", RadiusSecretStoreType.BasicAuthentication) 280var store = b.AddRadiusSecretStore("git-creds", RadiusSecretStoreType.Generic) 295var store = b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 311b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 327var store = b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 343b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 358b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 373b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 393b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 408env.WithSecretStore("s", RadiusSecretStoreType.Generic, s => 421b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 434env.WithSecretStore("radius", RadiusSecretStoreType.Generic, s => 436b.AddRadiusSecretStore("radiusenv", RadiusSecretStoreType.Generic) 455dev.WithSecretStore("radius", RadiusSecretStoreType.Generic, s => 457prod.WithSecretStore("radiusenv", RadiusSecretStoreType.Generic, s =>