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