94 references to RadiusSecretStoreType
Aspire.Hosting.Radius (25)
Secrets\RadiusSecretStoreExtensions.cs (2)
59RadiusSecretStoreType type) 106RadiusSecretStoreType type,
Secrets\RadiusSecretStoreResource.cs (2)
36internal RadiusSecretStoreResource(string name, RadiusSecretStoreType type, RadiusSecretStoreScope scope) 44public RadiusSecretStoreType Type { get; }
Secrets\RadiusSecretStoreType.cs (18)
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", 78/// <summary>Returns the keys Radius requires for <paramref name="type"/> (empty for <see cref="RadiusSecretStoreType.Generic"/>).</summary> 79internal static IReadOnlyList<string> RequiredKeys(this RadiusSecretStoreType type) => type switch 81RadiusSecretStoreType.Certificate => ["tls.crt", "tls.key"], 82RadiusSecretStoreType.BasicAuthentication => ["username", "password"], 83RadiusSecretStoreType.AzureWorkloadIdentity => ["clientId", "tenantId"], 84RadiusSecretStoreType.AwsIrsa => ["roleARN"], 90/// <see cref="RadiusSecretStoreType.Certificate"/> (Radius enforces it), <c>raw</c> otherwise. 92internal static string DefaultEncoding(this RadiusSecretStoreType type) => 93type == RadiusSecretStoreType.Certificate ? "base64" : "raw"; 100internal static bool IsValidEncoding(this RadiusSecretStoreType type, [NotNullWhen(true)] string? encoding) 107if (type == RadiusSecretStoreType.Certificate)
Secrets\RadiusSecretStoreValidation.cs (3)
249store.Type != RadiusSecretStoreType.BasicAuthentication) 253$"{DescribeKind(consumer.Kind)} consumer, which requires a '{RadiusSecretStoreType.BasicAuthentication.ToRadiusTypeString()}' store. " + 275$"(typically a '{RadiusSecretStoreType.Generic.ToRadiusTypeString()}' store). Declared keys: " +
Aspire.Hosting.Radius.Tests (69)
Publishing\ExistingSecretStoreBicepTests.cs (2)
35env.WithSecretStore("tls-cert", RadiusSecretStoreType.Certificate, s => 51env.WithSecretStore("tls-cert", RadiusSecretStoreType.Certificate, s =>
Publishing\InlineSecretStoreBicepTests.cs (2)
36env.WithSecretStore("db-creds", RadiusSecretStoreType.BasicAuthentication, s => 59env.WithSecretStore("tls", RadiusSecretStoreType.Certificate, s =>
Publishing\SealedSecretPublishTests.cs (6)
57env.WithSecretStore("db-creds", RadiusSecretStoreType.BasicAuthentication, s => 74var store = builder.AddRadiusSecretStore("db-creds", RadiusSecretStoreType.Generic) 92env.WithSecretStore("db-creds", RadiusSecretStoreType.Generic, s => 116env.WithSecretStore("db-creds", RadiusSecretStoreType.Generic, s => 131env.WithSecretStore("db-creds", RadiusSecretStoreType.BasicAuthentication, s => 205env.WithSecretStore(storeName, RadiusSecretStoreType.BasicAuthentication, s =>
Publishing\SecretStoreConsumerBicepTests.cs (2)
23var store = builder.AddRadiusSecretStore("registry-creds", RadiusSecretStoreType.BasicAuthentication) 53env.WithSecretStore("db-creds", RadiusSecretStoreType.Generic, s => s.WithData(d => d.Add("k", pass)));
Secrets\AddRadiusSecretStoreTests.cs (26)
22var store = builder.AddRadiusSecretStore("db-creds", RadiusSecretStoreType.BasicAuthentication); 25Assert.Equal(RadiusSecretStoreType.BasicAuthentication, store.Resource.Type); 39var returned = env.WithSecretStore("api-key", RadiusSecretStoreType.Generic, s => 58env.WithSecretStore("db-creds", RadiusSecretStoreType.BasicAuthentication, s => 76.AddRadiusSecretStore("db-creds", RadiusSecretStoreType.BasicAuthentication) 99builder.AddRadiusSecretStore(invalid, RadiusSecretStoreType.Generic)); 111var store = builder.AddRadiusSecretStore(valid, RadiusSecretStoreType.Generic); 121var store = builder.AddRadiusSecretStore("db-creds", RadiusSecretStoreType.Generic) 133var store = builder.AddRadiusSecretStore("db-creds", RadiusSecretStoreType.Generic) 145var store = builder.AddRadiusSecretStore("db-creds", RadiusSecretStoreType.Generic); 155var store = builder.AddRadiusSecretStore("db-creds", RadiusSecretStoreType.Generic); 173var store = builder.AddRadiusSecretStore("tls", RadiusSecretStoreType.Generic); 185var store = builder.AddRadiusSecretStore("tls", RadiusSecretStoreType.Generic) 195var store = builder.AddRadiusSecretStore("tls", RadiusSecretStoreType.Generic); 204var store = builder.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 218var store = builder.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 229var store = builder.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 239var store = builder.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic); 253var store = builder.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic); 274var store = builder.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic); 284var store = builder.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic); 298var store = builder.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic); 312var store = builder.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 336var store = builder.AddRadiusSecretStore("tls", RadiusSecretStoreType.Generic); 345var store = builder.AddRadiusSecretStore("tls", RadiusSecretStoreType.Generic); 358var 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)
37builder.AddRadiusSecretStore("db-creds", RadiusSecretStoreType.Generic) 53builder.AddRadiusSecretStore("db-creds", RadiusSecretStoreType.Generic)
Secrets\SecretStoreValidationTests.cs (27)
92b => b.AddRadiusSecretStore("appsecrets", RadiusSecretStoreType.Generic) 110b.AddRadiusSecretStore("appsecrets", RadiusSecretStoreType.Generic) 120var store = builder.AddRadiusSecretStore("appsecrets", RadiusSecretStoreType.Generic) 145b.AddRadiusSecretStore("tls", RadiusSecretStoreType.Certificate) 158b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic); 169var store = builder.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 186b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 199b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 214b.AddRadiusSecretStore("tls", RadiusSecretStoreType.Certificate) 233builder.AddRadiusSecretStore("db-creds", RadiusSecretStoreType.Generic).WithData(d => d.Add("k", p)); 236builder.AddRadiusSecretStore("db-creds", RadiusSecretStoreType.Generic)); 247var store = b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 265var store = b.AddRadiusSecretStore("git-creds", RadiusSecretStoreType.BasicAuthentication) 281var store = b.AddRadiusSecretStore("git-creds", RadiusSecretStoreType.Generic) 296var store = b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 312b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 328var store = b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 344b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 359b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 374b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 394b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 409env.WithSecretStore("s", RadiusSecretStoreType.Generic, s => 422b.AddRadiusSecretStore("s", RadiusSecretStoreType.Generic) 435env.WithSecretStore("radius", RadiusSecretStoreType.Generic, s => 437b.AddRadiusSecretStore("radiusenv", RadiusSecretStoreType.Generic) 456dev.WithSecretStore("radius", RadiusSecretStoreType.Generic, s => 458prod.WithSecretStore("radiusenv", RadiusSecretStoreType.Generic, s =>