[
https://issues.apache.org/jira/browse/KYLIN-4750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17212123#comment-17212123
]
Sonu Singh commented on KYLIN-4750:
-----------------------------------
Hi Yaqian Zhang,
I am also facing LDAP issue with Kylin 3.1.0.
Please find the error log and I am not able to start Kylin itself with below
error:
After enabling LDAP, kylin application is not able to start.
2020-09-16 09:54:35,511 DEBUG [localhost-startStop-1]
security.PasswordPlaceholderConfigurer:174 : Loading properties file from
InputStream resource [resource loaded through InputStream]
2020-09-16 09:54:35,551 WARN [localhost-startStop-1]
support.XmlWebApplicationContext:551 : Exception encountered during context
initialization - cancelling refresh attempt:
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean
definition with name 'ldapSource' defined in class path resource
[kylinSecurity.xml]: Given final block not properly padded. Such issues can
arise if a bad key is used during decryption.; nested exception is
java.lang.RuntimeException: Given final block not properly padded. Such issues
can arise if a bad key is used during decryption.
2020-09-16 09:54:35,553 ERROR [localhost-startStop-1] context.ContextLoader:350
: Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean
definition with name 'ldapSource' defined in class path resource
[kylinSecurity.xml]: Given final block not properly padded. Such issues can
arise if a bad key is used during decryption.; nested exception is
java.lang.RuntimeException: Given final block not properly padded. Such issues
can arise if a bad key is used during decryption.
at
org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:223)
at
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:222)
at
org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:86)
at
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:283)
at
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:163)
at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:687)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:525)
at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4792)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5256)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:985)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: Given final block not properly padded.
Such issues can arise if a bad key is used during decryption.
at org.apache.kylin.common.util.EncryptUtil.decrypt(EncryptUtil.java:65)
at
org.apache.kylin.rest.security.PasswordPlaceholderConfigurer.resolvePlaceholder(PasswordPlaceholderConfigurer.java:70)
at
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.resolvePlaceholder(PropertyPlaceholderConfigurer.java:162)
at
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PropertyPlaceholderConfigurerResolver.resolvePlaceholder(PropertyPlaceholderConfigurer.java:277)
at
org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:147)
at
org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126)
at
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PlaceholderResolvingStringValueResolver.resolveStringValue(PropertyPlaceholderConfigurer.java:258)
at
org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveStringValue(BeanDefinitionVisitor.java:282)
at
org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveValue(BeanDefinitionVisitor.java:204)
at
org.springframework.beans.factory.config.BeanDefinitionVisitor.visitPropertyValues(BeanDefinitionVisitor.java:141)
at
org.springframework.beans.factory.config.BeanDefinitionVisitor.visitBeanDefinition(BeanDefinitionVisitor.java:82)
at
org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:220)
... 22 more
Caused by: javax.crypto.BadPaddingException: Given final block not properly
padded. Such issues can arise if a bad key is used during decryption.
at com.sun.crypto.provider.CipherCore.unpad(CipherCore.java:975)
at com.sun.crypto.provider.CipherCore.fillOutputBuffer(CipherCore.java:1056)
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:853)
at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:446)
at javax.crypto.Cipher.doFinal(Cipher.java:2168)
at org.apache.kylin.common.util.EncryptUtil.decrypt(EncryptUtil.java:62)
... 33 more
^C
root@host:/opt/kylin/logs# tailf kylin.log
at
org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:220)
... 22 more
Caused by: javax.crypto.BadPaddingException: Given final block not properly
padded. Such issues can arise if a bad key is used during decryption.
at com.sun.crypto.provider.CipherCore.unpad(CipherCore.java:975)
at com.sun.crypto.provider.CipherCore.fillOutputBuffer(CipherCore.java:1056)
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:853)
at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:446)
at javax.crypto.Cipher.doFinal(Cipher.java:2168)
at org.apache.kylin.common.util.EncryptUtil.decrypt(EncryptUtil.java:62)
... 33 more
> ldap do not working
> -------------------
>
> Key: KYLIN-4750
> URL: https://issues.apache.org/jira/browse/KYLIN-4750
> Project: Kylin
> Issue Type: Bug
> Components: Web
> Affects Versions: v3.1.0
> Reporter: chen wenqiang
> Priority: Major
>
> kylinSecurity.xml 文件中 LDAPAuthoritiesPopulator 的 searchSubtree
> 没有配置true,使role无法查询到,无法登录,需要以下配置项。
> <property name="groupRoleAttribute" value="cn"/>
> <property name="searchSubtree" value="true"/>
> --------------------------
> In file kylinSecurity.xml, property <searchSubtree> in bean class
> <LDAPAuthoritiesPopulator> is not setting. Cause admin role in ldap cannot be
> find. Suppose to add configuration as below in kylinSecurity.xml like old
> versions.
> <property name="groupRoleAttribute" value="cn"/>
> <property name="searchSubtree" value="true"/>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)