[keycloak-user] Manually input Realm Keys
Emanuel Couto
emanuel.amaral.couto at gmail.com
Fri May 13 05:20:11 EDT 2016
Still not working, I get the same error. I've sent the steps in attachment.
I'm copying the following keys to "Realm Settings -> Keys" to the
respective input boxes. I'm leaving the certificate box empty.
*Private Key:*
MIIEogIBAAKCAQEAsoGXdarRCouoMkJDtZHqnJwdHz6M1e8ZbZmJaP3Fg44oDcg1LIy6w0jqYBKlI9PMYT6FsErxroLJX+2412k/PvZ0zKE9eUQn4/XVMZ6GfpKNA89fhCPwwCfW3Oo+Pv9wO+6a+FTo0yeCGSpGpXrwCbFqlxkZDrhkMAiJfDa0uRx18eFYHoyt5NFxfe4Hih7EUKEX8C0De+q1inawTqkFjFwETBRw+c4KEX2O5L/GJVx+1fXTcaeNvRbGq5kN9IskD1OKu1JH3rF49f036U/g55pSkcB/uWsW9GpUSYbSs6GRBJnbRnP4HfbUqcBepMGdeu1SwjTEKteQoIS1q+LxiwIDAQABAoIBAFqzZlYvmVAWbjw7V1Qm9GLnIBUEH2OEvhLmdN+YMogJ72gxVnNwfmVD43M1hhuSPsMalatiKTNW2SOZEtbBb5V6fRaMx0Oa0foOq2ku93/Qzz4kXJA0AtxgYdiWXVJ9UHXjY3LTEgpYhM5soMDsmpMSRurHoefM4XtWmyU2VtXHOhw/ZCbszOQRJ7fjm2ZOJ3Qj0O3Xo7Q8AJ5CalGNfvieeh8p885s74tBviiBla5k3ZcXZqadUUDFd/HQHYA9f7bSJdmZE/fcayjD1ksdc4KDwaH9srDPpYF16eHYO5KwF9xjCYWptEa4ZVzA5XqAMLI9KCeEFuMjUZP1g+K8FeECgYEA6yfLaP28UphTeDJUc7adJHSUM0VSBiAn2AcIbMkToDfshELwPZf4rcxZG5LDnIRjJ+lDKGIbcIm/IJLeNMfcbtvQtWqVjimPMxVYbi7rO2S5jqKZwUGUOGiRKKtFNZw+q4hDtMxHl3pX8FIswfLMVfIccnx3ht8pQ+SlCMeZrP8CgYEAwlRMe5xNNMLtoaXMC35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 AM Stian Thorgersen <sthorger at redhat.com>
wrote:
> Keycloak expects both keys in PEM format.
>
> ssh-keygen writes the private key in PEM format, but not the public key.
> You can create the public key from the private key with ssh-keygen or
> openssl:
>
> ssh-keygen -f mykey -e -m pem
> openssl rsa -in mykey -pubout
>
>
> On 12 May 2016 at 18:46, Emanuel Couto <emanuel.amaral.couto at gmail.com>
> wrote:
>
>> Hello
>>
>> I'm trying to manually input keys in a Realm. I tried generating a key
>> pair using 'ssh-keygen':
>>
>> $ ssh-keygen
>>
>> Then I copied the content of 'id_rsa' and 'id_rsa.pub' to the input boxes
>> and pressed "Upload Keys". However an error message is shown "Failed to
>> decode public key".
>>
>> How do I manually input a key pair or certificate?
>>
>> _______________________________________________
>> keycloak-user mailing list
>> keycloak-user at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160513/cb80eb2c/attachment.html
-------------- next part --------------
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/emanuel.couto/.ssh/id_rsa): id_rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in id_rsa.
Your public key has been saved in id_rsa.pub.
The key fingerprint is:
SHA256:mB0CkvOWA6YOr5RRnzN+bN0+Jsr7V6n7cS1w2beyNsg emanuel.couto at pwecouto01
The key's randomart image is:
+---[RSA 2048]----+
| ... |
| =o . |
| o.+..o . |
|o. == = . o |
|o.o...* S . . + o|
| +. . + . . = +|
|.. o o +o.o.|
|. . . E o=. |
| ++.+.=o. |
+----[SHA256]-----+
$ cat id_rsa
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAsoGXdarRCouoMkJDtZHqnJwdHz6M1e8ZbZmJaP3Fg44oDcg1
LIy6w0jqYBKlI9PMYT6FsErxroLJX+2412k/PvZ0zKE9eUQn4/XVMZ6GfpKNA89f
hCPwwCfW3Oo+Pv9wO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SQqK4bGQ2UPYa3ptwROm8
6Z1/h6FwEqBI/BLv6buW4QKBgCni3bFvGT0cHvhOslJv4ZNIjT5EAACxaxwH1a7r
bgL6WYZHXl856DepqxhXXCcjflmJka0rLla0QCMLECqLB9B/RtVe3XwjT50dvD0z
ljgJTDzZSV5HoEKVCsF1UufVJRQo0mEjxyKwzcc4OfdxuLyjWXMAcx6ZiroPUuK7
lpLZAoGAWO+bkP9134OdPfsjnXt1hrbMhayKpgkSnN/tZWl9m6oNfpBwMJD11VwK
VHBcM+IVZX8Iklv/+pT3+KWTn0DrFlcFc+nRRs/8b78xVJ17Il2mz4P6+IYVLLdA
0Bgq7UB6GP4Xxqkbmwkc+SmPERM77V8XP6KfqbSUoCUmqybr4yI=
-----END RSA PRIVATE KEY-----
$ ssh-keygen -f id_rsa -e -m pem
-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEAsoGXdarRCouoMkJDtZHqnJwdHz6M1e8ZbZmJaP3Fg44oDcg1LIy6
w0jqYBKlI9PMYT6FsErxroLJX+2412k/PvZ0zKE9eUQn4/XVMZ6GfpKNA89fhCPw
wCfW3Oo+Pv9wO+6a+FTo0yeCGSpGpXrwCbFqlxkZDrhkMAiJfDa0uRx18eFYHoyt
5NFxfe4Hih7EUKEX8C0De+q1inawTqkFjFwETBRw+c4KEX2O5L/GJVx+1fXTcaeN
vRbGq5kN9IskD1OKu1JH3rF49f036U/g55pSkcB/uWsW9GpUSYbSs6GRBJnbRnP4
HfbUqcBepMGdeu1SwjTEKteQoIS1q+LxiwIDAQAB
-----END RSA PUBLIC KEY-----
More information about the keycloak-user
mailing list