Ошибка artifactory javax.crypto.badpaddingexception при деактивации шифрования artifactory key

Я пытаюсь отключить шифрование искусственного ключа (как предлагается при обновление до 5.9).

Я использую документированный API REST:

curl -X POST "http://artifactory-qa/artifactory/api/system/decrypt" -u ***:***

но я получаю следующую ошибку:

2018-08-30 10:48:38,008 [http-nio-8081-exec-3] [INFO ] (o.a.s.i.ApiKeysEncryptor:29) - Starting decryption of all users API Keys
2018-08-30 10:48:39,312 [http-nio-8081-exec-3] [INFO ] (o.a.s.i.ApiKeysEncryptor:32) - Finished decryption of all users API Keys
2018-08-30 10:48:39,328 [http-nio-8081-exec-3] [INFO ] (o.a.s.i.UserPasswordEncryptor:43) - Starting decryption of all users passwords
2018-08-30 10:48:41,728 [http-nio-8081-exec-3] [INFO ] (o.a.s.i.UserPasswordEncryptor:64) - Finished decryption of all users passwords
2018-08-30 10:48:41,764 [http-nio-8081-exec-3] [ERROR] (o.a.r.r.s.SystemResource:157) - Could not decrypt with master key, due to: javax.crypto.BadPaddingException: Given final block not properly padded
org.jfrog.security.crypto.exception.CryptoRuntimeException: javax.crypto.BadPaddingException: Given final block not properly padded
    at org.jfrog.security.crypto.KeyFileEncryptionWrapper.decrypt(KeyFileEncryptionWrapper.java:133) ~[jfrog-crypto-1.3.16.jar:na]
    at org.jfrog.security.crypto.KeyFileEncryptionWrapper.decryptIfNeeded(KeyFileEncryptionWrapper.java:95) ~[jfrog-crypto-1.3.16.jar:na]
    at org.artifactory.common.crypto.CryptoHelper.decryptIfNeeded(CryptoHelper.java:79) ~[artifactory-config-5.8.10.jar:na]
    at org.artifactory.layout.EncryptConfigurationInterceptor.getNewPassword(EncryptConfigurationInterceptor.java:183) ~[artifactory-core-5.8.10.jar:na]
    at org.artifactory.layout.EncryptConfigurationInterceptor.encryptOrDecrypt(EncryptConfigurationInterceptor.java:112) ~[artifactory-core-5.8.10.jar:na]
    at org.artifactory.layout.EncryptConfigurationInterceptor.decrypt(EncryptConfigurationInterceptor.java:54) ~[artifactory-core-5.8.10.jar:na]
    at org.artifactory.security.ArtifactoryEncryptionServiceImpl.decrypt(ArtifactoryEncryptionServiceImpl.java:184) ~[artifactory-core-5.8.10.jar:na]
    at org.artifactory.rest.resource.system.SystemResource.decryptFromMasterKey(SystemResource.java:154) ~[artifactory-rest-5.8.10.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131]
    at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) [jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) [jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) [jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) [jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) [jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) [jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) [jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) [jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542) [jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473) [jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419) [jersey-server-1.19.jar:1.19]
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409) [jersey-server-1.19.jar:1.19]
    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409) [jersey-servlet-1.19.jar:1.19]
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558) [jersey-servlet-1.19.jar:1.19]
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733) [jersey-servlet-1.19.jar:1.19]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) [servlet-api.jar:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [catalina.jar:8.5.23]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.23]
    at org.artifactory.webapp.servlet.RepoFilter.execute(RepoFilter.java:184) [artifactory-web-application-5.8.10.jar:na]
    at org.artifactory.webapp.servlet.RepoFilter.doFilter(RepoFilter.java:93) [artifactory-web-application-5.8.10.jar:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.23]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.23]
    at org.artifactory.webapp.servlet.authentication.ArtifactoryAuthenticationFilterChain.lambda$1(ArtifactoryAuthenticationFilterChain.java:133) [artifactory-web-application-5.8.10.jar:na]
    at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:201) ~[spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
    at org.artifactory.webapp.servlet.authentication.ArtifactoryBasicAuthenticationFilter.doFilter(ArtifactoryBasicAuthenticationFilter.java:84) ~[artifactory-web-application-5.8.10.jar:na]
    at org.artifactory.webapp.servlet.authentication.ArtifactoryAuthenticationFilterChain.doFilter(ArtifactoryAuthenticationFilterChain.java:169) [artifactory-web-application-5.8.10.jar:na]
    at org.artifactory.webapp.servlet.AccessFilter.authenticateAndExecute(AccessFilter.java:282) ~[artifactory-web-application-5.8.10.jar:na]
    at org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:206) ~[artifactory-web-application-5.8.10.jar:na]
    at org.artifactory.webapp.servlet.AccessFilter.doFilter(AccessFilter.java:166) ~[artifactory-web-application-5.8.10.jar:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.23]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.23]
    at org.artifactory.webapp.servlet.RequestFilter.doFilter(RequestFilter.java:67) ~[artifactory-web-application-5.8.10.jar:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.23]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.23]
    at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:164) ~[spring-session-1.2.2.RELEASE.jar:na]
    at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80) ~[spring-session-1.2.2.RELEASE.jar:na]
    at org.artifactory.webapp.servlet.SessionFilter.doFilter(SessionFilter.java:62) ~[artifactory-web-application-5.8.10.jar:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.23]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.23]
    at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:128) ~[artifactory-web-application-5.8.10.jar:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.23]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.23]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) ~[catalina.jar:8.5.23]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) ~[catalina.jar:8.5.23]
    at org.apache.catalina.valves.rewrite.RewriteValve.invoke(RewriteValve.java:279) ~[catalina.jar:8.5.23]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) ~[catalina.jar:8.5.23]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) ~[catalina.jar:8.5.23]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) ~[catalina.jar:8.5.23]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) ~[catalina.jar:8.5.23]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) ~[tomcat-coyote.jar:8.5.23]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) ~[tomcat-coyote.jar:8.5.23]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) ~[tomcat-coyote.jar:8.5.23]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) ~[tomcat-coyote.jar:8.5.23]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-coyote.jar:8.5.23]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_131]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_131]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-util.jar:8.5.23]
    at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_131]
