[NEON] Key Generation with secp256k1 [message #1740531] |
Mon, 15 August 2016 12:52  |
Eclipse User |
|
|
|
With new Scout Neon, the generation of a new Scout-Project compiles, but the client can't connect, because the generation of the key pair fails. I'm working on Linux Fedora24 x64 with jdk1.8.0_101.
On generation of the new scout project this warning is thrown, but the project is generated:
[WARNING]: Could not generate a new key pair.
java.security.InvalidAlgorithmParameterException: Unknown curve name: secp256k1
at sun.security.ec.ECKeyPairGenerator.initialize(ECKeyPairGenerator.java:100)
at java.security.KeyPairGenerator$Delegate.initialize(KeyPairGenerator.java:667)
at org.eclipse.scout.sdk.core.util.CoreUtils.generateKeyPair(CoreUtils.java:126)
at org.eclipse.scout.sdk.core.s.project.ScoutProjectNewHelper.generateKeyPair(ScoutProjectNewHelper.java:123)
at org.eclipse.scout.sdk.core.s.project.ScoutProjectNewHelper.createProject(ScoutProjectNewHelper.java:106)
at org.eclipse.scout.sdk.s2e.operation.project.ScoutProjectNewOperation.run(ScoutProjectNewOperation.java:95)
at org.eclipse.scout.sdk.s2e.job.ResourceBlockingOperationJob.run(ResourceBlockingOperationJob.java:104)
at org.eclipse.scout.sdk.s2e.job.AbstractResourceBlockingJob.doRun(AbstractResourceBlockingJob.java:87)
at org.eclipse.scout.sdk.s2e.job.AbstractResourceBlockingJob.run(AbstractResourceBlockingJob.java:75)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
[WARNING]: Could not generate a new key pair.
java.security.InvalidAlgorithmParameterException: Unknown curve name: secp256k1
at sun.security.ec.ECKeyPairGenerator.initialize(ECKeyPairGenerator.java:100)
at java.security.KeyPairGenerator$Delegate.initialize(KeyPairGenerator.java:667)
at org.eclipse.scout.sdk.core.util.CoreUtils.generateKeyPair(CoreUtils.java:126)
at org.eclipse.scout.sdk.core.s.project.ScoutProjectNewHelper.generateKeyPair(ScoutProjectNewHelper.java:123)
at org.eclipse.scout.sdk.core.s.project.ScoutProjectNewHelper.createProject(ScoutProjectNewHelper.java:107)
at org.eclipse.scout.sdk.s2e.operation.project.ScoutProjectNewOperation.run(ScoutProjectNewOperation.java:95)
at org.eclipse.scout.sdk.s2e.job.ResourceBlockingOperationJob.run(ResourceBlockingOperationJob.java:104)
at org.eclipse.scout.sdk.s2e.job.AbstractResourceBlockingJob.doRun(AbstractResourceBlockingJob.java:87)
at org.eclipse.scout.sdk.s2e.job.AbstractResourceBlockingJob.run(AbstractResourceBlockingJob.java:75)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Where an how do I have do put in the key pair into the configuration? On starting the client, this error is thrown and I presume, this is somehow related to the missing key pair:
2016-08-15 14:47:48,004 INFO [main] org.eclipse.scout.dev.jetty.JettyServer - Starting Jetty with resourceBase=/home/u111979/workspaces/clique/trunk/clique/clique.ui.html.app.dev/src/main/webapp - MDC[]
2016-08-15 14:47:48,030 INFO [main] org.eclipse.jetty.server.Server - jetty-9.2.13.v20150730 - MDC[]
2016-08-15 14:47:48,141 INFO [main] org.eclipse.jetty.webapp.StandardDescriptorProcessor - NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet - MDC[]
2016-08-15 14:47:48,270 INFO [Thread-9] org.eclipse.scout.rt.platform.inventory.internal.JandexInventoryBuilder - forcing rebuild of index 'file:/home/u111979/workspaces/clique/trunk/clique/clique.ui.html/target/classes/META-INF/jandex.idx'. scanning location... - MDC[]
2016-08-15 14:47:48,423 INFO [Thread-9] org.eclipse.scout.rt.platform.inventory.internal.JandexInventoryBuilder - forcing rebuild of index 'file:/home/u111979/workspaces/clique/trunk/clique/clique.client/target/classes/META-INF/jandex.idx'. scanning location... - MDC[]
2016-08-15 14:47:48,434 INFO [Thread-9] org.eclipse.scout.rt.platform.inventory.internal.JandexInventoryBuilder - forcing rebuild of index 'file:/home/u111979/workspaces/clique/trunk/clique/clique.shared/target/classes/META-INF/jandex.idx'. scanning location... - MDC[]
2016-08-15 14:47:48,438 INFO [Thread-9] org.eclipse.scout.rt.platform.inventory.ClassInventory - Finished preparation of jandex class inventory in 233.264369 ms - MDC[]
2016-08-15 14:47:48,720 INFO [Thread-9] org.eclipse.scout.rt.platform.job.internal.DevelopmentThreadNameDecorator - +++ Development thread name decoration - MDC[]
2016-08-15 14:47:48,727 INFO [Thread-9] org.eclipse.scout.rt.platform.logger.LoggerPlatformListener - registered logger support [org.eclipse.scout.rt.platform.logger.LogbackLoggerSupport] - MDC[]
2016-08-15 14:47:48,728 INFO [Thread-9] org.eclipse.scout.rt.shared.services.common.code.CodeTypeRegistrator - 0 code type classes registered. - MDC[]
2016-08-15 14:47:48,752 INFO [Thread-9] org.eclipse.scout.rt.shared.servicetunnel.RegisterTunnelToServerPlatformListener - Tunnel to server proxies registered. - MDC[]
2016-08-15 14:47:48,754 INFO [Thread-9] org.eclipse.scout.rt.shared.servicetunnel.http.MultiSessionCookieStoreInstaller - Successfully installed java.net.CookieManager@5e4fac9b (Cookie store: org.eclipse.scout.rt.shared.servicetunnel.http.MultiSessionCookieStore@9596e8f) - MDC[]
2016-08-15 14:47:48,868 INFO [main] org.eclipse.jetty.server.handler.ContextHandler - Started o.e.s.d.j.P_WebAppContext@5d76b067{/,file:/home/u111979/workspaces/clique/trunk/clique/clique.ui.html.app.dev/src/main/webapp/,AVAILABLE} - MDC[]
2016-08-15 14:47:48,872 ERROR [scout-thread-2 ClientNotificationPoller] org.eclipse.scout.rt.client.clientnotification.ClientNotificationPoller - Error receiving client notifications - MDC[principal=notification-authenticator, jobName=ClientNotificationPoller]
org.eclipse.scout.rt.platform.exception.PlatformException: org.eclipse.scout.rt.platform.exception.PlatformException: Invalid signature setup [translator=org.eclipse.scout.rt.platform.exception.DefaultRuntimeExceptionTranslator, user=notification-authenticator, calling-thread=scout-thread-2 ClientNotificationPoller, job=Tunneling service request [seq=1, submitter=ClientNotificationPoller]]
at org.eclipse.scout.rt.platform.exception.DefaultRuntimeExceptionTranslator.translateInternal(DefaultRuntimeExceptionTranslator.java:54)
at org.eclipse.scout.rt.platform.exception.DefaultRuntimeExceptionTranslator.translate(DefaultRuntimeExceptionTranslator.java:37)
at org.eclipse.scout.rt.platform.exception.DefaultRuntimeExceptionTranslator.translate(DefaultRuntimeExceptionTranslator.java:1)
at org.eclipse.scout.rt.platform.job.internal.JobExceptionTranslator.translateExecutionException(JobExceptionTranslator.java:63)
at org.eclipse.scout.rt.platform.job.internal.JobFutureTask.awaitDoneAndGet(JobFutureTask.java:392)
at org.eclipse.scout.rt.platform.job.internal.JobFutureTask.awaitDoneAndGet(JobFutureTask.java:381)
at org.eclipse.scout.rt.shared.servicetunnel.http.HttpServiceTunnel.tunnel(HttpServiceTunnel.java:230)
at org.eclipse.scout.rt.shared.servicetunnel.AbstractServiceTunnel.invokeService(AbstractServiceTunnel.java:48)
at org.eclipse.scout.rt.shared.servicetunnel.AbstractServiceTunnel.invokeService(AbstractServiceTunnel.java:42)
at org.eclipse.scout.rt.shared.servicetunnel.http.HttpServiceTunnel.invokeService(HttpServiceTunnel.java:191)
at org.eclipse.scout.rt.shared.servicetunnel.ServiceTunnelProxyProducer.invoke(ServiceTunnelProxyProducer.java:43)
at org.eclipse.scout.rt.platform.interceptor.DecoratingProxy.invokeImpl(DecoratingProxy.java:134)
at org.eclipse.scout.rt.platform.interceptor.DecoratingProxy$P_InvocationHandler.invoke(DecoratingProxy.java:172)
at com.sun.proxy.$Proxy16.getNotifications(Unknown Source)
at org.eclipse.scout.rt.client.clientnotification.ClientNotificationPoller$P_NotificationPoller.run(ClientNotificationPoller.java:84)
at org.eclipse.scout.rt.platform.util.concurrent.Callables$1.call(Callables.java:37)
at org.eclipse.scout.rt.platform.util.concurrent.Callables$1.call(Callables.java:1)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:185)
at org.eclipse.scout.rt.platform.job.internal.ExceptionProcessor.intercept(ExceptionProcessor.java:41)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:180)
at org.eclipse.scout.rt.platform.context.RunContextRunner$1.call(RunContextRunner.java:42)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:185)
at org.eclipse.scout.rt.platform.security.SubjectProcessor$1.run(SubjectProcessor.java:47)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.eclipse.scout.rt.platform.security.SubjectProcessor.intercept(SubjectProcessor.java:43)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:180)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain.call(CallableChain.java:135)
at org.eclipse.scout.rt.platform.context.RunContext.call(RunContext.java:121)
at org.eclipse.scout.rt.platform.context.RunContextRunner.intercept(RunContextRunner.java:38)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:180)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain.call(CallableChain.java:135)
at org.eclipse.scout.rt.platform.job.internal.JobFutureTask$1.call(JobFutureTask.java:100)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.eclipse.scout.rt.platform.job.internal.JobFutureTask.run(JobFutureTask.java:160)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.eclipse.scout.rt.platform.job.internal.NamedThreadFactory$1.run(NamedThreadFactory.java:54)
Caused by: java.io.IOException: org.eclipse.scout.rt.platform.exception.PlatformException: Invalid signature setup
at org.eclipse.scout.rt.shared.servicetunnel.http.HttpServiceTunnel.addSignatureHeader(HttpServiceTunnel.java:137)
at org.eclipse.scout.rt.shared.servicetunnel.http.HttpServiceTunnel.addCustomHeaders(HttpServiceTunnel.java:125)
at org.eclipse.scout.rt.shared.servicetunnel.http.HttpServiceTunnel.createURLConnection(HttpServiceTunnel.java:113)
at org.eclipse.scout.rt.shared.servicetunnel.http.RemoteServiceInvocationCallable.call(RemoteServiceInvocationCallable.java:73)
at org.eclipse.scout.rt.shared.servicetunnel.http.RemoteServiceInvocationCallable.call(RemoteServiceInvocationCallable.java:1)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:185)
at org.eclipse.scout.rt.platform.context.RunContextRunner$1.call(RunContextRunner.java:42)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:185)
... 12 common frames omitted
Caused by: org.eclipse.scout.rt.platform.exception.PlatformException: Invalid signature setup
at org.eclipse.scout.rt.shared.servicetunnel.http.DefaultAuthToken.init(DefaultAuthToken.java:103)
at org.eclipse.scout.rt.shared.servicetunnel.http.HttpServiceTunnel.createAuthToken(HttpServiceTunnel.java:164)
at org.eclipse.scout.rt.shared.servicetunnel.http.HttpServiceTunnel.addSignatureHeader(HttpServiceTunnel.java:131)
... 19 common frames omitted
Caused by: org.eclipse.scout.rt.platform.exception.ProcessingException: unable to create signature. [severity=ERROR]
at org.eclipse.scout.rt.platform.security.SecurityUtility.createSignature(SecurityUtility.java:423)
at org.eclipse.scout.rt.shared.servicetunnel.http.DefaultAuthToken.sign(DefaultAuthToken.java:156)
at org.eclipse.scout.rt.shared.servicetunnel.http.DefaultAuthToken.init(DefaultAuthToken.java:100)
... 21 common frames omitted
Caused by: java.security.spec.InvalidKeySpecException: java.security.InvalidKeyException: IOException : DerInputStream.getLength(): lengthTag=96, too big.
at sun.security.ec.ECKeyFactory.engineGeneratePrivate(ECKeyFactory.java:169)
at java.security.KeyFactory.generatePrivate(KeyFactory.java:366)
at org.eclipse.scout.rt.platform.security.SecurityUtility.createSignature(SecurityUtility.java:413)
... 23 common frames omitted
Caused by: java.security.InvalidKeyException: IOException : DerInputStream.getLength(): lengthTag=96, too big.
at sun.security.pkcs.PKCS8Key.decode(PKCS8Key.java:351)
at sun.security.pkcs.PKCS8Key.decode(PKCS8Key.java:356)
at sun.security.ec.ECPrivateKeyImpl.<init>(ECPrivateKeyImpl.java:73)
at sun.security.ec.ECKeyFactory.implGeneratePrivate(ECKeyFactory.java:237)
at sun.security.ec.ECKeyFactory.engineGeneratePrivate(ECKeyFactory.java:165)
... 25 common frames omitted
2016-08-15 14:47:48,883 INFO [main] org.eclipse.jetty.server.ServerConnector - Started ServerConnector@4a615877{HTTP/1.1}{0.0.0.0:8082} - MDC[]
|
|
|
|
Re: [NEON] Key Generation with secp256k1 [message #1741163 is a reply to message #1740754] |
Tue, 23 August 2016 12:24   |
Eclipse User |
|
|
|
Jeremie Bresson wrote on Thu, 18 August 2016 03:25
My guess is that the hello-world application is not correctly generated (we are using maven archetypes to create the initial project). Let compare your result with what I got. My guess is that the "scout.auth.privatekey" and "scout.auth.publickey" are not correctly generated.
Hi Jeremie
Thats exactly the thruth because on generating the application, the key pair should be generated. In each config.properties file exist the missing key: scout.auth.privatekey=TODO_use_org.eclipse.scout.rt.platform.security.SecurityUtility.main(String[]))
Trying to generate the key pair with the mentioned standalone java class org.eclipse.scout.rt.platform.security.SecurityUtility throws the same exception.
Debugging the process shows, that the package sun.security is provided in the Linux distribution of Eclipse Scout Neon without the branch sun.security.ec and hence missing the class ECKeyPairGenerator from this class.
|
|
|
Re: [NEON] Key Generation with secp256k1 [message #1741933 is a reply to message #1741163] |
Tue, 30 August 2016 16:30   |
Eclipse User |
|
|
|
The Problem is that the requested security algorithm is not provided by the JVM you use to run Eclipse IDE and the Scout Application.
Which JVM (Version and implementation) are you using?
Do you know what KeyPairGenerator algorithms are available in the JVM you use?
I think it is possible to change the algo used by your scout application, but this requires some work... If you know what you can use, I might be able to help you with the requested changes.
|
|
|
|
Re: [NEON] Key Generation with secp256k1 [message #1775027 is a reply to message #1742248] |
Mon, 23 October 2017 17:03   |
Eclipse User |
|
|
|
I am having this issue in a Linux environment (Centos 7.0) with OpenJDK8. Was there any resolution?
My OpenSSL does support secp256k1 but I am not sure how to make the jump from there to TODO_use_org.eclipse.scout.rt.platform.security.SecurityUtility.main(String[])).
A solution would be great as I am sure others have been discouraged by this.
I am aware this is an old post.
[Updated on: Mon, 23 October 2017 17:04] by Moderator Report message to a moderator
|
|
|
Re: [NEON] Key Generation with secp256k1 [message #1775072 is a reply to message #1775027] |
Tue, 24 October 2017 10:15   |
Eclipse User |
|
|
|
Hi Dan
If your system does not support the default algorithm you can replace this mechanism.
This is done by implementing the Scout Bean 'org.eclipse.scout.rt.platform.security.ISecurityProvider'. The easiest way could be to subclass the current default implementation 'org.eclipse.scout.rt.platform.security.SunSecurityProvider' and add an @Replace annotation to your subclass.
Then you can first try to choose a different curve by overriding the method 'getEllipticCurveName' using a curve that exists on your system and satifies your security needs.
If this is not successful, then you have to change the implementation of the methods createSignature, verifySignature and createKeyPair using the algorithms of your choice.
Then you can run org.eclipse.scout.rt.platform.security.SecurityUtility.main(String[]) which will create new public- and private-key pair for you. Please ensure that the jar containing your new provider is on the classpath when running that command.
The private and public keys can then be stored in your config.properties.
Please note that the description above applies to Scout version 7.0 (Oxygen).
Does this help?
Kind regards
Mat
|
|
|
|
Re: [NEON] Key Generation with secp256k1 [message #1775550 is a reply to message #1775100] |
Tue, 31 October 2017 23:44   |
Eclipse User |
|
|
|
OK. So Either I associated my issue with this post because they both referenced "Error receiving client notifications " or I actually saw a reference to "secp256k1". I actually hold myself to a higher standard then to quote "secp256k1" without seeing it but it is no longer referenced in the compilation output. After Thinking that the Java environments should be the same I explicitly pointed Eclipse to the Java 1.8 JDK via the eclipse.ini file and got the below error output. Centos 7.0 environment.
INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:3.0.1:generate (default-cli) > generate-sources @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:3.0.1:generate (default-cli) < generate-sources @ standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:3.0.1:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Batch mode
[INFO] Archetype repository not defined. Using the one from [org.eclipse.scout.archetypes:scout-helloworld-app:7.1.0.001_Photon_M2] found in catalog remote
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: scout-helloworld-app:6.0.300.RC2
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: org.eclipse.scout.apps
[INFO] Parameter: artifactId, Value: helloworld3
[INFO] Parameter: version, Value: 1.0.0-SNAPSHOT
[INFO] Parameter: package, Value: org.eclipse.scout.apps.helloworld3
[INFO] Parameter: packageInPathFormat, Value: org/eclipse/scout/apps/helloworld3
[INFO] Parameter: scoutAuthPublicKeyDev, Value: TODO_use_org.eclipse.scout.rt.platform.security.SecurityUtility.main(String[]))
[INFO] Parameter: groupId, Value: org.eclipse.scout.apps
[INFO] Parameter: version, Value: 1.0.0-SNAPSHOT
[INFO] Parameter: scoutAuthPublicKey, Value: TODO_use_org.eclipse.scout.rt.platform.security.SecurityUtility.main(String[]))
[INFO] Parameter: scoutAuthPrivateKeyDev, Value: TODO_use_org.eclipse.scout.rt.platform.security.SecurityUtility.main(String[]))
[INFO] Parameter: userName, Value: dmumford
[INFO] Parameter: displayName, Value: My Application
[INFO] Parameter: package, Value: org.eclipse.scout.apps.helloworld3
[INFO] Parameter: javaVersion, Value: 1.8
[INFO] Parameter: artifactId, Value: helloworld3
[INFO] Parameter: scoutAuthPrivateKey, Value: TODO_use_org.eclipse.scout.rt.platform.security.SecurityUtility.main(String[]))
[INFO] Parent element not overwritten in /home/dmumford/workspace/helloworld3/helloworld3/pom.xml
[WARNING] Don't override file /home/dmumford/workspace/helloworld3/helloworld3/pom.xml
[INFO] Parent element not overwritten in /home/dmumford/workspace/helloworld3/helloworld3.shared/pom.xml
[INFO] Parent element not overwritten in /home/dmumford/workspace/helloworld3/helloworld3.server/pom.xml
[INFO] Parent element not overwritten in /home/dmumford/workspace/helloworld3/helloworld3.client/pom.xml
[INFO] Parent element not overwritten in /home/dmumford/workspace/helloworld3/helloworld3.server.app.war/pom.xml
[INFO] Parent element not overwritten in /home/dmumford/workspace/helloworld3/helloworld3.server.app.dev/pom.xml
[INFO] Parent element not overwritten in /home/dmumford/workspace/helloworld3/helloworld3.ui.html/pom.xml
[INFO] Parent element not overwritten in /home/dmumford/workspace/helloworld3/helloworld3.ui.html.app.war/pom.xml
[INFO] Parent element not overwritten in /home/dmumford/workspace/helloworld3/helloworld3.ui.html.app.dev/pom.xml
[INFO] Project created from Archetype in dir: /home/dmumford/workspace/helloworld3
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.085 s[INFO] Scanning for projects...
2017-10-31 19:26:17,118 ERROR [scout-thread-2 ClientNotificationPoller] org.eclipse.scout.rt.client.clientnotification.ClientNotificationPoller - Error receiving client notifications - MDC[principal=notification-authenticator, jobName=ClientNotificationPoller]
org.eclipse.scout.rt.platform.exception.PlatformException: org.eclipse.scout.rt.platform.exception.PlatformException: Invalid signature setup [translator=org.eclipse.scout.rt.platform.exception.DefaultRuntimeExceptionTranslator, user=notification-authenticator, calling-thread=scout-thread-2 ClientNotificationPoller, job=Tunneling service request [seq=23, submitter=ClientNotificationPoller]]
at org.eclipse.scout.rt.platform.exception.DefaultRuntimeExceptionTranslator.translateInternal(DefaultRuntimeExceptionTranslator.java:54)
at org.eclipse.scout.rt.platform.exception.DefaultRuntimeExceptionTranslator.translate(DefaultRuntimeExceptionTranslator.java:37)
at org.eclipse.scout.rt.platform.exception.DefaultRuntimeExceptionTranslator.translate(DefaultRuntimeExceptionTranslator.java:1)
at org.eclipse.scout.rt.platform.job.internal.JobExceptionTranslator.translateExecutionException(JobExceptionTranslator.java:63)
at org.eclipse.scout.rt.platform.job.internal.JobFutureTask.awaitDoneAndGet(Jo"secp256k1"bFutureTask.java:392)
at org.eclipse.scout.rt.platform.job.internal.JobFutureTask.awaitDoneAndGet(JobFutureTask.java:381)
at org.eclipse.scout.rt.shared.servicetunnel.http.HttpServiceTunnel.tunnel(HttpServiceTunnel.java:247)
at org.eclipse.scout.rt.shared.servicetunnel.AbstractServiceTunnel.invokeService(AbstractServiceTunnel.java:52)
at org.eclipse.scout.rt.shared.servicetunnel.AbstractServiceTunnel.invokeService(AbstractServiceTunnel.java:44)
at org.eclipse.scout.rt.shared.servicetunnel.http.HttpServiceTunnel.invokeService(HttpServiceTunnel.java:208)
at org.eclipse.scout.rt.shared.servicetunnel.ServiceTunnelProxyProducer.invoke(ServiceTunnelProxyProducer.java:43)
at org.eclipse.scout.rt.platform.interceptor.DecoratingProxy.invokeImpl(DecoratingProxy.java:134)
at org.eclipse.scout.rt.platform.interceptor.DecoratingProxy$P_InvocationHandler.invoke(DecoratingProxy.java:172)
at com.sun.proxy.$Proxy17.getNotifications(Unknown Source)
at org.eclipse.scout.rt.client.clientnotification.ClientNotificationPoller$P_NotificationPoller.run(ClientNotificationPoller.java:84)
at org.eclipse.scout.rt.platform.util.concurrent.Callables$1.call(Callables.java:37)
at org.eclipse.scout.rt.platform.util.concurrent.Callables$1.call(Callables.java:1)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:185)
at org.eclipse.scout.rt.platform.job.internal.ExceptionProcessor.intercept(ExceptionProcessor.java:41)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:180)
at org.eclipse.scout.rt.platform.context.RunContextRunner$1.call(RunContextRunner.java:42)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:185)
at org.eclipse.scout.rt.platform.security.SubjectProcessor$1.run(SubjectProcessor.java:47)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.eclipse.scout.rt.platform.security.SubjectProcessor.intercept(SubjectProcessor.java:43)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:180)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain.call(CallableChain.java:135)
at org.eclipse.scout.rt.platform.context.RunContext.call(RunContext.java:121)
at org.eclipse.scout.rt.platform.context.RunContextRunner.intercept(RunContextRunner.java:38)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:180)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain.call(CallableChain.java:135)
at org.eclipse.scout.rt.platform.job.internal.JobFutureTask$1.call(JobFutureTask.java:100)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.eclipse.scout.rt.platform.job.internal.JobFutureTask.run(JobFutureTask.java:160)
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)
at org.eclipse.scout.rt.platform.job.internal.NamedThreadFactory$1.run(NamedThreadFactory.java:54)
Caused by: java.io.IOException: org.eclipse.scout.rt.platform.exception.PlatformException: Invalid signature setup
at org.eclipse.scout.rt.shared.servicetunnel.http.HttpServiceTunnel.addSignatureHeader(HttpServiceTunnel.java:154)
at org.eclipse.scout.rt.shared.servicetunnel.http.HttpServiceTunnel.addCustomHeaders(HttpServiceTunnel.java:126)
at org.eclipse.scout.rt.shared.servicetunnel.http.HttpServiceTunnel.addCustomHeaders(HttpServiceTunnel.java:143)
at org.eclipse.scout.rt.shared.servicetunnel.http.HttpServiceTunnel.createURLConnection(HttpServiceTunnel.java:113)
at org.eclipse.scout.rt.shared.servicetunnel.http.RemoteServiceInvocationCallable.call(RemoteServiceInvocationCallable.java:73)
at org.eclipse.scout.rt.shared.servicetunnel.http.RemoteServiceInvocationCallable.call(RemoteServiceInvocationCallable.java:1)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:185)
at org.eclipse.scout.rt.platform.context.RunContextRunner$1.call(RunContextRunner.java:42)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:185)
... 12 common frames omitted
Caused by: org.eclipse.scout.rt.platform.exception.PlatformException: Invalid signature setup
at org.eclipse.scout.rt.shared.servicetunnel.http.DefaultAuthToken.init(DefaultAuthToken.java:103)
at org.eclipse.scout.rt.shared.servicetunnel.http.HttpServiceTunnel.createAuthToken(HttpServiceTunnel.java:181)
at org.eclipse.scout.rt.shared.servicetunnel.http.HttpServiceTunnel.addSignatureHeader(HttpServiceTunnel.java:148)
... 20 common frames omitted
Caused by: org.eclipse.scout.rt.platform.exception.ProcessingException: unable to create signature. [severity=ERROR]
at org.eclipse.scout.rt.platform.security.SecurityUtility.createSignature(SecurityUtility.java:423)
at org.eclipse.scout.rt.shared.servicetunnel.http.DefaultAuthToken.sign(DefaultAuthToken.java:156)
at org.eclipse.scout.rt.shared.servicetunnel.http.DefaultAuthToken.init(DefaultAuthToken.java:100)
... 22 common frames omitted
Caused by: java.security.spec.InvalidKeySpecException: java.security.InvalidKeyException: IOException : DerInputStream.getLength(): lengthTag=96, too big.
at sun.security.ec.ECKeyFactory.engineGeneratePrivate(ECKeyFactory.java:169)
at java.security.KeyFactory.generatePrivate(KeyFactory.java:366)
at org.eclipse.scout.rt.platform.security.SecurityUtility.createSignature(SecurityUtility.java:413)
... 24 common frames omitted
Caused by: java.security.InvalidKeyException: IOException : DerInputStream.getLength(): lengthTag=96, too big.
at sun.security.pkcs.PKCS8Key.decode(PKCS8Key.java:352)
at sun.security.pkcs.PKCS8Key.decode(PKCS8Key.java:357)
at sun.security.ec.ECPrivateKeyImpl.<init>(ECPrivateKeyImpl.java:73)
at sun.security.ec.ECKeyFactory.implGeneratePrivate(ECKeyFactory.java:237)
at sun.security.ec.ECKeyFactory.engineGeneratePrivate(ECKeyFactory.java:165)
... 26 common frames omitted
Any clue? The "secp256k1" warning was not in my subsequent project creation.
[Updated on: Wed, 01 November 2017 00:03] by Moderator Report message to a moderator
|
|
|
Re: [NEON] Key Generation with secp256k1 [message #1775735 is a reply to message #1775550] |
Sat, 04 November 2017 11:22   |
Eclipse User |
|
|
|
Hi Dan
During creation of the project there are two consoles involved. One from the Scout SDK (in which the public- and private-keys are created) and one from the Maven Build. In the Maven build you've posted you can see that the parameter 'scoutAuthPublicKey' and 'scoutAuthPrivateKey' are not valid (TODO....).
This means the Scout SDK was unable to create valid public and private keys. This should be visible in the Scout SDK console. Probably because of the missing curve.
And if you run the application, you get the exception 'Invalid signature setup' because the property value ("TODO...") is not a valid private and public key.
So you probably still have the same issue now: The missing curve. This should be visible in the Scout SDK console.
Did you already succeed in replacing it with another curve or algorithm?
Kind regards
Mat
|
|
|
|
|
Re: [NEON] Key Generation with secp256k1 [message #1790539 is a reply to message #1790372] |
Tue, 12 June 2018 14:34  |
Eclipse User |
|
|
|
Hi Dan
Sorry for the late reply. The expected value is a Base64 encoded public key. Such keys can be generated using the main() method of the class org.eclipse.scout.rt.platform.security.SecurityUtility.
If the default security algorithms are not available in your JRE, you have to replace the class SunSecurityProvider with an implementation that works on your system.
Hope this helps
Mat
|
|
|
Powered by
FUDForum. Page generated in 0.04943 seconds