[keycloak-user] org.keycloak.util.PemUtils.pemToDer Bad Base64 input character decimal

Bill Burke bburke at redhat.com
Fri Oct 10 17:00:23 EDT 2014


You could just point to the admin server URL and leave out the public 
key in the keycloak.json file.  The adapter will fetch the public key 
from the server.  Let me know if that doesn't work.

On 10/10/2014 3:37 PM, Alexander Chriztopher wrote:
> Thanks ! Just noticed that. It is because am using maven filtering to dynamically update the file for each of our environments.
>
> What is the best practice to do this ? Have anyone tried using maven filtering successfully with this ?
>
>
>
>> On 10 Oct 2014, at 21:00, Bill Burke <bburke at redhat.com> wrote:
>>
>> Your keycloak.json file is corrupted by accident.
>>
>>> On 10/10/2014 1:49 PM, Alexander Chriztopher wrote:
>>> Hi all,
>>>
>>> I keep on having this error when i start my application :
>>>
>>> 19:45:36,232 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8)
>>> MSC000001: Failed to start service
>>> jboss.undertow.deployment.default-server.default-host./cv-web:
>>> _org.jboss.msc.service.StartException_in service
>>> jboss.undertow.deployment.default-server.default-host./cv-web: Failed to
>>> start service
>>>
>>> at
>>> org.jboss.msc.service.ServiceControllerImpl$StartTask.run(_ServiceControllerImpl.java:1904_)
>>> [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
>>>
>>> at
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(_ThreadPoolExecutor.java:1142_)
>>> [rt.jar:1.8.0_11]
>>>
>>> at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(_ThreadPoolExecutor.java:617_)
>>> [rt.jar:1.8.0_11]
>>>
>>> at java.lang.Thread.run(_Thread.java:745_) [rt.jar:1.8.0_11]
>>>
>>> Caused by: _java.lang.RuntimeException_: _java.io.IOException_: Bad
>>> Base64 input character decimal 36 in array position 0
>>>
>>> at
>>> org.keycloak.adapters.KeycloakDeploymentBuilder.internalBuild(_KeycloakDeploymentBuilder.java:37_)
>>>
>>> at
>>> org.keycloak.adapters.KeycloakDeploymentBuilder.build(_KeycloakDeploymentBuilder.java:84_)
>>>
>>> at
>>> org.keycloak.adapters.undertow.KeycloakServletExtension.handleDeployment(_KeycloakServletExtension.java:104_)
>>>
>>> at
>>> io.undertow.servlet.core.DeploymentManagerImpl.handleExtensions(_DeploymentManagerImpl.java:240_)
>>>
>>> at
>>> io.undertow.servlet.core.DeploymentManagerImpl.deploy(_DeploymentManagerImpl.java:149_)
>>>
>>> at
>>> org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(_UndertowDeploymentService.java:87_)
>>>
>>> at
>>> org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(_UndertowDeploymentService.java:72_)
>>>
>>> at
>>> org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(_ServiceControllerImpl.java:1948_)
>>> [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
>>>
>>> at
>>> org.jboss.msc.service.ServiceControllerImpl$StartTask.run(_ServiceControllerImpl.java:1881_)
>>> [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
>>>
>>> ... 3 more
>>>
>>> Caused by: _java.io.IOException_: Bad Base64 input character decimal 36
>>> in array position 0
>>>
>>> at net.iharder.Base64.decode(_Base64.java:1201_)
>>>
>>> at net.iharder.Base64.decode(_Base64.java:1256_)
>>>
>>> at net.iharder.Base64.decode(_Base64.java:1224_)
>>>
>>> at org.keycloak.util.PemUtils.pemToDer(_PemUtils.java:91_)
>>>
>>> at org.keycloak.util.PemUtils.decodePublicKey(_PemUtils.java:49_)
>>>
>>> at
>>> org.keycloak.adapters.KeycloakDeploymentBuilder.internalBuild(_KeycloakDeploymentBuilder.java:35_)
>>>
>>> ... 11 more
>>>
>>> Anyone knows where does this come from.
>>>
>>> Everything was working finely until today where i started getting this
>>> error. When i comment out my security stuff in web.xml it disappears.
>>>
>>> Thanks for any help.
>>>
>>>
>>>
>>> _______________________________________________
>>> keycloak-user mailing list
>>> keycloak-user at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>>
>> --
>> Bill Burke
>> JBoss, a division of Red Hat
>> http://bill.burkecentral.com
>> _______________________________________________
>> keycloak-user mailing list
>> keycloak-user at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/keycloak-user

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com


More information about the keycloak-user mailing list