[keycloak-user] ENV in keycloak.json does not seem to be working, base64 errors

cen imbacen at gmail.com
Tue May 17 11:25:42 EDT 2016


That works, thanks.

Bruno Oliveira je 17. 05. 2016 ob 17:12 napisal:
> Hi, try something like this:
>
> - At your standalone.xml add:
>
> <system-properties>
>          <property name="KC_AUTH_SERVER_URL" value="/auth"/>
> </system-properties>
>
> - keycloak.json
>
> {
>     "realm": "myrealm",
>     "realm-public-key": "${KC_REALM_PUBLIC_KEY}",
>     "auth-server-url": "${KC_AUTH_SERVER_URL}",
>     "ssl-required": "none",
>     "resource": "myrealm",
>     "public-client": true
> }
>
> I hope it helps.
>
>
> On 2016-05-16, cen wrote:
>> Hi
>>
>> I am trying to use env vars in keycloak.json but I am getting base64 errors.
>>
>> My keycloak.json:
>> {
>>    "realm": "myrealm",
>>    "realm-public-key": "${env.KC_REALM_PUBLIC_KEY}",
>>    "auth-server-url": "${env.KC_AUTH_SERVER_URL}",
>>    "ssl-required": "none",
>>    "resource": "myrealm",
>>    "public-client": true
>> }
>>
>> I am deploying my ear to WildFly 10 using the following properties:
>> <property name="KC_REALM_PUBLIC_KEY" value="public key here"/>
>> <property name="KC_AUTH_SERVER_URL" value="http://localhost:8080/auth"/>
>>
>> Error on deploy:
>> Bad Base64 input character decimal 36 in array position 0.. (char 36 is $)
>>
>> It seems that KC wants to parse the value as string instead of trying to
>> resolve the env variable. Looking through the code and commits
>> (https://issues.jboss.org/browse/KEYCLOAK-1289) this should work. What
>> am I doing wrong?
>>
>
>
>
>> _______________________________________________
>> keycloak-user mailing list
>> keycloak-user at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
> --
>
> abstractj
> PGP: 0x84DC9914



More information about the keycloak-user mailing list