Caused by: javax.crypto.BadPaddingException: Given final block not properly padded
    at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:989) ~[sunjce_provider.jar:1.8.0_131]
    at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:845) ~[sunjce_provider.jar:1.8.0_131]
    at com.sun.crypto.provider.PKCS12PBECipherCore.implDoFinal(PKCS12PBECipherCore.java:399) ~[sunjce_provider.jar:1.8.0_131]
    at com.sun.crypto.provider.PKCS12PBECipherCore$PBEWithSHA1AndDESede.engineDoFinal(PKCS12PBECipherCore.java:431) ~[sunjce_provider.jar:1.8.0_131]
    at javax.crypto.Cipher.doFinal(Cipher.java:2165) ~[na:1.8.0_131]
    at org.jfrog.security.crypto.JFrogCryptoHelper.decryptSymmetric(JFrogCryptoHelper.java:266) ~[jfrog-crypto-1.3.16.jar:na]
    at org.jfrog.security.crypto.KeyFileEncryptionWrapper.decrypt(KeyFileEncryptionWrapper.java:111) ~[jfrog-crypto-1.3.16.jar:na]
    ... 69 common frames omitted

Мне интересно, не повреждена ли часть моей базы данных. Могу ли я как-то стереть данные, чтобы продолжить обновление?

Я использую artifactory версии 5.8.10, но я пробовал это с такими же старыми версиями, как 4.16.0, с тем же результатом.

Ошибка указывает на то, что Artifactory не удалось расшифровать с помощью текущего ключа. Возможно, вы сможете поделиться всей трассировкой зависаний из журнала, так что, надеюсь, мы сможем попытаться увидеть, что именно Artifactory не может расшифровать.

Ariel Kabov 11.08.2018 21:55

@ArielKabov - Я включил всю трассировку стека. Это поможет? (Извините за задержку - все еще блокиратор для нас, дайте мне знать, если вам еще что-нибудь понадобится).

Matthew 30.08.2018 12:51
1
2
202
0

Другие вопросы по теме