[keycloak-dev] Stateless using Keycloak Jetty Adapter gives NPE

Laghuvaram, Raghu RLaghuvaram at contractor.lb.com
Tue Dec 6 10:43:10 EST 2016


Thanks for your response, If I use session store its not stateless right?
Rather than Jetty Adapter, can I make use of Java Servlet Filter adapter
and achieve stateless? Last time when I used Java Servlet Filter adapter
and set tokenstore to cookie, I didn¹t see any KEYCLOAK_ADAPTER_STATE
cookie on my application cookies or on the key cloak cookies(I used 2.3.0
Final). Would Servlet Filter adapter work in stateless way? If possible
could you please let us know if there are any other adapters which are
working good in stateless way.


Thanks,
Raghu

On 12/6/16, 2:53 AM, "Marek Posolda" <mposolda at redhat.com> wrote:

>Workaround is either to:
>1) Switch to session store
>2) Create subclass of KeycloakJettyAuthenticator and override method:
>
>protected Authentication register(Request request,
>KeycloakPrincipal<RefreshableKeycloakSecurityContext> principal)
>
>and avoid NPE somehow in your overriden version.You need to use your
>overriden class in configuration and copy the JAR with your overriden
>class to the adapter.
>
>3) Send us PR with the fix. IMO the preferred will be if it's fix with
>minimal impact and possible regressions in other adapters.
>
>Thanks,
>Marek
>
>On 05/12/16 22:27, Laghuvaram, Raghu wrote:
>> I am planning to use Keycloak Jetty Adapter(9.2) as I felt that the
>>Java Servlet Filter adapter can be used only with session and we cannot
>>make use token-store as cookie with the Servlet Adapter. But I tried
>>with Jetty Adapter I am getting NPE and I saw an open bug
>>https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.jboss.org_bro
>>wse_KEYCLOAK-2D2514&d=DgIC-g&c=spYp1tZ3AQD6dfuI6rqaeg&r=nVu6ptGZzG7TsBlQS
>>hAwtCFWgc86m6UyYR7paGbbkBE&m=VjwAiVJLvdsl3I-X5cOG2aig59yDf0LxJ-bdRU9QazM&
>>s=p40oWUvYe87wOt6MbQWkMF_Nsbr0qVhaE-nIKYJV7GE&e= .  Is there any other
>>workaround for this so that I can achieve stateless?
>>
>>
>> Thanks,
>> Raghu
>>
>>
>> ________________________________
>>
>> Notice: This communication may contain privileged and/or confidential
>>information. If you are not the intended recipient, please notify the
>>sender by email, and immediately delete the message and any attachments
>>without copying or disclosing them. LB may, for any reason, intercept,
>>access, use, and disclose any information that is communicated by or
>>through, or which is stored on, its networks, applications, services,
>>and devices.
>> _______________________________________________
>> keycloak-dev mailing list
>> keycloak-dev at lists.jboss.org
>>
>>https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.jboss.org_mail
>>man_listinfo_keycloak-2Ddev&d=DgIC-g&c=spYp1tZ3AQD6dfuI6rqaeg&r=nVu6ptGZz
>>G7TsBlQShAwtCFWgc86m6UyYR7paGbbkBE&m=VjwAiVJLvdsl3I-X5cOG2aig59yDf0LxJ-bd
>>RU9QazM&s=WJP2Fs5Fu1tAHefojVESaRgcj-4FlaLv8j3Ink3NGFs&e=
>
>


________________________________

Notice: This communication may contain privileged and/or confidential information. If you are not the intended recipient, please notify the sender by email, and immediately delete the message and any attachments without copying or disclosing them. LB may, for any reason, intercept, access, use, and disclose any information that is communicated by or through, or which is stored on, its networks, applications, services, and devices.



More information about the keycloak-dev mailing list