Skip to content

Commit a0ffad1

Browse files
committed
No need to filter configurations based on FICAM setting. And don't warn if providers aren't found because of this setting.
1 parent 24fec92 commit a0ffad1

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

api/src/org/labkey/api/security/AuthenticationConfigurationCache.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ protected Set<AuthenticationConfiguration<?>> createCollection()
8282

8383
private AuthenticationConfigurationCollections()
8484
{
85-
boolean acceptOnlyFicamProviders = AuthenticationManager.isAcceptOnlyFicamProviders();
86-
8785
// Select the configurations stored in the core.AuthenticationConfigurations table, add the database
8886
// authentication configuration, map each to the appropriate AuthenticationConfiguration, and add to the maps.
8987

@@ -99,7 +97,6 @@ private AuthenticationConfigurationCollections()
9997
configs
10098
.map(this::getAuthenticationConfiguration)
10199
.filter(Objects::nonNull)
102-
.filter(c->!acceptOnlyFicamProviders || c.getAuthenticationProvider().isFicamApproved())
103100
.forEach(this::addConfiguration);
104101

105102
// MultiValuedMap of domains to AuthenticationConfigurations that claim them
@@ -113,15 +110,18 @@ private AuthenticationConfigurationCollections()
113110
_activeDomains = Collections.unmodifiableCollection(activeDomains);
114111
}
115112

116-
// Little helper method simplifies the stream handling above
113+
// Little helper method simplifies the stream handling above. Filters out configurations based on FICAM-only setting.
117114
private @Nullable AuthenticationConfiguration<?> getAuthenticationConfiguration(Map<String, Object> map)
118115
{
119116
String providerName = (String)map.get("Provider");
120117
AuthenticationProvider provider = AuthenticationProviderCache.getProvider(AuthenticationProvider.class, providerName);
121118
if (null == provider)
122119
{
123-
String description = (String)map.get("Description");
124-
LOG.warn("A saved authentication configuration requires the \"{}\" authentication provider, but that provider is not present in this deployment. Authentication via {} will not be available.", providerName, null != description ? "\"" + description + "\"" : "this mechanism");
120+
if (!AuthenticationManager.isAcceptOnlyFicamProviders()) // Don't warn if FICAM-only is checked
121+
{
122+
String description = (String)map.get("Description");
123+
LOG.warn("A saved authentication configuration requires the \"{}\" authentication provider, but that provider is not present in this deployment. Authentication via {} will not be available.", providerName, null != description ? "\"" + description + "\"" : "this mechanism");
124+
}
125125
return null;
126126
}
127127

0 commit comments

Comments
 (0)