Is the realm-public-key the same in keycloak.json in database service as it is in the realm you have?

On 21 December 2015 at 00:11, Martin Min <lingvisa@gmail.com> wrote:
Hello, I am new to keycloak and is having an issue to the the customer-portal tutorial running fully. After following all the instructions in the tutorial and running the customer-portal application, I received the following result:
"

Goto: products | logout | manage acct

Caller IDToken values (You can specify what is returned in IDToken in the customer-portal claims page in the admin console:

Username: lingvisa

Email: lingvisa@gmail.com

Full Name: martin

First: martin

Customer Listing

There was a failure processing request. You either didn't configure Keycloak properly, or maybe you just forgot to secure the database service? Status from database service invocation was: 401
"

My Json file in database-service application:
{
  "realm": "demo",
  "realm-public-key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAg3cFXIGDZzubQg+31kGsG6yYK+nsrkx4FB4BHnn9mCFjcan0LACZDt3rOqFuA2Z9J1sJsLACbrEZMgLoYl0XtnZyobs99lKrKJkSnwDi10ptQ24M1eYrqBs84VOv4t8xLLg34Em7033mPOXtEFVU0s1kcawZCD30vMwbYXyyOrK5peoLBoGeY9dUZLRPEJ/hrGZxkrWjNobd4Gkf5FTMdKAqTJtf/YqYsvBP5VrJT+yIuLBw8sq+cZKqBdAvb6nuOs6UEZpioEos9KWaTryxn0MYY1r75g9Udd0FSW+e+5Pm7+J+wDQVEkJ+tEXoiv9JADHc9BgHM6eqwzavpryPWwIDAQAB",
  "bearer-only": true,
  "ssl-required": "external",
  "resource": "database-service"
}

What might cause the 401 error message? Thank you.

I am using the latest download "/keycloak-demo-1.7.0.Final" and admin console is a bit different from this in the tutorial. But there is no significant difference. In the keycloak console, I created the "database" client with only two fields filled:

client protocol: openid-connect
access type: barer-only

Without any URLs used, as in customer-portal and product-portal. 

Thank you.



_______________________________________________
keycloak-user mailing list
keycloak-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user