java.lang.IllegalStateException: Cannot decode encrypted key pair without master wrapper for Encoded key ['AReXXXXXXXX_485','AU8XXXXXXXX_136']

JFrog JIRA | Aaron Rhodes | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Decrypting the master key in the UI will not decrypt user's encrypted private keys. This can cause an error for users trying to get new authentication keys (with NPM for example). When they do, they get this error: {code} 2016-08-16 10:36:30,952 [http-nio-8081-exec-2] [ERROR] (o.a.r.c.e.GlobalExceptionMapper:48) - Cannot decode encrypted key pair without master wrapper for Encoded key ['AReXXXXXXXX_485','AU8XXXXXXXX_136'] java.lang.IllegalStateException: Cannot decode encrypted key pair without master wrapper for Encoded key ['AReXXXXXXXX_485','AU8XXXXXXXX_136'] at org.jfrog.security.crypto.EncodedKeyPair.decode(EncodedKeyPair.java:61) ~[jfrog-crypto-1.0.0.jar:na] at org.jfrog.security.crypto.JFrogCryptoHelper.createKeyWrapper(JFrogCryptoHelper.java:77) ~[jfrog-crypto-1.0.0.jar:na] at org.artifactory.security.SecurityServiceImpl.createEncryptedPasswordIfNeeded(SecurityServiceImpl.java:1432) ~[artifactory-core-4.11.0.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_101] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_101] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at com.sun.proxy.$Proxy24.createEncryptedPasswordIfNeeded(Unknown Source) ~[na:na] at org.artifactory.ui.rest.service.admin.security.user.userprofile.UnlockUserProfileService.updateUserInfo(UnlockUserProfileService.java:123) ~[artifactory-rest-ui-4.11.0.jar:na] at org.artifactory.ui.rest.service.admin.security.user.userprofile.UnlockUserProfileService.getUserProfile(UnlockUserProfileService.java:101) ~[artifactory-rest-ui-4.11.0.jar:na] at org.artifactory.ui.rest.service.admin.security.user.userprofile.UnlockUserProfileService.fetchUserProfile(UnlockUserProfileService.java:88) ~[artifactory-rest-ui-4.11.0.jar:na] at org.artifactory.ui.rest.service.admin.security.user.userprofile.UnlockUserProfileService.execute(UnlockUserProfileService.java:67) ~[artifactory-rest-ui-4.11.0.jar:na] at org.artifactory.rest.common.service.ServiceExecutor.process(ServiceExecutor.java:38) ~[artifactory-rest-common-4.11.0.jar:na] at org.artifactory.rest.common.resource.BaseResource.runService(BaseResource.java:92) ~[artifactory-rest-common-4.11.0.jar:na] at org.artifactory.ui.rest.resource.admin.security.user.UserProfileResource.unlockUserProfile(UserProfileResource.java:55) ~[artifactory-rest-ui-4.11.0.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_101] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_101] 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.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:729) [servlet-api.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) [catalina.jar:8.0.32] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.32] at org.artifactory.webapp.servlet.RepoFilter.execute(RepoFilter.java:200) [artifactory-web-application-4.11.0.jar:na] at org.artifactory.webapp.servlet.RepoFilter.doFilter(RepoFilter.java:91) [artifactory-web-application-4.11.0.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.32] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.32] at org.artifactory.webapp.servlet.AccessFilter.useAuthentication(AccessFilter.java:381) [artifactory-web-application-4.11.0.jar:na] at org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:203) [artifactory-web-application-4.11.0.jar:na] at org.artifactory.webapp.servlet.AccessFilter.doFilter(AccessFilter.java:157) [artifactory-web-application-4.11.0.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.32] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.32] at org.artifactory.webapp.servlet.RequestFilter.doFilter(RequestFilter.java:61) [artifactory-web-application-4.11.0.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.32] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.32] at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:111) [artifactory-web-application-4.11.0.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.32] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.32] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [catalina.jar:8.0.32] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [catalina.jar:8.0.32] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [catalina.jar:8.0.32] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:8.0.32] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [catalina.jar:8.0.32] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522) [catalina.jar:8.0.32] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095) [tomcat-coyote.jar:8.0.32] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672) [tomcat-coyote.jar:8.0.32] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500) [tomcat-coyote.jar:8.0.32] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456) [tomcat-coyote.jar:8.0.32] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_101] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_101] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.0.32] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_101] {code} Steps to reproduce: 1) Make sure your master key is encrypted 2) Create a user in 4.9.0 - 4.11.1 3) Unlock the user so it has an encrypted password 4) Decrypt the master key 5) Log in as the new user and try to unlock the user, stacktrace happens

    JFrog JIRA | 6 months ago | Aaron Rhodes
    java.lang.IllegalStateException: Cannot decode encrypted key pair without master wrapper for Encoded key ['AReXXXXXXXX_485','AU8XXXXXXXX_136']

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Cannot decode encrypted key pair without master wrapper for Encoded key ['AReXXXXXXXX_485','AU8XXXXXXXX_136']

      at org.jfrog.security.crypto.EncodedKeyPair.decode()
    2. org.jfrog.security
      JFrogCryptoHelper.createKeyWrapper
      1. org.jfrog.security.crypto.EncodedKeyPair.decode(EncodedKeyPair.java:61)[jfrog-crypto-1.0.0.jar:na]
      2. org.jfrog.security.crypto.JFrogCryptoHelper.createKeyWrapper(JFrogCryptoHelper.java:77)[jfrog-crypto-1.0.0.jar:na]
      2 frames
    3. org.artifactory.security
      SecurityServiceImpl.createEncryptedPasswordIfNeeded
      1. org.artifactory.security.SecurityServiceImpl.createEncryptedPasswordIfNeeded(SecurityServiceImpl.java:1432)[artifactory-core-4.11.0.jar:na]
      1 frame
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_101]
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_101]
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_101]
      4. java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_101]
      4 frames
    5. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201)[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      2 frames
    6. com.sun.proxy
      $Proxy24.createEncryptedPasswordIfNeeded
      1. com.sun.proxy.$Proxy24.createEncryptedPasswordIfNeeded(Unknown Source)[na:na]
      1 frame
    7. org.artifactory.ui
      UnlockUserProfileService.execute
      1. org.artifactory.ui.rest.service.admin.security.user.userprofile.UnlockUserProfileService.updateUserInfo(UnlockUserProfileService.java:123)[artifactory-rest-ui-4.11.0.jar:na]
      2. org.artifactory.ui.rest.service.admin.security.user.userprofile.UnlockUserProfileService.getUserProfile(UnlockUserProfileService.java:101)[artifactory-rest-ui-4.11.0.jar:na]
      3. org.artifactory.ui.rest.service.admin.security.user.userprofile.UnlockUserProfileService.fetchUserProfile(UnlockUserProfileService.java:88)[artifactory-rest-ui-4.11.0.jar:na]
      4. org.artifactory.ui.rest.service.admin.security.user.userprofile.UnlockUserProfileService.execute(UnlockUserProfileService.java:67)[artifactory-rest-ui-4.11.0.jar:na]
      4 frames
    8. org.artifactory.rest
      BaseResource.runService
      1. org.artifactory.rest.common.service.ServiceExecutor.process(ServiceExecutor.java:38)[artifactory-rest-common-4.11.0.jar:na]
      2. org.artifactory.rest.common.resource.BaseResource.runService(BaseResource.java:92)[artifactory-rest-common-4.11.0.jar:na]
      2 frames
    9. org.artifactory.ui
      UserProfileResource.unlockUserProfile
      1. org.artifactory.ui.rest.resource.admin.security.user.UserProfileResource.unlockUserProfile(UserProfileResource.java:55)[artifactory-rest-ui-4.11.0.jar:na]
      1 frame
    10. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_101]
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_101]
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_101]
      4. java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_101]
      4 frames
    11. Jersey
      WebApplicationImpl.handleRequest
      1. com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)[jersey-server-1.19.jar:1.19]
      2. com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)[jersey-server-1.19.jar:1.19]
      3. com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)[jersey-server-1.19.jar:1.19]
      4. com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)[jersey-server-1.19.jar:1.19]
      5. com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)[jersey-server-1.19.jar:1.19]
      6. com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)[jersey-server-1.19.jar:1.19]
      7. com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)[jersey-server-1.19.jar:1.19]
      8. com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)[jersey-server-1.19.jar:1.19]
      9. com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)[jersey-server-1.19.jar:1.19]
      10. com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)[jersey-server-1.19.jar:1.19]
      11. com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)[jersey-server-1.19.jar:1.19]
      11 frames
    12. Jersey
      ServletContainer.service
      1. com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)[jersey-servlet-1.19.jar:1.19]
      2. com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)[jersey-servlet-1.19.jar:1.19]
      3. com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)[jersey-servlet-1.19.jar:1.19]
      3 frames
    13. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:729)[servlet-api.jar:na]
      1 frame
    14. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)[catalina.jar:8.0.32]
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)[catalina.jar:8.0.32]
      2 frames
    15. org.artifactory.webapp
      RepoFilter.doFilter
      1. org.artifactory.webapp.servlet.RepoFilter.execute(RepoFilter.java:200)[artifactory-web-application-4.11.0.jar:na]
      2. org.artifactory.webapp.servlet.RepoFilter.doFilter(RepoFilter.java:91)[artifactory-web-application-4.11.0.jar:na]
      2 frames
    16. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)[catalina.jar:8.0.32]
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)[catalina.jar:8.0.32]
      2 frames
    17. org.artifactory.webapp
      AccessFilter.doFilter
      1. org.artifactory.webapp.servlet.AccessFilter.useAuthentication(AccessFilter.java:381)[artifactory-web-application-4.11.0.jar:na]
      2. org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:203)[artifactory-web-application-4.11.0.jar:na]
      3. org.artifactory.webapp.servlet.AccessFilter.doFilter(AccessFilter.java:157)[artifactory-web-application-4.11.0.jar:na]
      3 frames
    18. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)[catalina.jar:8.0.32]
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)[catalina.jar:8.0.32]
      2 frames
    19. org.artifactory.webapp
      RequestFilter.doFilter
      1. org.artifactory.webapp.servlet.RequestFilter.doFilter(RequestFilter.java:61)[artifactory-web-application-4.11.0.jar:na]
      1 frame
    20. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)[catalina.jar:8.0.32]
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)[catalina.jar:8.0.32]
      2 frames
    21. org.artifactory.webapp
      ArtifactoryFilter.doFilter
      1. org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:111)[artifactory-web-application-4.11.0.jar:na]
      1 frame
    22. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)[catalina.jar:8.0.32]
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)[catalina.jar:8.0.32]
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)[catalina.jar:8.0.32]
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)[catalina.jar:8.0.32]
      5. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)[catalina.jar:8.0.32]
      6. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)[catalina.jar:8.0.32]
      7. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)[catalina.jar:8.0.32]
      8. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)[catalina.jar:8.0.32]
      8 frames
    23. Grizzly HTTP
      NioEndpoint$SocketProcessor.run
      1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)[tomcat-coyote.jar:8.0.32]
      2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)[tomcat-coyote.jar:8.0.32]
      3. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)[tomcat-coyote.jar:8.0.32]
      4. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)[tomcat-coyote.jar:8.0.32]
      4 frames
    24. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_101]
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_101]
      2 frames
    25. Tomcat Util
      TaskThread$WrappingRunnable.run
      1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)[tomcat-util.jar:8.0.32]
      1 frame
    26. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)[na:1.8.0_101]
      1 frame