This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ambari-logsearch.git
The following commit(s) were added to refs/heads/master by this push:
new a01cb596 logsearch-portal cannot start due to lake of LdapTemplate
bean (#99)
a01cb596 is described below
commit a01cb5967d3f061582d46fa0d68e8b47ec053dc7
Author: rzuo <[email protected]>
AuthorDate: Sat Jul 27 12:47:04 2024 +0800
logsearch-portal cannot start due to lake of LdapTemplate bean (#99)
---
.../java/org/apache/ambari/logsearch/conf/SecurityConfig.java | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git
a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SecurityConfig.java
b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SecurityConfig.java
index 98b0ab77..ff5bb396 100644
---
a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SecurityConfig.java
+++
b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SecurityConfig.java
@@ -58,6 +58,7 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
+import org.springframework.ldap.core.LdapTemplate;
import org.springframework.ldap.core.support.LdapContextSource;
import
org.springframework.security.config.annotation.web.builders.HttpSecurity;
import
org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
@@ -202,6 +203,15 @@ public class SecurityConfig extends
WebSecurityConfigurerAdapter {
return null;
}
+ @Bean
+ public LdapTemplate ldapTemplate() {
+ if (authPropsConfig.isAuthLdapEnabled()) {
+ return new LdapTemplate(ldapContextSource());
+ }
+
+ return null;
+ }
+
@Bean
public BindAuthenticator bindAuthenticator() {
if (authPropsConfig.isAuthLdapEnabled()) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]