Open chaminda opened 3 years ago
Verified repository/conf/carbon.properties and could see CipherTransformation value as below.
org.wso2.CipherTransformation=AES/GCM/NoPadding
The bug report is incomplete without JDK version. However this is typical issue JDK 8 older builds, as they do not support latest strong cipher suites.
Please update JDK to latest build which has updated crypto supports, and run it again.
Describe the issue: Getting startup error even without applying any single change to the server distribution.
Also verified with update 35; getting the same.
[2021-06-16 10:23:12,472] [] ERROR {org.wso2.carbon.identity.workflow.impl.internal.WorkflowImplServiceComponent} - Error occured while adding default bps profile. org.wso2.carbon.identity.workflow.impl.WorkflowImplException: Error while encrypting the passwords of BPS Profile: embeded_bps at org.wso2.carbon.identity.workflow.impl.dao.BPSProfileDAO.addProfile(BPSProfileDAO.java:61) at org.wso2.carbon.identity.workflow.impl.WorkflowImplServiceImpl.addBPSProfile(WorkflowImplServiceImpl.java:89) at org.wso2.carbon.identity.workflow.impl.internal.WorkflowImplServiceComponent.addDefaultBPSProfile(WorkflowImplServiceComponent.java:146) at org.wso2.carbon.identity.workflow.impl.internal.WorkflowImplServiceComponent.activate(WorkflowImplServiceComponent.java:84) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260) at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146) at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345) at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620) at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197) at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343) at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222) at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:113) at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:985) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:866) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228) at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:525) at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:544) at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1071) at org.wso2.carbon.identity.workflow.mgt.internal.WorkflowMgtServiceComponent.activate(WorkflowMgtServiceComponent.java:58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260) at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146) at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345) at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620) at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197) at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343) at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222) at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:113) at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:985) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:866) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228) at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:525) at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:544) at org.wso2.carbon.identity.core.internal.IdentityCoreServiceComponent.activate(IdentityCoreServiceComponent.java:173) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260) at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146) at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345) at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620) at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197) at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343) at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222) at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:113) at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:985) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:866) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228) at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:525) at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:544) at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:529) at org.wso2.carbon.core.init.CarbonServerManager.removePendingItem(CarbonServerManager.java:305) at org.wso2.carbon.core.init.PreAxis2ConfigItemListener.bundleChanged(PreAxis2ConfigItemListener.java:118) at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:973) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345) Caused by: org.wso2.carbon.core.util.CryptoException: An error occurred while encrypting data. at org.wso2.carbon.core.util.CryptoUtil.encrypt(CryptoUtil.java:146) at org.wso2.carbon.core.util.CryptoUtil.encrypt(CryptoUtil.java:160) at org.wso2.carbon.core.util.CryptoUtil.encryptAndBase64Encode(CryptoUtil.java:242) at org.wso2.carbon.identity.workflow.impl.dao.BPSProfileDAO.encryptPassword(BPSProfileDAO.java:282) at org.wso2.carbon.identity.workflow.impl.dao.BPSProfileDAO.addProfile(BPSProfileDAO.java:59) ... 75 more Caused by: org.wso2.carbon.crypto.api.CryptoException: Error occurred while initializing and encrypting using Cipher object with algorithm: 'AES/GCM/NoPadding'. at org.wso2.carbon.crypto.provider.SymmetricKeyInternalCryptoProvider.encryptWithGCMMode(SymmetricKeyInternalCryptoProvider.java:246) at org.wso2.carbon.crypto.provider.SymmetricKeyInternalCryptoProvider.encrypt(SymmetricKeyInternalCryptoProvider.java:168) at org.wso2.carbon.crypto.impl.DefaultCryptoService.encrypt(DefaultCryptoService.java:534) at org.wso2.carbon.core.util.CryptoUtil.encrypt(CryptoUtil.java:144) ... 79 more Caused by: java.security.InvalidKeyException: Illegal key size at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1039) at javax.crypto.Cipher.init(Cipher.java:1393) at javax.crypto.Cipher.init(Cipher.java:1327) at org.wso2.carbon.crypto.provider.SymmetricKeyInternalCryptoProvider.encryptWithGCMMode(SymmetricKeyInternalCryptoProvider.java:232) ... 82 more
How to reproduce: Start the latest update(35) or vanila pack.
Expected behavior: N/A
Environment information (Please complete the following information; remove any unnecessary fields) :
Optional Fields
Related issues:
Suggested labels: is-5.11.0