| | | 1 | | using Elsa.ExternalAuthentication.Contracts; |
| | | 2 | | using Elsa.ExternalAuthentication.Models; |
| | | 3 | | using Elsa.ExternalAuthentication.Options; |
| | | 4 | | using Elsa.ExternalAuthentication.Policies; |
| | | 5 | | using Microsoft.Extensions.Options; |
| | | 6 | | |
| | | 7 | | namespace Elsa.ExternalAuthentication.Validation; |
| | | 8 | | |
| | | 9 | | /// <summary> |
| | | 10 | | /// Validates the deployment-owned External Authentication configuration before it is used by the broker. |
| | | 11 | | /// </summary> |
| | 16 | 12 | | public sealed class ExternalAuthenticationOptionsValidator( |
| | 16 | 13 | | IOptions<ExternalAuthenticationExtensionOptions> extensionOptions) : IValidateOptions<ExternalAuthenticationOptions> |
| | | 14 | | { |
| | | 15 | | public ValidateOptionsResult Validate(string? name, ExternalAuthenticationOptions options) |
| | | 16 | | { |
| | 16 | 17 | | var failures = new List<string>(); |
| | 16 | 18 | | var registrations = extensionOptions.Value.Registrations; |
| | 131 | 19 | | var installedAdapterTypes = ValidateExtensionTypes(registrations.Where(x => x.Kind == ExternalAuthenticationExte |
| | 143 | 20 | | var installedPolicyTypes = ValidateExtensionTypes(registrations.Where(x => x.Kind == ExternalAuthenticationExten |
| | 166 | 21 | | var installedGrantSourceTypes = ValidateExtensionTypes(registrations.Where(x => x.Kind == ExternalAuthentication |
| | 114 | 22 | | var installedMatcherTypes = ValidateExtensionTypes(registrations.Where(x => x.Kind == ExternalAuthenticationExte |
| | | 23 | | |
| | 16 | 24 | | ValidateAllowedTypes(options.AllowedAdapterTypes, installedAdapterTypes, "adapter", failures); |
| | 16 | 25 | | ValidateAllowedTypes(options.AllowedUnlinkedIdentityPolicyTypes, installedPolicyTypes, "unlinked identity policy |
| | 16 | 26 | | ValidateAllowedTypes(options.AllowedPermissionGrantSourceTypes, installedGrantSourceTypes, "permission grant sou |
| | 16 | 27 | | ValidateAllowedTypes(options.AllowedExternalUserMatcherTypes, installedMatcherTypes, "external user matcher", fa |
| | 16 | 28 | | if (string.Equals(options.UnlinkedIdentityPolicy.DefaultType, MatchExternalUserUnlinkedIdentityPolicy.PolicyType |
| | 16 | 29 | | (installedMatcherTypes.Count == 0 || options.AllowedExternalUserMatcherTypes.Count > 0 && !installedMatcherT |
| | 0 | 30 | | failures.Add("The default unlinked identity policy 'match-user' requires at least one installed and allowed |
| | 16 | 31 | | ValidateExternalCallbackBaseUri(options.Redirects, failures); |
| | 16 | 32 | | ValidateClients(options, failures); |
| | 16 | 33 | | ValidateConfigurationConnections(options, installedAdapterTypes, installedPolicyTypes, installedGrantSourceTypes |
| | 16 | 34 | | ValidateRateLimits(options.RateLimits, failures); |
| | 16 | 35 | | ValidateProviderEgress(options.ProviderEgress, failures); |
| | 16 | 36 | | ValidateHandleHashing(options.HandleHashing, failures); |
| | | 37 | | |
| | 16 | 38 | | return failures.Count == 0 ? ValidateOptionsResult.Success : ValidateOptionsResult.Fail(failures); |
| | | 39 | | } |
| | | 40 | | |
| | | 41 | | private static void ValidateExternalCallbackBaseUri(RedirectValidationOptions? redirects, ICollection<string> failur |
| | | 42 | | { |
| | 16 | 43 | | if (redirects?.ExternalCallbackBaseUri is null) |
| | 13 | 44 | | return; |
| | | 45 | | |
| | 3 | 46 | | if (!ExternalCallbackBaseUriValidator.IsValid(redirects.ExternalCallbackBaseUri, redirects.AllowDevelopmentLoopb |
| | 2 | 47 | | failures.Add(ExternalCallbackBaseUriValidator.ErrorMessage); |
| | 3 | 48 | | } |
| | | 49 | | |
| | | 50 | | private static void ValidateHandleHashing(ExternalAuthenticationHandleHashingOptions? handleHashing, ICollection<str |
| | | 51 | | { |
| | 16 | 52 | | if (handleHashing is null) |
| | | 53 | | { |
| | 0 | 54 | | failures.Add("External Authentication handle-hashing settings are required."); |
| | 0 | 55 | | return; |
| | | 56 | | } |
| | | 57 | | |
| | 16 | 58 | | if (string.IsNullOrWhiteSpace(handleHashing.SharedKeyBase64)) |
| | 14 | 59 | | return; |
| | | 60 | | |
| | 2 | 61 | | byte[]? key = null; |
| | | 62 | | try |
| | | 63 | | { |
| | 2 | 64 | | key = Convert.FromBase64String(handleHashing.SharedKeyBase64); |
| | 1 | 65 | | if (key.Length < 32) |
| | 1 | 66 | | failures.Add("External Authentication HandleHashing:SharedKeyBase64 must contain at least 32 bytes."); |
| | 1 | 67 | | } |
| | 1 | 68 | | catch (FormatException) |
| | | 69 | | { |
| | 1 | 70 | | failures.Add("External Authentication HandleHashing:SharedKeyBase64 must be valid base64."); |
| | 1 | 71 | | } |
| | | 72 | | finally |
| | | 73 | | { |
| | 2 | 74 | | if (key is not null) |
| | 1 | 75 | | System.Security.Cryptography.CryptographicOperations.ZeroMemory(key); |
| | 2 | 76 | | } |
| | 2 | 77 | | } |
| | | 78 | | |
| | | 79 | | private static void ValidateRateLimits(ExternalAuthenticationRateLimitOptions rateLimits, ICollection<string> failur |
| | | 80 | | { |
| | 192 | 81 | | foreach (var (name, rule) in new (string Name, RateLimitRule? Rule)[] |
| | 16 | 82 | | { |
| | 16 | 83 | | (nameof(rateLimits.Discovery), rateLimits.Discovery), |
| | 16 | 84 | | (nameof(rateLimits.ExternalInitiation), rateLimits.ExternalInitiation), |
| | 16 | 85 | | (nameof(rateLimits.LocalInitiation), rateLimits.LocalInitiation), |
| | 16 | 86 | | (nameof(rateLimits.ProviderCallback), rateLimits.ProviderCallback), |
| | 16 | 87 | | (nameof(rateLimits.TokenExchange), rateLimits.TokenExchange) |
| | 16 | 88 | | }) |
| | | 89 | | { |
| | 80 | 90 | | if (rule is null || rule.PermitLimit <= 0 || rule.Window <= TimeSpan.Zero) |
| | 1 | 91 | | failures.Add($"External Authentication rate limit '{name}' must have a positive permit limit and window. |
| | | 92 | | } |
| | 16 | 93 | | } |
| | | 94 | | |
| | | 95 | | private static void ValidateProviderEgress(ProviderEgressOptions? providerEgress, ICollection<string> failures) |
| | | 96 | | { |
| | 16 | 97 | | if (providerEgress is null) |
| | | 98 | | { |
| | 0 | 99 | | failures.Add("External Authentication provider egress settings are required."); |
| | 0 | 100 | | return; |
| | | 101 | | } |
| | | 102 | | |
| | 16 | 103 | | if (providerEgress.MaximumRedirects < 0) |
| | 1 | 104 | | failures.Add("External Authentication provider egress maximum redirects must not be negative."); |
| | 16 | 105 | | if (providerEgress.ConnectTimeout <= TimeSpan.Zero || providerEgress.RequestTimeout <= TimeSpan.Zero) |
| | 1 | 106 | | failures.Add("External Authentication provider egress timeouts must be positive."); |
| | 16 | 107 | | if (providerEgress.MaximumDiscoveryResponseBytes <= 0 || providerEgress.MaximumTokenResponseBytes <= 0 || provid |
| | 1 | 108 | | failures.Add("External Authentication provider egress response-size limits must be positive."); |
| | | 109 | | |
| | 34 | 110 | | foreach (var host in providerEgress.AllowedHosts ?? []) |
| | | 111 | | { |
| | 1 | 112 | | if (string.IsNullOrWhiteSpace(host) || host.Contains('*') || Uri.CheckHostName(host.TrimEnd('.')) == UriHost |
| | 1 | 113 | | failures.Add($"External Authentication provider egress allowed host '{host}' is invalid."); |
| | | 114 | | } |
| | | 115 | | |
| | 16 | 116 | | if (providerEgress.ProxyUri is { } proxyUri && |
| | 16 | 117 | | (!proxyUri.IsAbsoluteUri || |
| | 16 | 118 | | !string.Equals(proxyUri.Scheme, "http", StringComparison.OrdinalIgnoreCase) && !string.Equals(proxyUri.Sche |
| | 16 | 119 | | !string.IsNullOrEmpty(proxyUri.UserInfo) || |
| | 16 | 120 | | !string.IsNullOrEmpty(proxyUri.Fragment) || |
| | 16 | 121 | | proxyUri.HostNameType == UriHostNameType.Unknown)) |
| | 1 | 122 | | failures.Add("External Authentication provider egress proxy URI must be an absolute HTTP(S) URI without cred |
| | 16 | 123 | | } |
| | | 124 | | |
| | | 125 | | private static HashSet<string> ValidateExtensionTypes(IEnumerable<string> types, string kind, ICollection<string> fa |
| | | 126 | | { |
| | 64 | 127 | | var result = new HashSet<string>(StringComparer.Ordinal); |
| | | 128 | | |
| | 324 | 129 | | foreach (var type in types) |
| | | 130 | | { |
| | 98 | 131 | | if (string.IsNullOrWhiteSpace(type)) |
| | | 132 | | { |
| | 0 | 133 | | failures.Add($"Installed {kind} types must not be empty."); |
| | 0 | 134 | | continue; |
| | | 135 | | } |
| | | 136 | | |
| | 98 | 137 | | if (!result.Add(type)) |
| | 2 | 138 | | failures.Add($"The installed {kind} type '{type}' is registered more than once."); |
| | | 139 | | } |
| | | 140 | | |
| | 64 | 141 | | return result; |
| | | 142 | | } |
| | | 143 | | |
| | | 144 | | private static void ValidateAllowedTypes(IEnumerable<string>? allowedTypes, IReadOnlySet<string> installedTypes, str |
| | | 145 | | { |
| | 64 | 146 | | var seen = new HashSet<string>(StringComparer.Ordinal); |
| | | 147 | | |
| | 290 | 148 | | foreach (var type in allowedTypes ?? []) |
| | | 149 | | { |
| | 81 | 150 | | if (string.IsNullOrWhiteSpace(type)) |
| | | 151 | | { |
| | 0 | 152 | | failures.Add($"Allowed {kind} types must not be empty."); |
| | 0 | 153 | | continue; |
| | | 154 | | } |
| | | 155 | | |
| | 81 | 156 | | if (!seen.Add(type)) |
| | 1 | 157 | | failures.Add($"The allowed {kind} type '{type}' is configured more than once."); |
| | | 158 | | |
| | 81 | 159 | | if (!installedTypes.Contains(type)) |
| | 1 | 160 | | failures.Add($"The allowed {kind} type '{type}' is not installed."); |
| | | 161 | | } |
| | 64 | 162 | | } |
| | | 163 | | |
| | | 164 | | private static void ValidateClients(ExternalAuthenticationOptions options, ICollection<string> failures) |
| | | 165 | | { |
| | 16 | 166 | | var clientIds = new HashSet<string>(StringComparer.Ordinal); |
| | | 167 | | |
| | 38 | 168 | | foreach (var client in options.Clients ?? []) |
| | | 169 | | { |
| | 3 | 170 | | if (string.IsNullOrWhiteSpace(client.ClientId)) |
| | 0 | 171 | | failures.Add("Authentication client identifiers must not be empty."); |
| | 3 | 172 | | else if (!clientIds.Add(client.ClientId)) |
| | 0 | 173 | | failures.Add($"The authentication client identifier '{client.ClientId}' is configured more than once."); |
| | | 174 | | |
| | 3 | 175 | | var callbackUris = client.CallbackUris ?? new HashSet<Uri>(); |
| | 3 | 176 | | var logoutCallbackUris = client.LogoutCallbackUris ?? new HashSet<Uri>(); |
| | 3 | 177 | | var allowedOrigins = client.AllowedOrigins ?? new HashSet<string>(); |
| | 3 | 178 | | var allowedReturnPathPrefixes = client.AllowedReturnPathPrefixes ?? new HashSet<string>(); |
| | | 179 | | |
| | 3 | 180 | | if (callbackUris.Count == 0) |
| | 0 | 181 | | failures.Add($"Authentication client '{client.ClientId}' must register at least one callback URI."); |
| | | 182 | | |
| | 3 | 183 | | ValidateUris(client.ClientId, callbackUris, "callback", options.Redirects.AllowDevelopmentLoopbackCallbacks, |
| | 3 | 184 | | ValidateUris(client.ClientId, logoutCallbackUris, "logout callback", options.Redirects.AllowDevelopmentLoopb |
| | 3 | 185 | | ValidateOrigins(client.ClientId, allowedOrigins, options.Redirects.AllowDevelopmentLoopbackCallbacks, failur |
| | 3 | 186 | | ValidateReturnPathPrefixes(client.ClientId, allowedReturnPathPrefixes, failures); |
| | | 187 | | |
| | 3 | 188 | | if (client.ClientType == AuthenticationClientType.Public) |
| | | 189 | | { |
| | 3 | 190 | | if (client.SecretBinding is not null) |
| | 2 | 191 | | failures.Add($"Public authentication client '{client.ClientId}' must not define a client secret bind |
| | | 192 | | |
| | 3 | 193 | | if (allowedOrigins.Count == 0) |
| | 0 | 194 | | failures.Add($"Public authentication client '{client.ClientId}' must register at least one allowed o |
| | | 195 | | |
| | 3 | 196 | | var originSet = allowedOrigins.ToHashSet(StringComparer.Ordinal); |
| | 12 | 197 | | foreach (var callbackUri in callbackUris) |
| | | 198 | | { |
| | 3 | 199 | | if (callbackUri.IsAbsoluteUri && !string.IsNullOrWhiteSpace(callbackUri.Host) && !originSet.Contains |
| | 2 | 200 | | failures.Add($"Public authentication client '{client.ClientId}' callback URI '{callbackUri}' doe |
| | | 201 | | } |
| | | 202 | | } |
| | 0 | 203 | | else if (client.SecretBinding is null) |
| | 0 | 204 | | failures.Add($"Confidential authentication client '{client.ClientId}' must define a client secret bindin |
| | | 205 | | } |
| | 16 | 206 | | } |
| | | 207 | | |
| | | 208 | | private static void ValidateUris(string clientId, IEnumerable<Uri> uris, string registrationKind, bool allowDevelopm |
| | | 209 | | { |
| | 6 | 210 | | var registeredUris = new HashSet<string>(StringComparer.Ordinal); |
| | | 211 | | |
| | 20 | 212 | | foreach (var uri in uris) |
| | | 213 | | { |
| | 4 | 214 | | if (!IsExactClientUri(uri, allowDevelopmentLoopback)) |
| | | 215 | | { |
| | 1 | 216 | | failures.Add($"Authentication client '{clientId}' has an invalid {registrationKind} URI '{uri}'. Registr |
| | 1 | 217 | | continue; |
| | | 218 | | } |
| | | 219 | | |
| | 3 | 220 | | if (!registeredUris.Add(uri.AbsoluteUri)) |
| | 0 | 221 | | failures.Add($"Authentication client '{clientId}' registers {registrationKind} URI '{uri}' more than onc |
| | | 222 | | } |
| | 6 | 223 | | } |
| | | 224 | | |
| | | 225 | | private static void ValidateOrigins(string clientId, IEnumerable<string> origins, bool allowDevelopmentLoopback, ICo |
| | | 226 | | { |
| | 3 | 227 | | var registeredOrigins = new HashSet<string>(StringComparer.Ordinal); |
| | | 228 | | |
| | 12 | 229 | | foreach (var origin in origins) |
| | | 230 | | { |
| | 3 | 231 | | if (!Uri.TryCreate(origin, UriKind.Absolute, out var uri) || |
| | 3 | 232 | | !IsExactClientUri(uri, allowDevelopmentLoopback) || |
| | 3 | 233 | | uri.AbsolutePath != "/" || |
| | 3 | 234 | | uri.Query.Length != 0) |
| | | 235 | | { |
| | 1 | 236 | | failures.Add($"Authentication client '{clientId}' has invalid allowed origin '{origin}'. Origins must be |
| | 1 | 237 | | continue; |
| | | 238 | | } |
| | | 239 | | |
| | 2 | 240 | | var normalizedOrigin = uri.GetLeftPart(UriPartial.Authority); |
| | 2 | 241 | | if (!string.Equals(origin, normalizedOrigin, StringComparison.Ordinal)) |
| | 1 | 242 | | failures.Add($"Authentication client '{clientId}' allowed origin '{origin}' must not contain a path, que |
| | | 243 | | |
| | 2 | 244 | | if (!registeredOrigins.Add(normalizedOrigin)) |
| | 0 | 245 | | failures.Add($"Authentication client '{clientId}' registers allowed origin '{origin}' more than once."); |
| | | 246 | | } |
| | 3 | 247 | | } |
| | | 248 | | |
| | | 249 | | private static void ValidateReturnPathPrefixes(string clientId, IReadOnlySet<string> prefixes, ICollection<string> f |
| | | 250 | | { |
| | 3 | 251 | | if (prefixes.Count == 0) |
| | | 252 | | { |
| | 1 | 253 | | failures.Add($"Authentication client '{clientId}' must register at least one allowed return-path prefix."); |
| | 1 | 254 | | return; |
| | | 255 | | } |
| | | 256 | | |
| | 2 | 257 | | var registeredPrefixes = new HashSet<string>(StringComparer.Ordinal); |
| | 8 | 258 | | foreach (var prefix in prefixes) |
| | | 259 | | { |
| | 2 | 260 | | if (!ClientReturnPathValidator.TryValidateForClient(prefix, new HashSet<string>(StringComparer.Ordinal) { pr |
| | | 261 | | { |
| | 0 | 262 | | failures.Add($"Authentication client '{clientId}' has invalid allowed return-path prefix '{prefix}'."); |
| | 0 | 263 | | continue; |
| | | 264 | | } |
| | | 265 | | |
| | 2 | 266 | | if (!registeredPrefixes.Add(prefix)) |
| | 0 | 267 | | failures.Add($"Authentication client '{clientId}' registers allowed return-path prefix '{prefix}' more t |
| | | 268 | | } |
| | 2 | 269 | | } |
| | | 270 | | |
| | | 271 | | private static bool IsExactClientUri(Uri uri, bool allowDevelopmentLoopback) |
| | | 272 | | { |
| | 6 | 273 | | if (!uri.IsAbsoluteUri || !string.IsNullOrEmpty(uri.Fragment) || !string.IsNullOrEmpty(uri.UserInfo) || uri.Host |
| | 0 | 274 | | return false; |
| | | 275 | | |
| | 6 | 276 | | return string.Equals(uri.Scheme, Uri.UriSchemeHttps, StringComparison.OrdinalIgnoreCase) || |
| | 6 | 277 | | allowDevelopmentLoopback && uri.IsLoopback && string.Equals(uri.Scheme, Uri.UriSchemeHttp, StringComparison. |
| | | 278 | | } |
| | | 279 | | |
| | | 280 | | private static void ValidateConfigurationConnections( |
| | | 281 | | ExternalAuthenticationOptions options, |
| | | 282 | | IReadOnlySet<string> installedAdapterTypes, |
| | | 283 | | IReadOnlySet<string> installedPolicyTypes, |
| | | 284 | | IReadOnlySet<string> installedGrantSourceTypes, |
| | | 285 | | ICollection<string> failures) |
| | | 286 | | { |
| | 16 | 287 | | var connectionKeys = new HashSet<string>(StringComparer.Ordinal); |
| | 16 | 288 | | var configuredConnectionIds = new HashSet<string>(StringComparer.Ordinal); |
| | 16 | 289 | | var hasPreferredConnection = false; |
| | | 290 | | |
| | 46 | 291 | | foreach (var connection in options.ConfigurationConnections ?? []) |
| | | 292 | | { |
| | 7 | 293 | | var tenantId = string.IsNullOrWhiteSpace(connection.TenantId) ? ConnectionScope.HostTenantId : connection.Te |
| | 7 | 294 | | if (tenantId != ConnectionScope.HostTenantId) |
| | 3 | 295 | | failures.Add($"Configuration connection '{connection.Key}' must use the host scope in this version."); |
| | 7 | 296 | | var key = connection.Key?.Trim().ToLowerInvariant() ?? string.Empty; |
| | | 297 | | |
| | 7 | 298 | | if (string.IsNullOrWhiteSpace(key)) |
| | 0 | 299 | | failures.Add("Configuration connection keys must not be empty."); |
| | 7 | 300 | | else if (!connectionKeys.Add(key)) |
| | 1 | 301 | | failures.Add($"Configuration connection key '{connection.Key}' is configured more than once."); |
| | | 302 | | |
| | 7 | 303 | | if (!string.IsNullOrWhiteSpace(connection.Id) && !configuredConnectionIds.Add(connection.Id)) |
| | 0 | 304 | | failures.Add($"Configuration connection ID '{connection.Id}' is configured more than once."); |
| | | 305 | | |
| | 7 | 306 | | if (connection.IsPreferred && hasPreferredConnection) |
| | 1 | 307 | | failures.Add("Configuration connections define more than one preferred sign-in method."); |
| | 7 | 308 | | hasPreferredConnection |= connection.IsPreferred; |
| | | 309 | | |
| | 7 | 310 | | if (string.IsNullOrWhiteSpace(connection.AdapterType) || !installedAdapterTypes.Contains(connection.AdapterT |
| | 1 | 311 | | failures.Add($"Configuration connection '{connection.Key}' selects adapter type '{connection.AdapterType |
| | 6 | 312 | | else if (options.AllowedAdapterTypes.Count > 0 && !options.AllowedAdapterTypes.Contains(connection.AdapterTy |
| | 0 | 313 | | failures.Add($"Configuration connection '{connection.Key}' selects adapter type '{connection.AdapterType |
| | | 314 | | |
| | 7 | 315 | | if (connection.AdapterSettingsVersion <= 0) |
| | 0 | 316 | | failures.Add($"Configuration connection '{connection.Key}' must use a positive adapter settings version. |
| | | 317 | | |
| | 7 | 318 | | if (string.IsNullOrWhiteSpace(connection.DisplayName)) |
| | 0 | 319 | | failures.Add($"Configuration connection '{connection.Key}' must define a display name."); |
| | | 320 | | |
| | 7 | 321 | | ValidatePolicy(connection, options, installedPolicyTypes, failures); |
| | 7 | 322 | | ValidateGrantSources(connection, options, installedGrantSourceTypes, failures); |
| | | 323 | | } |
| | | 324 | | |
| | 16 | 325 | | } |
| | | 326 | | |
| | | 327 | | private static void ValidatePolicy(IdentityProviderConnection connection, ExternalAuthenticationOptions options, IRe |
| | | 328 | | { |
| | 7 | 329 | | var policy = connection.UnlinkedPolicy; |
| | 7 | 330 | | if (policy is null) |
| | 7 | 331 | | return; |
| | | 332 | | |
| | 0 | 333 | | if (policy.SettingsVersion <= 0) |
| | 0 | 334 | | failures.Add($"Configuration connection '{connection.Key}' must use a positive unlinked identity policy sett |
| | | 335 | | |
| | 0 | 336 | | if (!installedPolicyTypes.Contains(policy.Type)) |
| | 0 | 337 | | failures.Add($"Configuration connection '{connection.Key}' selects unlinked identity policy '{policy.Type}', |
| | 0 | 338 | | else if (options.AllowedUnlinkedIdentityPolicyTypes.Count > 0 && !options.AllowedUnlinkedIdentityPolicyTypes.Con |
| | 0 | 339 | | failures.Add($"Configuration connection '{connection.Key}' selects unlinked identity policy '{policy.Type}', |
| | 0 | 340 | | } |
| | | 341 | | |
| | | 342 | | private static void ValidateGrantSources(IdentityProviderConnection connection, ExternalAuthenticationOptions option |
| | | 343 | | { |
| | 7 | 344 | | var orders = new HashSet<int>(); |
| | 14 | 345 | | foreach (var grantSource in connection.PermissionGrantSources ?? []) |
| | | 346 | | { |
| | 0 | 347 | | if (!orders.Add(grantSource.Order)) |
| | 0 | 348 | | failures.Add($"Configuration connection '{connection.Key}' configures more than one permission grant sou |
| | | 349 | | |
| | 0 | 350 | | if (grantSource.SettingsVersion <= 0) |
| | 0 | 351 | | failures.Add($"Configuration connection '{connection.Key}' must use a positive permission grant source s |
| | | 352 | | |
| | 0 | 353 | | if (!installedGrantSourceTypes.Contains(grantSource.Type)) |
| | 0 | 354 | | failures.Add($"Configuration connection '{connection.Key}' selects permission grant source '{grantSource |
| | 0 | 355 | | else if (options.AllowedPermissionGrantSourceTypes.Count > 0 && !options.AllowedPermissionGrantSourceTypes.C |
| | 0 | 356 | | failures.Add($"Configuration connection '{connection.Key}' selects permission grant source '{grantSource |
| | | 357 | | } |
| | 7 | 358 | | } |
| | | 359 | | } |