<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.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        color:black;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.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="1026" />
</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'>Adding to it,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>2016-03-30 01:20:29,823 WARN&nbsp; [org.keycloak.adapters.OAuthRequestAuthenticator] (default task-1) <span style='background:yellow;mso-highlight:yellow'>state parameter invalid</span><o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>2016-03-30 01:20:29,823 WARN&nbsp; [org.keycloak.adapters.OAuthRequestAuthenticator] (default task-1) cookie: 3/d04bf765-63be-4c34-bb42-5f7211bf8051<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Is it the reason for the issue?<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</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>&nbsp;</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'> JAYAPRIYA ATHEESAN [mailto:jayapriya.atheesan@gmail.com] <br><b>Sent:</b> Wednesday, March 30, 2016 1:21 PM<br><b>To:</b> 'Marek Posolda'; '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>&nbsp;</o:p></p><p class=MsoNormal><span style='color:#1F497D'>Hi Marek,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</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>&nbsp;</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@01D18A87.9407EB20"><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>&nbsp;</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 <a href="http://hostname:8080/appname/rest/giggzoLogin/userLogin">http://hostname:8080/appname/rest/giggzoLogin/userLogin</a><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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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 [<a href="mailto:mposolda@redhat.com">mailto:mposolda@redhat.com</a>] <br><b>Sent:</b> Wednesday, March 30, 2016 12:42 PM<br><b>To:</b> JAYAPRIYA ATHEESAN; <a href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a><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>&nbsp;</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 &quot;org.keycloak&quot; 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>&nbsp;<o:p></o:p></p><p class=MsoNormal>Greetings of the day !!<o:p></o:p></p><p class=MsoNormal>&nbsp;<o:p></o:p></p><p class=MsoNormal>I need an urgent help from your team.<o:p></o:p></p><p class=MsoNormal>&nbsp;<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>&nbsp;<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 &nbsp;entering user name and password, I get 403 forbidden error.<o:p></o:p></p><p class=MsoNormal>&nbsp;<o:p></o:p></p><p class=MsoNormal>Is there a way to enable logs for keycloak adapter. I&#8217;m not getting any logs related to this error.<o:p></o:p></p><p class=MsoNormal>&nbsp;<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>&nbsp;<o:p></o:p></p><p class=MsoNormal>Please help me in resolving the same.<o:p></o:p></p><p class=MsoNormal>&nbsp;<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>&nbsp;<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>&nbsp;<o:p></o:p></p><p class=MsoNormal>&nbsp;<o:p></o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><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>&nbsp;</o:p></span></p></div></body></html>