<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        color:black;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>Hi Marek,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Thanks for your response.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Already I have set a role in keycloak application as giggzouser and I have set the same in my web.xml file.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><img width=907 height=357 id="Picture_x0020_1" src="cid:image001.png@01D18A86.D27A5BA0"></span><span style='color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>After enabling the logs, it shows up this<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>2016-03-30 03:39:26,843 DEBUG [org.keycloak.adapters.PreAuthActionsHandler] (default task-7) adminRequest http://hostname:8080/appname/rest/giggzoLogin/userLogin<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>2016-03-30 03:39:26,845 DEBUG [org.keycloak.adapters.undertow.KeycloakUndertowAccount] (default task-7) session is active<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>2016-03-30 03:39:26,845 DEBUG [org.keycloak.adapters.undertow.ServletSessionTokenStore] (default task-7) Cached account found<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>2016-03-30 03:39:26,845 DEBUG [org.keycloak.adapters.wildfly.WildflyRequestAuthenticator] (default task-7) propagate security context to wildfly<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>2016-03-30 03:39:26,845 DEBUG [org.keycloak.adapters.RequestAuthenticator] (default task-7) AUTHENTICATED: was cached<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>2016-03-30 03:39:26,846 DEBUG [org.keycloak.adapters.AuthenticatedActionsHandler] (default task-7) AuthenticatedActionsValve.invoke http ://hostname:8080/appname /rest/giggzoLogin/userLogin<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>After which, I get forbidden on screen.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Please find the web.xml file attached to this mail.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><p class=MsoNormal><span style='color:#1F497D'>Thanks,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#1F497D'>Jayapriya Atheesan</span><span style='color:#1F497D'><o:p></o:p></span></p></div><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> Marek Posolda [mailto:mposolda@redhat.com] <br><b>Sent:</b> Wednesday, March 30, 2016 12:42 PM<br><b>To:</b> JAYAPRIYA ATHEESAN; keycloak-dev@lists.jboss.org<br><b>Subject:</b> Re: [keycloak-dev] 403 Forbidden when invoking application secured with keycloak<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>It looks that your user either doesn't have roles or your client doesn't have scope. Take a look at examples for more inspiration. For logging, you can enable DEBUG logging for category "org.keycloak" in standalone/configuration/standalone.xml<br><br>Marek<br><br>On 30/03/16 08:13, JAYAPRIYA ATHEESAN wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>Hi,<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Greetings of the day !!<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>I need an urgent help from your team.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>I have an application deployed in wildfly server. The same has been secured with keycloak server(this runs of a different wildfly box).<o:p></o:p></p><p class=MsoNormal>The wildfly server has been configured with keycloak adapter. <o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>When I invoke a page from the application deployed in wildfly server, the application , redirects to keycloak login page. After I click submit entering user name and password, I get 403 forbidden error.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Is there a way to enable logs for keycloak adapter. I’m not getting any logs related to this error.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>The issue is similar to the one addressed in <a href="http://lists.jboss.org/pipermail/keycloak-user/2015-February/001601.html">http://lists.jboss.org/pipermail/keycloak-user/2015-February/001601.html</a><o:p></o:p></p><p class=MsoNormal><a href="http://lists.jboss.org/pipermail/keycloak-user/2014-November/001280.html">http://lists.jboss.org/pipermail/keycloak-user/2014-November/001280.html</a><o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Please help me in resolving the same.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Below are the details of the server :<o:p></o:p></p><p class=MsoNormal>Wildfly 9.0.0CR2<o:p></o:p></p><p class=MsoNormal>Keycloak 1.6.0 Final<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Thanks,<o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt'>Jayapriya Atheesan</span><o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><br><br><br><o:p></o:p></span></p><pre>_______________________________________________<o:p></o:p></pre><pre>keycloak-dev mailing list<o:p></o:p></pre><pre><a href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a><o:p></o:p></pre><pre><a href="https://lists.jboss.org/mailman/listinfo/keycloak-dev">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a><o:p></o:p></pre></blockquote><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p> </o:p></span></p></div></body></html>