<div dir="ltr">Is the realm-public-key the same in keycloak.json in database service as it is in the realm you have?</div><div class="gmail_extra"><br><div class="gmail_quote">On 21 December 2015 at 00:11, Martin Min <span dir="ltr"><<a href="mailto:lingvisa@gmail.com" target="_blank">lingvisa@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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:<div>"</div><div><p style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">Goto: <a href="http://localhost:8080/product-portal" target="_blank">products</a> | <a href="http://localhost:8080/auth/realms/demo/protocol/openid-connect/logout?redirect_uri=%2Fcustomer-portal" target="_blank">logout</a> | <a href="http://localhost:8080/auth/realms/demo/account?referrer=customer-portal" target="_blank">manage acct</a></p><p style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"><b>Caller IDToken values</b> (<i>You can specify what is returned in IDToken in the customer-portal claims page in the admin console</i>:</p><p style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">Username: lingvisa</p><p style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">Email: <a href="mailto:lingvisa@gmail.com" target="_blank">lingvisa@gmail.com</a></p><p style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">Full Name: martin</p><p style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">First: martin</p><h2 style="color:rgb(0,0,0);font-family:'Times New Roman'">Customer Listing</h2><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium;background-color:rgb(227,246,206)">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</span><br></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium;background-color:rgb(227,246,206)">"</span></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium;background-color:rgb(227,246,206)"><br></span></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium;background-color:rgb(227,246,206)">My Json file in database-service application:</span></div><div><span style="background-color:rgb(227,246,206)"><font color="#000000" face="Times New Roman" size="3"><div>{</div><div> "realm": "demo",</div><div> "realm-public-key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAg3cFXIGDZzubQg+31kGsG6yYK+nsrkx4FB4BHnn9mCFjcan0LACZDt3rOqFuA2Z9J1sJsLACbrEZMgLoYl0XtnZyobs99lKrKJkSnwDi10ptQ24M1eYrqBs84VOv4t8xLLg34Em7033mPOXtEFVU0s1kcawZCD30vMwbYXyyOrK5peoLBoGeY9dUZLRPEJ/hrGZxkrWjNobd4Gkf5FTMdKAqTJtf/YqYsvBP5VrJT+yIuLBw8sq+cZKqBdAvb6nuOs6UEZpioEos9KWaTryxn0MYY1r75g9Udd0FSW+e+5Pm7+J+wDQVEkJ+tEXoiv9JADHc9BgHM6eqwzavpryPWwIDAQAB",</div><div> "bearer-only": true,</div><div> "ssl-required": "external",</div><div> "resource": "database-service"</div><div>}</div><div><br></div><div>What might cause the 401 error message? Thank you.</div><div><br></div><div>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:</div><div><br></div><div>client protocol: openid-connect</div><div>access type: barer-only</div><div><br></div><div>Without any URLs used, as in customer-portal and product-portal. </div><div><br></div><div>Thank you.</div><div><br></div><div><br></div></font></span></div></div>
<br>_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br></blockquote></div><br></div>