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