From stian at redhat.com Mon Jun 1 02:44:08 2015 From: stian at redhat.com (Stian Thorgersen) Date: Mon, 1 Jun 2015 02:44:08 -0400 (EDT) Subject: [keycloak-user] Cancel button handling on keycloak login page In-Reply-To: References: Message-ID: <294612284.9545570.1433141048537.JavaMail.zimbra@redhat.com> ----- Original Message ----- > From: "Roman Usatenko" > To: keycloak-user at lists.jboss.org > Sent: Saturday, 30 May, 2015 1:39:33 AM > Subject: [keycloak-user] Cancel button handling on keycloak login page > > Hello, > > I am trying to implement POC with keycloak as auth* server. > > Here is my set up / use case: > > > * Tomcat server with keycloak adapter > * Web app with a URL http://x.y/app/secure protected by a security > constraint. > * An unauthenticated user goes to the URL and gets redirected by the > adapter to the keycloak login page. > * The user clicks Cancel button and gets redirected back to the URL with > parameters ?error=access_denied&state=1%2Fxxxx > * This redirect is intercepted by the adapter and user's browser gets 400 > error from the adapter. My application never receives the request. > So my questions are: > > 1. Is this correct description of what's going on or am I missing something? > > 2. If this is the behavior by design wouldn't it be better instead of the 400 > error to redirect user to some themed page on the keycloak server with a > nice explanation, like "We're sorry, but you cannot access this resource > without authentication, blablabla " You can decide how the 400 error page looks like for your application by configuring error pages in web.xml (see for example https://blog.whitehatsec.com/error-handling-in-java-web-xml/) > > Thank you, > Roman Usatenko. > > > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user From bburke at redhat.com Mon Jun 1 07:14:02 2015 From: bburke at redhat.com (Bill Burke) Date: Mon, 01 Jun 2015 07:14:02 -0400 Subject: [keycloak-user] keycloak Identity broker for Custom Authentication In-Reply-To: <1335464390.1624624.1432986911233.JavaMail.yahoo@mail.yahoo.com> References: <55693A8B.4060207@redhat.com> <1335464390.1624624.1432986911233.JavaMail.yahoo@mail.yahoo.com> Message-ID: <556C3E7A.1020409@redhat.com> No docs sorry. We'll be refactoring our SPIs and deciding which will be made public post 1.3 On 5/30/2015 7:55 AM, Raghu Prabhala wrote: > Thanks Bill. That helps. Now I am able to see the custom identity broker > in the combobox. But when I choose it, I get a "page not found". It > appears that I have to create a couple of html pages under the themes to > display the content and perhaps modify some .js to show that page > (looking at other identity providers to understand what needs to be > done). Is there any documentation that outlines what we need to do? > ------------------------------------------------------------------------ > *From:* Bill Burke > *To:* keycloak-user at lists.jboss.org > *Sent:* Saturday, May 30, 2015 12:20 AM > *Subject:* Re: [keycloak-user] keycloak Identity broker for Custom > Authentication > > We haven't really made this SPI public, but you must specif a > META-IN/services/org...IdentityProviderFactory file within the jar of > your broker. You'll see an example file in th eoidc module. > > > > On 5/29/2015 10:19 PM, Raghu Prabhala wrote: > > Hi, > > > > I am wondering if anyone implemented an Identity Broker for custom > > authentication? If so, would appreciate some input on how to achieve > that? > > > > I tried implementing one using the existing OIDC broker as the starting > > point but the option to select this custom broker doesn't appear in the > > GUI. So my question is, what changes must be made in the GUI to make the > > custom broker visible? Appreciate any pointers > > > > Thanks, > > Raghu > > > > > > > _______________________________________________ > > keycloak-user mailing list > > keycloak-user at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/keycloak-user > > > > -- > Bill Burke > JBoss, a division of Red Hat > http://bill.burkecentral.com > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user > > > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com From vainnkiitta at gmail.com Mon Jun 1 08:44:43 2015 From: vainnkiitta at gmail.com (John) Date: Mon, 1 Jun 2015 18:14:43 +0530 Subject: [keycloak-user] Not able to forward to error page. Message-ID: I am trying to integarte keycloak authentication for securing my application. My server and client has different error status code mapping. In case of accessToken expires keycloak sends 401 directly to client where I have mapped token expiration to status code 5401. I do not wish to change this mapping as code is already in production phase. I found very helpful way to handle this situaltion by providing error-page in my server web.xml as KEYCLOAK winterfell /error But somehow I am not able to get this error page. Can someone please suggest correct way of doing this. Note : Following way didn't worked for me 404 /error -TR John From srossillo at smartling.com Mon Jun 1 09:44:22 2015 From: srossillo at smartling.com (Scott Rossillo) Date: Mon, 1 Jun 2015 09:44:22 -0400 Subject: [keycloak-user] Update user when "Email as username" enabled In-Reply-To: <926AA9D1-A94B-48D1-8B20-FF9681CB6325@smartling.com> References: <926AA9D1-A94B-48D1-8B20-FF9681CB6325@smartling.com> Message-ID: <6B6C8DB3-5643-402F-AB14-2DAFED93B056@smartling.com> Any advice here? Do I have to delete and re-create the user? I?d really rather not do that. Seems there should be a way to update the username. Thanks in advance, Scott > On May 29, 2015, at 4:53 PM, Scott Rossillo wrote: > > If I?m using email as username, I can update the email address on a user via the admin API, but the username doesn?t update even when explicitly setting a new username. This is true in the KC admin console as well. > > How do I update the username to match the new email address? > > Thanks, > Scott > From Henk.Laracker at planonsoftware.com Mon Jun 1 15:06:55 2015 From: Henk.Laracker at planonsoftware.com (Henk Laracker) Date: Mon, 1 Jun 2015 21:06:55 +0200 Subject: [keycloak-user] IDP SAMLV2.0 with Salesforce In-Reply-To: <554376F2.3090805@redhat.com> References: <5542BA2B.2010608@redhat.com> <1970499048.89811.1430443394466.JavaMail.yahoo@mail.yahoo.com> <55437613.3030501@redhat.com> <554376F2.3090805@redhat.com> Message-ID: Hi Bill, Can you please help me out how I have to make a mapping so that I can remove the prefix. Met vriendelijke groet / Yours sincerely / Mit freundlichen Gr??en / Tr?s cordialement, Henk Laracker On 01/05/15 14:52, "Bill Burke" wrote: >I'll add a username mapper. > >On 5/1/2015 8:48 AM, Bill Burke wrote: >> You can map the SAML/OIDC assertion/token that is sent to your >> applications however you want. >> >> On 4/30/2015 9:23 PM, Raghu Prabhala wrote: >>> Bill - That would be an issue for us as we cannot manipulate the values >>> (especially username) sent by an external IDP which is the >>>authoritative >>> source of user information. We will have to figure out another way, >>> perhaps, an internal KC user attribute that can be made unique to >>> prevent name clashes. >>> >>> Thanks, >>> Raghu >>> >>>------------------------------------------------------------------------ >>> *From:* Bill Burke >>> *To:* Henk Laracker ; >>> "keycloak-user at lists.jboss.org" >>> *Sent:* Thursday, April 30, 2015 7:26 PM >>> *Subject:* Re: [keycloak-user] IDP SAMLV2.0 with Salesforce >>> >>> Right now, the username is prefixed with the broker name. THis is to >>> avoid name clashes if you are brokering multiple IDPS (i.e. multiple >>> social providers). >>> >>> On 4/30/2015 2:51 PM, Henk Laracker wrote: >>> > Hi Bill, >>> > >>> > Thank you this worked out! I user is created with my name >>> > saml.henk.laracker at p ***n.nl , do you >>> have any idee why the ?saml? prefix >>> > is added? >>> > >>> > >>> > Henk >>> > >>> > On 30/04/15 18:44, "Bill Burke" >> > wrote: >>> > >>> >> Ok, I was able to get this to work. The problem was I had to set >>>a >>> >> "profile" for the connected app on Salesforce. I added a "System >>> >> Adminstrator" profile to the Connected App and it worked. >>> >> >>> >> I'm not sure how to upload a app certificate yet. Not sure what >>>format >>> >> Salesforce is looking for. >>> >> >>> >> On 4/30/2015 11:39 AM, Bill Burke wrote: >>> >>> I set up a salesforce example and looked at the login response >>>SAML >>> >>> document. Looks like no assertion data is being sent back at >>>all by >>> >>> salesforce. >>> >>> >>> >>> On 4/30/2015 9:43 AM, Bill Burke wrote: >>> >>>> i have no idea. Basically this error is stating that the login >>> >>>> response >>> >>>> saml document has no assertions within it. If there are no >>> assertions, >>> >>>> then there has been no identity data sent. >>> >>>> >>> >>>> I'm looking now, but can you send me a link on how to set up >>> Salesforce >>> >>>> as an IDP? Is one able to set up a free account and such? >>> >>>> >>> >>>> On 4/30/2015 9:25 AM, Henk Laracker wrote: >>> >>>>> Hi Bill, >>> >>>>> >>> >>>>> I don?t know why I missed that, thanks! Salesforce respons >>>know with >>> >>>>> the >>> >>>>> correct login page. After logging in in Salesforce, I?m >>>redirected to >>> >>>>> keycloak again with a internal error: >>> >>>>> >>> >>>>> Caused by: >>>org.keycloak.broker.provider.IdentityBrokerException: >>> >>>>> Could not >>> >>>>> process response from SAML identity provider. >>> >>>>> at >>> >>>>> >>> >>>>> >>> org.keycloak.broker.saml.SAMLEndpoint$Binding.handleLoginResponse(SAMLE >>> >>>>> ndpo >>> >>>>> int.java:299) >>> >>>>> at >>> >>>>> >>> >>>>> >>> org.keycloak.broker.saml.SAMLEndpoint$Binding.handleSamlResponse(SAMLEn >>> >>>>> dpoi >>> >>>>> nt.java:343) >>> >>>>> at >>> >>>>> >>> >>>>> >>> org.keycloak.broker.saml.SAMLEndpoint$Binding.execute(SAMLEndpoint.java >>> >>>>> :169 >>> >>>>> ) >>> >>>>> at >>> >>>>> >>> >>>>> >>> org.keycloak.broker.saml.SAMLEndpoint.postBinding(SAMLEndpoint.java:117 >>> >>>>> ) >>> >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >>>Method) >>> >>>>> [rt.jar:1.8.0_45] >>> >>>>> at >>> >>>>> >>> >>>>> >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja >>> >>>>> va:6 >>> >>>>> 2) [rt.jar:1.8.0_45] >>> >>>>> at >>> >>>>> >>> >>>>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso >>> >>>>> rImp >>> >>>>> l.java:43) [rt.jar:1.8.0_45] >>> >>>>> at java.lang.reflect.Method.invoke(Method.java:497) >>> [rt.jar:1.8.0_45] >>> >>>>> at >>> >>>>> >>> >>>>> >>> org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.ja >>> >>>>> va:1 >>> >>>>> 37) [resteasy-jaxrs-3.0.10.Final.jar:] >>> >>>>> at >>> >>>>> >>> >>>>> >>> org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMe >>> >>>>> thod >>> >>>>> Invoker.java:296) [resteasy-jaxrs-3.0.10.Final.jar:] >>> >>>>> at >>> >>>>> >>> >>>>> >>> org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvo >>> >>>>> ker. >>> >>>>> java:250) [resteasy-jaxrs-3.0.10.Final.jar:] >>> >>>>> at >>> >>>>> >>> >>>>> >>> org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(Res >>> >>>>> ourc >>> >>>>> eLocatorInvoker.java:140) [resteasy-jaxrs-3.0.10.Final.jar:] >>> >>>>> at >>> >>>>> >>> >>>>> >>> org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorIn >>> >>>>> voke >>> >>>>> r.java:109) [resteasy-jaxrs-3.0.10.Final.jar:] >>> >>>>> at >>> >>>>> >>> >>>>> >>> org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(Res >>> >>>>> ourc >>> >>>>> eLocatorInvoker.java:135) [resteasy-jaxrs-3.0.10.Final.jar:] >>> >>>>> at >>> >>>>> >>> >>>>> >>> org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorIn >>> >>>>> voke >>> >>>>> r.java:103) [resteasy-jaxrs-3.0.10.Final.jar:] >>> >>>>> at >>> >>>>> >>> >>>>> >>> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatc >>> >>>>> her. >>> >>>>> java:356) [resteasy-jaxrs-3.0.10.Final.jar:] >>> >>>>> ... 39 more >>> >>>>> Caused by: >>>org.keycloak.broker.provider.IdentityBrokerException: No >>> >>>>> assertion from response. >>> >>>>> at >>> >>>>> >>> >>>>> >>> org.keycloak.broker.saml.SAMLEndpoint$Binding.getAssertion(SAMLEndpoint >>> >>>>> .jav >>> >>>>> a:309) >>> >>>>> at >>> >>>>> >>> >>>>> >>> org.keycloak.broker.saml.SAMLEndpoint$Binding.handleLoginResponse(SAMLE >>> >>>>> ndpo >>> >>>>> int.java:264) >>> >>>>> ... 54 more >>> >>>>> >>> >>>>> Any idea? >>> >>>>> >>> >>>>> Henk >>> >>>>> >>> >>>>> >>> >>>>> >>> >>>>> >>> >>>>> On 30/04/15 14:31, "Bill Burke" >> > wrote: >>> >>>>> >>> >>>>>> You want to chain keycloak server to Salesforce? >>> >>>>>> >>> >>>>>> If you create a SAMLv2 IdentityProvider in keycloak that >>>points to >>> >>>>>> Salesforce, you;ll see after you create it, an Export button. >>> Click >>> >>>>>> that. That will create an entity descriptor with all the >>> information >>> >>>>>> you need. >>> >>>>>> >>> >>>>>> On 4/30/2015 2:45 AM, Henk Laracker wrote: >>> >>>>>>> Hi, >>> >>>>>>> >>> >>>>>>> I like to use Salesforce as Identity Provider, the metadata >>> >>>>>>> provided by >>> >>>>>>> salesforce can be imported. >>> >>>>>>> But I need to specify the Service Provider in salesforce, I >>>have to >>> >>>>>>> fill >>> >>>>>>> in a couple of fields, but two of them I don?t understand >>>(and are >>> >>>>>>> mandatory). Does someone have any clue >>> >>>>>>> >>> >>>>>>> 1. entity id , remark of salesforce : get this value >>>from your >>> >>>>>>> serviceprovider >>> >>>>>>> 2. ACS URL, remark of slaesforce : The assertion >>>consumer >>> >>>>>>> service. Get >>> >>>>>>> this value from your service provider. >>> >>>>>>> >>> >>>>>>> I have tried a lot of values but every-time I click the saml >>>button >>> >>>>>>> on >>> >>>>>>> my app, it redirects to salesforce but I get a page with the >>> error : >>> >>>>>>> Error: Unable to resolve request into a Service Provider >>> >>>>>>> >>> >>>>>>> Henk >>> >>>>>>> >>> >>>>>>> >>> >>>>>>> _______________________________________________ >>> >>>>>>> keycloak-user mailing list >>> >>>>>>> keycloak-user at lists.jboss.org >>> >>> >>>>>>> https://lists.jboss.org/mailman/listinfo/keycloak-user >>> >>>>>>> >>> >>>>>> >>> >>>>>> -- >>> >>>>>> Bill Burke >>> >>>>>> JBoss, a division of Red Hat >>> >>>>>> http://bill.burkecentral.com >>> >>> >>> >>> >>>>>> _______________________________________________ >>> >>>>>> keycloak-user mailing list >>> >>>>>> keycloak-user at lists.jboss.org >>> >>> >>>>>> https://lists.jboss.org/mailman/listinfo/keycloak-user >>> >>>>> >>> >>>> >>> >>> >>> >> >>> >> -- >>> >> Bill Burke >>> >> JBoss, a division of Red Hat >>> >> http://bill.burkecentral.com >>> >> _______________________________________________ >>> >> keycloak-user mailing list >>> >> keycloak-user at lists.jboss.org >>> >>> >> https://lists.jboss.org/mailman/listinfo/keycloak-user >>> > >>> >>> -- >>> Bill Burke >>> JBoss, a division of Red Hat >>> http://bill.burkecentral.com >>> _______________________________________________ >>> keycloak-user mailing list >>> keycloak-user at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/keycloak-user >>> >>> >> > >-- >Bill Burke >JBoss, a division of Red Hat >http://bill.burkecentral.com >_______________________________________________ >keycloak-user mailing list >keycloak-user at lists.jboss.org >https://lists.jboss.org/mailman/listinfo/keycloak-user From bburke at redhat.com Mon Jun 1 15:31:55 2015 From: bburke at redhat.com (Bill Burke) Date: Mon, 01 Jun 2015 15:31:55 -0400 Subject: [keycloak-user] IDP SAMLV2.0 with Salesforce In-Reply-To: References: <5542BA2B.2010608@redhat.com> <1970499048.89811.1430443394466.JavaMail.yahoo@mail.yahoo.com> <55437613.3030501@redhat.com> <554376F2.3090805@redhat.com> Message-ID: <556CB32B.3010406@redhat.com> Its in master, will be in next release. On 6/1/2015 3:06 PM, Henk Laracker wrote: > Hi Bill, > > Can you please help me out how I have to make a mapping so that I can > remove the prefix. > > Met vriendelijke groet / Yours sincerely / Mit freundlichen Gr??en / Tr?s > cordialement, > > Henk Laracker > > > > > On 01/05/15 14:52, "Bill Burke" wrote: > >> I'll add a username mapper. >> >> On 5/1/2015 8:48 AM, Bill Burke wrote: >>> You can map the SAML/OIDC assertion/token that is sent to your >>> applications however you want. >>> >>> On 4/30/2015 9:23 PM, Raghu Prabhala wrote: >>>> Bill - That would be an issue for us as we cannot manipulate the values >>>> (especially username) sent by an external IDP which is the >>>> authoritative >>>> source of user information. We will have to figure out another way, >>>> perhaps, an internal KC user attribute that can be made unique to >>>> prevent name clashes. >>>> >>>> Thanks, >>>> Raghu >>>> >>>> ------------------------------------------------------------------------ >>>> *From:* Bill Burke >>>> *To:* Henk Laracker ; >>>> "keycloak-user at lists.jboss.org" >>>> *Sent:* Thursday, April 30, 2015 7:26 PM >>>> *Subject:* Re: [keycloak-user] IDP SAMLV2.0 with Salesforce >>>> >>>> Right now, the username is prefixed with the broker name. THis is to >>>> avoid name clashes if you are brokering multiple IDPS (i.e. multiple >>>> social providers). >>>> >>>> On 4/30/2015 2:51 PM, Henk Laracker wrote: >>>> > Hi Bill, >>>> > >>>> > Thank you this worked out! I user is created with my name >>>> > saml.henk.laracker at p ***n.nl , do you >>>> have any idee why the ?saml? prefix >>>> > is added? >>>> > >>>> > >>>> > Henk >>>> > >>>> > On 30/04/15 18:44, "Bill Burke" >>> > wrote: >>>> > >>>> >> Ok, I was able to get this to work. The problem was I had to set >>>> a >>>> >> "profile" for the connected app on Salesforce. I added a "System >>>> >> Adminstrator" profile to the Connected App and it worked. >>>> >> >>>> >> I'm not sure how to upload a app certificate yet. Not sure what >>>> format >>>> >> Salesforce is looking for. >>>> >> >>>> >> On 4/30/2015 11:39 AM, Bill Burke wrote: >>>> >>> I set up a salesforce example and looked at the login response >>>> SAML >>>> >>> document. Looks like no assertion data is being sent back at >>>> all by >>>> >>> salesforce. >>>> >>> >>>> >>> On 4/30/2015 9:43 AM, Bill Burke wrote: >>>> >>>> i have no idea. Basically this error is stating that the login >>>> >>>> response >>>> >>>> saml document has no assertions within it. If there are no >>>> assertions, >>>> >>>> then there has been no identity data sent. >>>> >>>> >>>> >>>> I'm looking now, but can you send me a link on how to set up >>>> Salesforce >>>> >>>> as an IDP? Is one able to set up a free account and such? >>>> >>>> >>>> >>>> On 4/30/2015 9:25 AM, Henk Laracker wrote: >>>> >>>>> Hi Bill, >>>> >>>>> >>>> >>>>> I don?t know why I missed that, thanks! Salesforce respons >>>> know with >>>> >>>>> the >>>> >>>>> correct login page. After logging in in Salesforce, I?m >>>> redirected to >>>> >>>>> keycloak again with a internal error: >>>> >>>>> >>>> >>>>> Caused by: >>>> org.keycloak.broker.provider.IdentityBrokerException: >>>> >>>>> Could not >>>> >>>>> process response from SAML identity provider. >>>> >>>>> at >>>> >>>>> >>>> >>>>> >>>> org.keycloak.broker.saml.SAMLEndpoint$Binding.handleLoginResponse(SAMLE >>>> >>>>> ndpo >>>> >>>>> int.java:299) >>>> >>>>> at >>>> >>>>> >>>> >>>>> >>>> org.keycloak.broker.saml.SAMLEndpoint$Binding.handleSamlResponse(SAMLEn >>>> >>>>> dpoi >>>> >>>>> nt.java:343) >>>> >>>>> at >>>> >>>>> >>>> >>>>> >>>> org.keycloak.broker.saml.SAMLEndpoint$Binding.execute(SAMLEndpoint.java >>>> >>>>> :169 >>>> >>>>> ) >>>> >>>>> at >>>> >>>>> >>>> >>>>> >>>> org.keycloak.broker.saml.SAMLEndpoint.postBinding(SAMLEndpoint.java:117 >>>> >>>>> ) >>>> >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >>>> Method) >>>> >>>>> [rt.jar:1.8.0_45] >>>> >>>>> at >>>> >>>>> >>>> >>>>> >>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja >>>> >>>>> va:6 >>>> >>>>> 2) [rt.jar:1.8.0_45] >>>> >>>>> at >>>> >>>>> >>>> >>>>> >>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso >>>> >>>>> rImp >>>> >>>>> l.java:43) [rt.jar:1.8.0_45] >>>> >>>>> at java.lang.reflect.Method.invoke(Method.java:497) >>>> [rt.jar:1.8.0_45] >>>> >>>>> at >>>> >>>>> >>>> >>>>> >>>> org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.ja >>>> >>>>> va:1 >>>> >>>>> 37) [resteasy-jaxrs-3.0.10.Final.jar:] >>>> >>>>> at >>>> >>>>> >>>> >>>>> >>>> org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMe >>>> >>>>> thod >>>> >>>>> Invoker.java:296) [resteasy-jaxrs-3.0.10.Final.jar:] >>>> >>>>> at >>>> >>>>> >>>> >>>>> >>>> org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvo >>>> >>>>> ker. >>>> >>>>> java:250) [resteasy-jaxrs-3.0.10.Final.jar:] >>>> >>>>> at >>>> >>>>> >>>> >>>>> >>>> org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(Res >>>> >>>>> ourc >>>> >>>>> eLocatorInvoker.java:140) [resteasy-jaxrs-3.0.10.Final.jar:] >>>> >>>>> at >>>> >>>>> >>>> >>>>> >>>> org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorIn >>>> >>>>> voke >>>> >>>>> r.java:109) [resteasy-jaxrs-3.0.10.Final.jar:] >>>> >>>>> at >>>> >>>>> >>>> >>>>> >>>> org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(Res >>>> >>>>> ourc >>>> >>>>> eLocatorInvoker.java:135) [resteasy-jaxrs-3.0.10.Final.jar:] >>>> >>>>> at >>>> >>>>> >>>> >>>>> >>>> org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorIn >>>> >>>>> voke >>>> >>>>> r.java:103) [resteasy-jaxrs-3.0.10.Final.jar:] >>>> >>>>> at >>>> >>>>> >>>> >>>>> >>>> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatc >>>> >>>>> her. >>>> >>>>> java:356) [resteasy-jaxrs-3.0.10.Final.jar:] >>>> >>>>> ... 39 more >>>> >>>>> Caused by: >>>> org.keycloak.broker.provider.IdentityBrokerException: No >>>> >>>>> assertion from response. >>>> >>>>> at >>>> >>>>> >>>> >>>>> >>>> org.keycloak.broker.saml.SAMLEndpoint$Binding.getAssertion(SAMLEndpoint >>>> >>>>> .jav >>>> >>>>> a:309) >>>> >>>>> at >>>> >>>>> >>>> >>>>> >>>> org.keycloak.broker.saml.SAMLEndpoint$Binding.handleLoginResponse(SAMLE >>>> >>>>> ndpo >>>> >>>>> int.java:264) >>>> >>>>> ... 54 more >>>> >>>>> >>>> >>>>> Any idea? >>>> >>>>> >>>> >>>>> Henk >>>> >>>>> >>>> >>>>> >>>> >>>>> >>>> >>>>> >>>> >>>>> On 30/04/15 14:31, "Bill Burke" >>> > wrote: >>>> >>>>> >>>> >>>>>> You want to chain keycloak server to Salesforce? >>>> >>>>>> >>>> >>>>>> If you create a SAMLv2 IdentityProvider in keycloak that >>>> points to >>>> >>>>>> Salesforce, you;ll see after you create it, an Export button. >>>> Click >>>> >>>>>> that. That will create an entity descriptor with all the >>>> information >>>> >>>>>> you need. >>>> >>>>>> >>>> >>>>>> On 4/30/2015 2:45 AM, Henk Laracker wrote: >>>> >>>>>>> Hi, >>>> >>>>>>> >>>> >>>>>>> I like to use Salesforce as Identity Provider, the metadata >>>> >>>>>>> provided by >>>> >>>>>>> salesforce can be imported. >>>> >>>>>>> But I need to specify the Service Provider in salesforce, I >>>> have to >>>> >>>>>>> fill >>>> >>>>>>> in a couple of fields, but two of them I don?t understand >>>> (and are >>>> >>>>>>> mandatory). Does someone have any clue >>>> >>>>>>> >>>> >>>>>>> 1. entity id , remark of salesforce : get this value >>> >from your >>>> >>>>>>> serviceprovider >>>> >>>>>>> 2. ACS URL, remark of slaesforce : The assertion >>>> consumer >>>> >>>>>>> service. Get >>>> >>>>>>> this value from your service provider. >>>> >>>>>>> >>>> >>>>>>> I have tried a lot of values but every-time I click the saml >>>> button >>>> >>>>>>> on >>>> >>>>>>> my app, it redirects to salesforce but I get a page with the >>>> error : >>>> >>>>>>> Error: Unable to resolve request into a Service Provider >>>> >>>>>>> >>>> >>>>>>> Henk >>>> >>>>>>> >>>> >>>>>>> >>>> >>>>>>> _______________________________________________ >>>> >>>>>>> keycloak-user mailing list >>>> >>>>>>> keycloak-user at lists.jboss.org >>>> >>>> >>>>>>> https://lists.jboss.org/mailman/listinfo/keycloak-user >>>> >>>>>>> >>>> >>>>>> >>>> >>>>>> -- >>>> >>>>>> Bill Burke >>>> >>>>>> JBoss, a division of Red Hat >>>> >>>>>> http://bill.burkecentral.com >>>> >>>> >>>> >>>> >>>>>> _______________________________________________ >>>> >>>>>> keycloak-user mailing list >>>> >>>>>> keycloak-user at lists.jboss.org >>>> >>>> >>>>>> https://lists.jboss.org/mailman/listinfo/keycloak-user >>>> >>>>> >>>> >>>> >>>> >>> >>>> >> >>>> >> -- >>>> >> Bill Burke >>>> >> JBoss, a division of Red Hat >>>> >> http://bill.burkecentral.com >>>> >> _______________________________________________ >>>> >> keycloak-user mailing list >>>> >> keycloak-user at lists.jboss.org >>>> >>>> >> https://lists.jboss.org/mailman/listinfo/keycloak-user >>>> > >>>> >>>> -- >>>> Bill Burke >>>> JBoss, a division of Red Hat >>>> http://bill.burkecentral.com >>>> _______________________________________________ >>>> keycloak-user mailing list >>>> keycloak-user at lists.jboss.org >>>> https://lists.jboss.org/mailman/listinfo/keycloak-user >>>> >>>> >>> >> >> -- >> Bill Burke >> JBoss, a division of Red Hat >> http://bill.burkecentral.com >> _______________________________________________ >> keycloak-user mailing list >> keycloak-user at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/keycloak-user > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com From Henk.Laracker at planonsoftware.com Mon Jun 1 17:09:06 2015 From: Henk.Laracker at planonsoftware.com (Henk Laracker) Date: Mon, 1 Jun 2015 23:09:06 +0200 Subject: [keycloak-user] IDP SAMLV2.0 with Salesforce In-Reply-To: <556CB32B.3010406@redhat.com> References: <5542BA2B.2010608@redhat.com> <1970499048.89811.1430443394466.JavaMail.yahoo@mail.yahoo.com> <55437613.3030501@redhat.com> <554376F2.3090805@redhat.com> <556CB32B.3010406@redhat.com> Message-ID: Hi Bill, I use the tomcat wrapper, with a saml 2.0 Identity provider configured in keycloak. I added the "principal-attribute": ?preferred_username? to the json file. I?m just a starter in SAML, Mappers etc, is there no other way to get the original email adres? Because I have no influence on the unique identifier in the application, and this value is shown in the gui, which doesn?t look nice with the prefix. If there is no possibility, can you tell me what to patch to 1.2, to make my own build. Met vriendelijke groet / Yours sincerely / Mit freundlichen Gr??en / Tr?s cordialement, Henk Laracker On 01/06/15 21:31, "Bill Burke" wrote: >Its in master, will be in next release. > >On 6/1/2015 3:06 PM, Henk Laracker wrote: >> Hi Bill, >> >> Can you please help me out how I have to make a mapping so that I can >> remove the prefix. >> >> Met vriendelijke groet / Yours sincerely / Mit freundlichen Gr??en / >>Tr?s >> cordialement, >> >> Henk Laracker >> >> >> >> >> On 01/05/15 14:52, "Bill Burke" wrote: >> >>> I'll add a username mapper. >>> >>> On 5/1/2015 8:48 AM, Bill Burke wrote: >>>> You can map the SAML/OIDC assertion/token that is sent to your >>>> applications however you want. >>>> >>>> On 4/30/2015 9:23 PM, Raghu Prabhala wrote: >>>>> Bill - That would be an issue for us as we cannot manipulate the >>>>>values >>>>> (especially username) sent by an external IDP which is the >>>>> authoritative >>>>> source of user information. We will have to figure out another way, >>>>> perhaps, an internal KC user attribute that can be made unique to >>>>> prevent name clashes. >>>>> >>>>> Thanks, >>>>> Raghu >>>>> >>>>> >>>>>---------------------------------------------------------------------- >>>>>-- >>>>> *From:* Bill Burke >>>>> *To:* Henk Laracker ; >>>>> "keycloak-user at lists.jboss.org" >>>>> *Sent:* Thursday, April 30, 2015 7:26 PM >>>>> *Subject:* Re: [keycloak-user] IDP SAMLV2.0 with Salesforce >>>>> >>>>> Right now, the username is prefixed with the broker name. THis is to >>>>> avoid name clashes if you are brokering multiple IDPS (i.e. multiple >>>>> social providers). >>>>> >>>>> On 4/30/2015 2:51 PM, Henk Laracker wrote: >>>>> > Hi Bill, >>>>> > >>>>> > Thank you this worked out! I user is created with my name >>>>> > saml.henk.laracker at p ***n.nl , do >>>>>you >>>>> have any idee why the ?saml? prefix >>>>> > is added? >>>>> > >>>>> > >>>>> > Henk >>>>> > >>>>> > On 30/04/15 18:44, "Bill Burke" >>>> > wrote: >>>>> > >>>>> >> Ok, I was able to get this to work. The problem was I had to >>>>>set >>>>> a >>>>> >> "profile" for the connected app on Salesforce. I added a >>>>>"System >>>>> >> Adminstrator" profile to the Connected App and it worked. >>>>> >> >>>>> >> I'm not sure how to upload a app certificate yet. Not sure >>>>>what >>>>> format >>>>> >> Salesforce is looking for. >>>>> >> >>>>> >> On 4/30/2015 11:39 AM, Bill Burke wrote: >>>>> >>> I set up a salesforce example and looked at the login response >>>>> SAML >>>>> >>> document. Looks like no assertion data is being sent back at >>>>> all by >>>>> >>> salesforce. >>>>> >>> >>>>> >>> On 4/30/2015 9:43 AM, Bill Burke wrote: >>>>> >>>> i have no idea. Basically this error is stating that the >>>>>login >>>>> >>>> response >>>>> >>>> saml document has no assertions within it. If there are no >>>>> assertions, >>>>> >>>> then there has been no identity data sent. >>>>> >>>> >>>>> >>>> I'm looking now, but can you send me a link on how to set up >>>>> Salesforce >>>>> >>>> as an IDP? Is one able to set up a free account and such? >>>>> >>>> >>>>> >>>> On 4/30/2015 9:25 AM, Henk Laracker wrote: >>>>> >>>>> Hi Bill, >>>>> >>>>> >>>>> >>>>> I don?t know why I missed that, thanks! Salesforce respons >>>>> know with >>>>> >>>>> the >>>>> >>>>> correct login page. After logging in in Salesforce, I?m >>>>> redirected to >>>>> >>>>> keycloak again with a internal error: >>>>> >>>>> >>>>> >>>>> Caused by: >>>>> org.keycloak.broker.provider.IdentityBrokerException: >>>>> >>>>> Could not >>>>> >>>>> process response from SAML identity provider. >>>>> >>>>> at >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>org.keycloak.broker.saml.SAMLEndpoint$Binding.handleLoginResponse(SAML >>>>>E >>>>> >>>>> ndpo >>>>> >>>>> int.java:299) >>>>> >>>>> at >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>org.keycloak.broker.saml.SAMLEndpoint$Binding.handleSamlResponse(SAMLE >>>>>n >>>>> >>>>> dpoi >>>>> >>>>> nt.java:343) >>>>> >>>>> at >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>org.keycloak.broker.saml.SAMLEndpoint$Binding.execute(SAMLEndpoint.jav >>>>>a >>>>> >>>>> :169 >>>>> >>>>> ) >>>>> >>>>> at >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>org.keycloak.broker.saml.SAMLEndpoint.postBinding(SAMLEndpoint.java:11 >>>>>7 >>>>> >>>>> ) >>>>> >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >>>>> Method) >>>>> >>>>> [rt.jar:1.8.0_45] >>>>> >>>>> at >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j >>>>>a >>>>> >>>>> va:6 >>>>> >>>>> 2) [rt.jar:1.8.0_45] >>>>> >>>>> at >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess >>>>>o >>>>> >>>>> rImp >>>>> >>>>> l.java:43) [rt.jar:1.8.0_45] >>>>> >>>>> at java.lang.reflect.Method.invoke(Method.java:497) >>>>> [rt.jar:1.8.0_45] >>>>> >>>>> at >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.j >>>>>a >>>>> >>>>> va:1 >>>>> >>>>> 37) [resteasy-jaxrs-3.0.10.Final.jar:] >>>>> >>>>> at >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceM >>>>>e >>>>> >>>>> thod >>>>> >>>>> Invoker.java:296) [resteasy-jaxrs-3.0.10.Final.jar:] >>>>> >>>>> at >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInv >>>>>o >>>>> >>>>> ker. >>>>> >>>>> java:250) [resteasy-jaxrs-3.0.10.Final.jar:] >>>>> >>>>> at >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(Re >>>>>s >>>>> >>>>> ourc >>>>> >>>>> eLocatorInvoker.java:140) [resteasy-jaxrs-3.0.10.Final.jar:] >>>>> >>>>> at >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorI >>>>>n >>>>> >>>>> voke >>>>> >>>>> r.java:109) [resteasy-jaxrs-3.0.10.Final.jar:] >>>>> >>>>> at >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(Re >>>>>s >>>>> >>>>> ourc >>>>> >>>>> eLocatorInvoker.java:135) [resteasy-jaxrs-3.0.10.Final.jar:] >>>>> >>>>> at >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorI >>>>>n >>>>> >>>>> voke >>>>> >>>>> r.java:103) [resteasy-jaxrs-3.0.10.Final.jar:] >>>>> >>>>> at >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispat >>>>>c >>>>> >>>>> her. >>>>> >>>>> java:356) [resteasy-jaxrs-3.0.10.Final.jar:] >>>>> >>>>> ... 39 more >>>>> >>>>> Caused by: >>>>> org.keycloak.broker.provider.IdentityBrokerException: No >>>>> >>>>> assertion from response. >>>>> >>>>> at >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>org.keycloak.broker.saml.SAMLEndpoint$Binding.getAssertion(SAMLEndpoin >>>>>t >>>>> >>>>> .jav >>>>> >>>>> a:309) >>>>> >>>>> at >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>org.keycloak.broker.saml.SAMLEndpoint$Binding.handleLoginResponse(SAML >>>>>E >>>>> >>>>> ndpo >>>>> >>>>> int.java:264) >>>>> >>>>> ... 54 more >>>>> >>>>> >>>>> >>>>> Any idea? >>>>> >>>>> >>>>> >>>>> Henk >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> On 30/04/15 14:31, "Bill Burke" >>>> > wrote: >>>>> >>>>> >>>>> >>>>>> You want to chain keycloak server to Salesforce? >>>>> >>>>>> >>>>> >>>>>> If you create a SAMLv2 IdentityProvider in keycloak that >>>>> points to >>>>> >>>>>> Salesforce, you;ll see after you create it, an Export >>>>>button. >>>>> Click >>>>> >>>>>> that. That will create an entity descriptor with all the >>>>> information >>>>> >>>>>> you need. >>>>> >>>>>> >>>>> >>>>>> On 4/30/2015 2:45 AM, Henk Laracker wrote: >>>>> >>>>>>> Hi, >>>>> >>>>>>> >>>>> >>>>>>> I like to use Salesforce as Identity Provider, the >>>>>metadata >>>>> >>>>>>> provided by >>>>> >>>>>>> salesforce can be imported. >>>>> >>>>>>> But I need to specify the Service Provider in salesforce, >>>>>I >>>>> have to >>>>> >>>>>>> fill >>>>> >>>>>>> in a couple of fields, but two of them I don?t understand >>>>> (and are >>>>> >>>>>>> mandatory). Does someone have any clue >>>>> >>>>>>> >>>>> >>>>>>> 1. entity id , remark of salesforce : get this value >>>> >from your >>>>> >>>>>>> serviceprovider >>>>> >>>>>>> 2. ACS URL, remark of slaesforce : The assertion >>>>> consumer >>>>> >>>>>>> service. Get >>>>> >>>>>>> this value from your service provider. >>>>> >>>>>>> >>>>> >>>>>>> I have tried a lot of values but every-time I click the >>>>>saml >>>>> button >>>>> >>>>>>> on >>>>> >>>>>>> my app, it redirects to salesforce but I get a page with >>>>>the >>>>> error : >>>>> >>>>>>> Error: Unable to resolve request into a Service Provider >>>>> >>>>>>> >>>>> >>>>>>> Henk >>>>> >>>>>>> >>>>> >>>>>>> >>>>> >>>>>>> _______________________________________________ >>>>> >>>>>>> keycloak-user mailing list >>>>> >>>>>>> keycloak-user at lists.jboss.org >>>>> >>>>> >>>>>>> https://lists.jboss.org/mailman/listinfo/keycloak-user >>>>> >>>>>>> >>>>> >>>>>> >>>>> >>>>>> -- >>>>> >>>>>> Bill Burke >>>>> >>>>>> JBoss, a division of Red Hat >>>>> >>>>>> http://bill.burkecentral.com >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>> _______________________________________________ >>>>> >>>>>> keycloak-user mailing list >>>>> >>>>>> keycloak-user at lists.jboss.org >>>>> >>>>> >>>>>> https://lists.jboss.org/mailman/listinfo/keycloak-user >>>>> >>>>> >>>>> >>>> >>>>> >>> >>>>> >> >>>>> >> -- >>>>> >> Bill Burke >>>>> >> JBoss, a division of Red Hat >>>>> >> http://bill.burkecentral.com >>>>> >> _______________________________________________ >>>>> >> keycloak-user mailing list >>>>> >> keycloak-user at lists.jboss.org >>>>> >>>>> >> https://lists.jboss.org/mailman/listinfo/keycloak-user >>>>> > >>>>> >>>>> -- >>>>> Bill Burke >>>>> JBoss, a division of Red Hat >>>>> http://bill.burkecentral.com >>>>> _______________________________________________ >>>>> keycloak-user mailing list >>>>> keycloak-user at lists.jboss.org >>>>> https://lists.jboss.org/mailman/listinfo/keycloak-user >>>>> >>>>> >>>> >>> >>> -- >>> Bill Burke >>> JBoss, a division of Red Hat >>> http://bill.burkecentral.com >>> _______________________________________________ >>> keycloak-user mailing list >>> keycloak-user at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/keycloak-user >> > >-- >Bill Burke >JBoss, a division of Red Hat >http://bill.burkecentral.com From juandiego83 at gmail.com Mon Jun 1 19:56:10 2015 From: juandiego83 at gmail.com (Juan Diego) Date: Mon, 1 Jun 2015 18:56:10 -0500 Subject: [keycloak-user] keycloak with angular/restfull Message-ID: Hi I am doing an app with angularjs with keycloak. There a few things that I dont know how to do it, I have being seing the videos and reading documentation so I have 2 questions. Regarding the model of the database, how am I supposed to link Users to Tables. How do you recommend to work on the model, I am kind of cluless there. For example before I had a table User and a Table Pictures. Now my users are in the KeyCloak database, how are you supposed to handle tables that would have been linked to a user. My second question is about my front and backend. I am just allowing my users to upload pictures it is a small app. I am doing the front end with AngularJS so it is basically html+javascript, and the backend handles the services. Should I create a client in my KeyCloak for the frontend and another for the backend. It seems to my that I should create a client only for the backend , and the front end needs to validate against that. Thanks Juan Diego Calle -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150601/9a701ca5/attachment.html From stian at redhat.com Tue Jun 2 02:59:30 2015 From: stian at redhat.com (Stian Thorgersen) Date: Tue, 2 Jun 2015 02:59:30 -0400 (EDT) Subject: [keycloak-user] keycloak with angular/restfull In-Reply-To: References: Message-ID: <1471386871.10276203.1433228370629.JavaMail.zimbra@redhat.com> ----- Original Message ----- > From: "Juan Diego" > To: keycloak-user at lists.jboss.org > Sent: Tuesday, 2 June, 2015 1:56:10 AM > Subject: [keycloak-user] keycloak with angular/restfull > > Hi > > I am doing an app with angularjs with keycloak. There a few things that I > dont know how to do it, I have being seing the videos and reading > documentation so I have 2 questions. > > > Regarding the model of the database, how am I supposed to link Users to > Tables. How do you recommend to work on the model, I am kind of cluless > there. > For example before I had a table User and a Table Pictures. Now my users are > in the KeyCloak database, how are you supposed to handle tables that would > have been linked to a user. Depending on your use-case I'd recommend storing the details you need about users in your apps database as well. You can do this when the user logs in and sync the profile from the token into your users table and link it with the user id. > My second question is about my front and backend. I am just allowing my users > to upload pictures it is a small app. I am doing the front end with > AngularJS so it is basically html+javascript, and the backend handles the > services. Should I create a client in my KeyCloak for the frontend and > another for the backend. It seems to my that I should create a client only > for the backend , and the front end needs to validate against that. Both - angularjs app needs a public client and is the one that drives the login (by using keycloak.js). The backend should be a bearer-only client and only verifies the tokens. > > Thanks > > Juan Diego Calle > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user From mposolda at redhat.com Tue Jun 2 04:17:08 2015 From: mposolda at redhat.com (Marek Posolda) Date: Tue, 02 Jun 2015 10:17:08 +0200 Subject: [keycloak-user] Not able to forward to error page. In-Reply-To: References: Message-ID: <556D6684.6050900@redhat.com> On 1.6.2015 14:44, John wrote: > I am trying to integarte keycloak authentication for securing my application. > My server and client has different error status code mapping. > > In case of accessToken expires keycloak sends 401 directly to client > where I have mapped token expiration to status code 5401. > > I do not wish to change this mapping as code is already in production phase. > > I found very helpful way to handle this situaltion by providing > error-page in my server web.xml as > > > KEYCLOAK > winterfell > > /error > > > > But somehow I am not able to get this error page. > > Can someone please suggest correct way of doing this. > > Note : Following way didn't worked for me > > 404 > /error > Will it work if you use status 401 instead of 404? Marek > > > > -TR > John > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user From niko at n-k.de Tue Jun 2 04:18:44 2015 From: niko at n-k.de (=?utf-8?Q?Niko_K=C3=B6bler?=) Date: Tue, 2 Jun 2015 10:18:44 +0200 Subject: [keycloak-user] Update user when "Email as username" enabled In-Reply-To: <6B6C8DB3-5643-402F-AB14-2DAFED93B056@smartling.com> References: <926AA9D1-A94B-48D1-8B20-FF9681CB6325@smartling.com> <6B6C8DB3-5643-402F-AB14-2DAFED93B056@smartling.com> Message-ID: Hi Scott, fyi: I?m currently working on https://issues.jboss.org/browse/KEYCLOAK-1305 - Niko > Am 01.06.2015 um 15:44 schrieb Scott Rossillo : > > Any advice here? Do I have to delete and re-create the user? I?d really rather not do that. Seems there should be a way to update the username. > > Thanks in advance, > Scott > > >> On May 29, 2015, at 4:53 PM, Scott Rossillo wrote: >> >> If I?m using email as username, I can update the email address on a user via the admin API, but the username doesn?t update even when explicitly setting a new username. This is true in the KC admin console as well. >> >> How do I update the username to match the new email address? >> >> Thanks, >> Scott >> > > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150602/b712dc12/attachment.html From Nishi.Kant at csr.com Tue Jun 2 04:36:00 2015 From: Nishi.Kant at csr.com (Nishi Kant) Date: Tue, 2 Jun 2015 08:36:00 +0000 Subject: [keycloak-user] Single app, multiple realm Message-ID: <59A15DB8B7B84F47BF5678A6F4AB0BB5AEEB9850@banasiexm01.ASIA.ROOT.PRI> Hi, I'm new to keycloak, have tried few samples only. I have a requirement where, a single application/client is used with multiple realm. Users belonging to different organization (realm) uses same app to login, realm information is passed in URL. I want keycloak to authenticate the users against the specified realm. Samples I have seen, takes the realm information from keycloak.json file, here I have requirement for dynamically provided the realm information and redirecting to keycloak server for authentication. Any pointer will be really useful. Thanks, Nishi Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom More information can be found at www.csr.com. Keep up to date with CSR on our technical blog, www.csr.com/blog, CSR people blog, www.csr.com/people, YouTube, www.youtube.com/user/CSRplc, Facebook, www.facebook.com/pages/CSR/191038434253534, or follow us on Twitter at www.twitter.com/CSR_plc. You can now access the wide range of products powered by aptX at www.aptx.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150602/33a445a5/attachment.html From stian at redhat.com Tue Jun 2 04:47:58 2015 From: stian at redhat.com (Stian Thorgersen) Date: Tue, 2 Jun 2015 04:47:58 -0400 (EDT) Subject: [keycloak-user] Single app, multiple realm In-Reply-To: <59A15DB8B7B84F47BF5678A6F4AB0BB5AEEB9850@banasiexm01.ASIA.ROOT.PRI> References: <59A15DB8B7B84F47BF5678A6F4AB0BB5AEEB9850@banasiexm01.ASIA.ROOT.PRI> Message-ID: <847297706.10320698.1433234878785.JavaMail.zimbra@redhat.com> Check out the multi-tenancy example ----- Original Message ----- > From: "Nishi Kant" > To: keycloak-user at lists.jboss.org > Sent: Tuesday, 2 June, 2015 10:36:00 AM > Subject: [keycloak-user] Single app, multiple realm > > > > Hi, > > > > I?m new to keycloak, have tried few samples only. > > > > I have a requirement where, a single application/client is used with multiple > realm. Users belonging to different organization (realm) uses same app to > login, realm information is passed in URL. I want keycloak to authenticate > the users against the specified realm. Samples I have seen, takes the realm > information from keycloak.json file, here I have requirement for dynamically > provided the realm information and redirecting to keycloak server for > authentication. > > > > Any pointer will be really useful. > > > > Thanks, > > Nishi > > > Member of the CSR plc group of companies. CSR plc registered in England and > Wales, registered number 4187346, registered office Churchill House, > Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom > More information can be found at www.csr.com . Keep up to date with CSR on > our technical blog or CSR people blog , YouTube , Facebook or follow us on > Twitter at twitter.com/CSR_plc . > You can now access the wide range of products powered by aptX . > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user From fadiabdeen at gmail.com Tue Jun 2 07:06:22 2015 From: fadiabdeen at gmail.com (Fadi Abdin) Date: Tue, 2 Jun 2015 07:06:22 -0400 Subject: [keycloak-user] iss Message-ID: Does anyone know how to control the "iss": value in the token ? Seems there is a problem , in the last version it was the realm name i.e "test" .. but now the full uri http:://server.8080/auth/realms/test and this is causing a problem for me -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150602/ac495cc9/attachment-0001.html From stian at redhat.com Tue Jun 2 07:39:46 2015 From: stian at redhat.com (Stian Thorgersen) Date: Tue, 2 Jun 2015 07:39:46 -0400 (EDT) Subject: [keycloak-user] iss In-Reply-To: References: Message-ID: <1378184402.10384925.1433245186502.JavaMail.zimbra@redhat.com> ----- Original Message ----- > From: "Fadi Abdin" > To: "keycloak-user" > Sent: Tuesday, 2 June, 2015 1:06:22 PM > Subject: [keycloak-user] iss > > Does anyone know how to control the "iss": value in the token ? > > Seems there is a problem , in the last version it was the realm name i.e > "test" .. but now the full uri http:://server.8080/auth/realms/test and this > is causing a problem for me It should be full uri according to openid connect spec > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user From Henk.Laracker at planonsoftware.com Tue Jun 2 07:40:58 2015 From: Henk.Laracker at planonsoftware.com (Henk Laracker) Date: Tue, 2 Jun 2015 13:40:58 +0200 Subject: [keycloak-user] SAML2 Identity provider Mappers Message-ID: Hi, We have created a salesforce SAML2 identity provider, a part of the response xml from salesforce is added below. Next to this we configured a tomcat with a json file with argument : "principal-attribute": ?preferred_username? When we do nothing more we get the NameID with the prefix in Tomcat as the logged in user. We like to map the SAML Attribute Name=?email? to the ?preferred_username? How do we do this? henk.laracker at p*n.nl https://fr-authtest.planoncloud.com/auth/realms/ciwwa-test urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified 005b0000000jBgI henk.laracker at p*n.nl henk.laracker at c*e.com false Met vriendelijke groet / Yours sincerely / Mit freundlichen Gr??en / Tr?s cordialement, Henk Laracker -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150602/cff73ffd/attachment.html From giriraj.sharma27 at gmail.com Tue Jun 2 07:46:35 2015 From: giriraj.sharma27 at gmail.com (Giriraj Sharma) Date: Tue, 2 Jun 2015 17:16:35 +0530 Subject: [keycloak-user] iss In-Reply-To: <1378184402.10384925.1433245186502.JavaMail.zimbra@redhat.com> References: <1378184402.10384925.1433245186502.JavaMail.zimbra@redhat.com> Message-ID: The "iss" field is one of the Claim used within the ID Token for all OAuth 2.0 flows used by OpenID Connect: iss : REQUIRED. Issuer Identifier for the Issuer of the response. The iss value is a case sensitive URL using the https scheme that contains scheme, host, and optionally, port number and path components and no query or fragment components. http://openid.net/specs/openid-connect-core-1_0.html#IDToken On Tue, Jun 2, 2015 at 5:09 PM, Stian Thorgersen wrote: > > > ----- Original Message ----- > > From: "Fadi Abdin" > > To: "keycloak-user" > > Sent: Tuesday, 2 June, 2015 1:06:22 PM > > Subject: [keycloak-user] iss > > > > Does anyone know how to control the "iss": value in the token ? > > > > Seems there is a problem , in the last version it was the realm name i.e > > "test" .. but now the full uri http:://server.8080/auth/realms/test and > this > > is causing a problem for me > > It should be full uri according to openid connect spec > > > > > _______________________________________________ > > keycloak-user mailing list > > keycloak-user at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/keycloak-user > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user > -- Giriraj Sharma about.me/girirajsharma Giriraj Sharma, Department of Computer Science National Institute of Technology Hamirpur Himachal Pradesh, India 177005 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150602/34cd1d1a/attachment-0001.html From chenkeong.yap at izeno.com Tue Jun 2 09:42:32 2015 From: chenkeong.yap at izeno.com (Chen Keong Yap) Date: Tue, 2 Jun 2015 21:42:32 +0800 Subject: [keycloak-user] Keycloak integration for php app Message-ID: Hi, Pease share how php app can be secured using keycloak saml protocol? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150602/555b3802/attachment.html From chenkeong.yap at izeno.com Tue Jun 2 10:07:31 2015 From: chenkeong.yap at izeno.com (Chen Keong Yap) Date: Tue, 2 Jun 2015 22:07:31 +0800 Subject: [keycloak-user] Keycloak Message-ID: Hi, please share your ideas. 1) i have 1 app is secured using PL SP Filter. Once login successful, there is a session created in keycloak idp and we called it as sp session and app http session is created too. Is the app http session is stored in keycloak db? 2) when global logout is performed, it will call admin url for all the apps to do application logout. So the question is we need the app http session. Is it stored in memory or keycloak db? 3) we have requirement to hard kill the sp session and the app http session if is active for more than 24 hours. Do you think is better to implement in keycloak idp as servlet or from PL SP filter? 4) we need to implement session fixation. Which means 1 client ip is binding to 1 jsessionid and the other client ip cannot make http request using this jsessionid -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150602/6360f3fb/attachment.html From orestis.tsakiridis at telestax.com Tue Jun 2 13:53:02 2015 From: orestis.tsakiridis at telestax.com (Orestis Tsakiridis) Date: Tue, 2 Jun 2015 20:53:02 +0300 Subject: [keycloak-user] Client's REST api returns blank after switching keycloak to HTTPS Message-ID: Hello, I had a working setup of a Java web application running on machine A secured by keycloak on machine B (login.restcomm.com). The application running on A provides a REST api is used from the UI. The application also contains a UI (angular) that accesses the REST api. login.restcomm.com is the keycloak running on docker and resolves to 172.17.42.1 (overriden in /etc/hosts). I'm using keycloak 1.2.0.Final. Both the UI and the REST api have been secured and the application worked fine with "ssl-required" -> "external". I switched keycloak configuration to HTTPS (using "all") and i'm experience the following: Login seems to work fine. When trying to access the UI i'm redirected to https://login.restcomm.com, i login and back to the UI. BUT, the request to A's services though succesfull (200 OK) return blank content. As if the adapter get in the way and overrides the response. I'm also getting the following message in A's log: 12:21:55,083 DEBUG [org.keycloak.adapters.PreAuthActionsHandler] (http-/192.168.1.39:8080-4) adminRequest http://192.168.1.39:8080/restcomm-rvd/api/projects 12:21:55,085 WARN [org.keycloak.adapters.RequestAuthenticator] (http-/192.168.1.39:8080-4) SSL is required to authenticate http://192.168.1.39:8080/restcomm-rvd/api/projects is the endpoint that is supposed to return a block of JSON. The same happens when trying to access the endpoint directly using an independent REST client. I get back a 200 OK and the same message appears in the log but there is no content in the response. Keep in mind that HTTPS is only enabled for accessing keycloak. The web application still runs on HTTP. Is this supported? I have also made various experiments in keycloak.json (for the REST api) starting from this: { "realm": "restcomm", "realm-public-key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", "bearer-only": true, "auth-server-url": "https://login.restcomm.com/auth", "ssl-required": "all", "disable-trust-manager": true, "resource": "restcomm-rvd", "enable-cors": true } down to this: { "realm": "restcomm", "realm-public-key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", "bearer-only": true, "auth-server-url": "https://login.restcomm.com/auth", "ssl-required": "all", "allow-any-hostname":true, "disable-trust-manager": false, "truststore": "/tmp/trusted_keycloak.jks", "truststore-password" : "password", "resource": "restcomm-rvd" } Any pointers will be great help. Thanks in advance Orestis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150602/4dfc1c02/attachment.html From stian at redhat.com Wed Jun 3 02:38:27 2015 From: stian at redhat.com (Stian Thorgersen) Date: Wed, 3 Jun 2015 02:38:27 -0400 (EDT) Subject: [keycloak-user] Keycloak integration for php app In-Reply-To: References: Message-ID: <589833457.10908050.1433313507084.JavaMail.zimbra@redhat.com> ----- Original Message ----- > From: "Chen Keong Yap" > To: keycloak-user at lists.jboss.org > Sent: Tuesday, 2 June, 2015 3:42:32 PM > Subject: [keycloak-user] Keycloak integration for php app > > > > Hi, > > Pease share how php app can be secured using keycloak saml protocol? Our priority is first OpenID Connect, and we still don't have that for PHP. I'd recommend looking for a generic SAML SP library for PHP. With Keycloak you can also combine the protocols and have some apps use SAML and others OpenID Connect. So if you can't find one for SAML there are ones for OpenID Connect > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user From pubudupg at gmail.com Wed Jun 3 06:02:00 2015 From: pubudupg at gmail.com (pubudu gunawardena) Date: Wed, 3 Jun 2015 15:32:00 +0530 Subject: [keycloak-user] Keycloak integration for php app In-Reply-To: References: Message-ID: I have successfully used keycloak with simplesamlphp[1]. At [2] you can see how to configure a service provider using simplesamlphp. At [3] you can find the configuration that you have to do form keycloak. [1]https://simplesamlphp.org/ [2]https://simplesamlphp.org/docs/stable/simplesamlphp-sp [3]http://keycloak.github.io/docs/userguide/html/identity-broker.html#d4e1760 On Tue, Jun 2, 2015 at 7:12 PM, Chen Keong Yap wrote: > Hi, > > Pease share how php app can be secured using keycloak saml protocol? > > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user -- Thanks, Pubudu From fadiabdeen at gmail.com Wed Jun 3 09:37:55 2015 From: fadiabdeen at gmail.com (Fadi Abdin) Date: Wed, 3 Jun 2015 09:37:55 -0400 Subject: [keycloak-user] Deprecated APIs Message-ID: Hello, I have been using below APIs and when i looked at the logs it says " Invoking deprecated endpoint .." /auth/realms/test/tokens/login /auth/realms/test/tokens/access/codes What are the new APIs ? is there documentation ? Thanks, Fadi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150603/3fbcf752/attachment.html From stian at redhat.com Wed Jun 3 09:44:31 2015 From: stian at redhat.com (Stian Thorgersen) Date: Wed, 3 Jun 2015 09:44:31 -0400 (EDT) Subject: [keycloak-user] Deprecated APIs In-Reply-To: References: Message-ID: <772688121.11305720.1433339071613.JavaMail.zimbra@redhat.com> http://keycloak.github.io/docs/userguide/html/Migration_from_older_versions.html#d4e3147 ----- Original Message ----- > From: "Fadi Abdin" > To: "keycloak-user" > Sent: Wednesday, 3 June, 2015 3:37:55 PM > Subject: [keycloak-user] Deprecated APIs > > Hello, > > I have been using below APIs and when i looked at the logs it says " Invoking > deprecated endpoint .." > > /auth/realms/test/tokens/login > /auth/realms/test/tokens/access/codes > > > What are the new APIs ? is there documentation ? > > Thanks, > Fadi > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user From juandiego83 at gmail.com Wed Jun 3 13:40:48 2015 From: juandiego83 at gmail.com (Juan Diego) Date: Wed, 3 Jun 2015 12:40:48 -0500 Subject: [keycloak-user] Calling a method after log Message-ID: Hi I am doing a portal with angularJS and the backend with java, and it seems to be working with the basics. I am having trouble figuring out a way to do the following: I have a table user with info like username, email and userid, avatar, etc, and I want to update that table with the user info if it is the first time they log in. The only way I can think to do this is to create a controller and set it on all my pages so it looks if the user is already in the database, but it seems like it will try to do that all the time, which doesnt seems practical. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150603/874bd2cc/attachment-0001.html From mposolda at redhat.com Wed Jun 3 17:14:31 2015 From: mposolda at redhat.com (Marek Posolda) Date: Wed, 03 Jun 2015 23:14:31 +0200 Subject: [keycloak-user] Calling a method after log In-Reply-To: References: Message-ID: <556F6E37.9060909@redhat.com> I think there are more ways to do something like this. One way can be doing Angular HTTP interceptor at your application side. Another possibility can be handle this on Keycloak side and create Event listener, which will listen for LOGIN event and then check your DB (See our provider's example and especially examples/providers/event-listener-sysout for the inspiration). Not sure which possibility is better for you, I am not sure I correctly understand your use-case well. Marek On 3.6.2015 19:40, Juan Diego wrote: > Hi > I am doing a portal with angularJS and the backend with java, and it > seems to be working with the basics. > I am having trouble figuring out a way to do the following: > I have a table user with info like username, email and userid, avatar, > etc, and I want to update that table with the user info if it is the > first time they log in. > > The only way I can think to do this is to create a controller and set > it on all my pages so it looks if the user is already in the database, > but it seems like it will try to do that all the time, which doesnt > seems practical. > > > > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150603/3aa545dd/attachment.html From carlosthe19916 at gmail.com Wed Jun 3 17:28:58 2015 From: carlosthe19916 at gmail.com (Carlos Feria) Date: Wed, 3 Jun 2015 16:28:58 -0500 Subject: [keycloak-user] Keycloak SecurityDomain is removed? Message-ID: Hello, i have a applicationn on *keycloak-1.1.0.Final*. The keycloak had and i my classes was anotation as: *@Stateless* *@SecurityDomain("keycloak")* When i migrate to *keycloak-1.2.0.Final* i have an exception on deploy, and i can't see the *security domain keycloak* on standalone.xml the annotation @SecurityDomain("keycloak") is no more need on keycloak-1.2.0.Final? -- Carlos E. Feria Vila -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150603/0d1b9abf/attachment.html From arjit.agrawal.07 at gmail.com Wed Jun 3 23:49:08 2015 From: arjit.agrawal.07 at gmail.com (Arjit Agrawal) Date: Thu, 4 Jun 2015 09:19:08 +0530 Subject: [keycloak-user] HTTP 403 Forbidden while connecting to bearer only application Message-ID: Hi, I have a new application - 'testapi' under a new realm - 'testrealm'. This application is to be used as an API. Its an *bearer only application*. I have also made an *OAuth Client* to access this service. I am using *iOS AeroGear* plugin in my project to connect to API service with all the required creditionals like clientId, roles etc. Version of Keycloak - *1.0-beta3*. Version of Jboss - *JBoss AS 7.1.1* Its hosted on *Amazon AWS*. (I tried the same in my local environment it was working but when i have done the same on Amazon server, i am getting this issue.) Thanks for any help on this one. Regards, Arjit Agrawal -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150604/d8760524/attachment.html From kalinga at leapset.com Wed Jun 3 23:55:26 2015 From: kalinga at leapset.com (Kalinga Dissanayake) Date: Thu, 4 Jun 2015 09:25:26 +0530 (IST) Subject: [keycloak-user] Distinguish between Existing user login and new registration Message-ID: <1433390126.77812807@apps.rackspace.com> Hi guys, Is there an easy to way to distinguish between a JWT token received after a brand new user registration or an existing user login? Basically in my use case the client will be given the responsibility to update roles if its a brand new user registration or deny access if its an existing user. Is there an easy way to distinguish between the two. Thanks. Kalinga -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150604/f91e5cd0/attachment.html From pubudupg at gmail.com Thu Jun 4 07:44:38 2015 From: pubudupg at gmail.com (pubudu gunawardena) Date: Thu, 4 Jun 2015 17:14:38 +0530 Subject: [keycloak-user] Using OneLogin php-saml library with keycloak Message-ID: Hi All, I am trying to use the OneLogin php-saml library[1] as a service provider that uses keycloak as a SAML identity provider. The "RelayState" parameter is sent properly form the SP to the IDP but in the response, the forward slashes are missing from the RelayState. For example in the post parameters of the authentication request, the RelayState shows "http://phpsaml/demo1/" but in the response from keycloak, it shows "http:phpsamldemo1". This is causing the php-saml library to throw exceptions. I'm using keycloak 1.2.0.Final. How can I overcome this problem? [1]https://github.com/onelogin/php-saml -- Thanks, Pubudu From pubudupg at gmail.com Thu Jun 4 08:13:53 2015 From: pubudupg at gmail.com (pubudu gunawardena) Date: Thu, 4 Jun 2015 17:43:53 +0530 Subject: [keycloak-user] Using OneLogin php-saml library with keycloak In-Reply-To: References: Message-ID: After debugging found a possible cause for this. In line 305 of SAML2BindingBuilder2 there is code as following escapeAttribute(relayState) which removes the forward slashes from the url. So I guess this is a bug? On Thu, Jun 4, 2015 at 5:14 PM, pubudu gunawardena wrote: > Hi All, > > I am trying to use the OneLogin php-saml library[1] as a service > provider that uses keycloak as a SAML identity provider. The > "RelayState" parameter is sent properly form the SP to the IDP but in > the response, the forward slashes are missing from the RelayState. > For example in the post parameters of the authentication request, the > RelayState shows "http://phpsaml/demo1/" but in the response from > keycloak, it shows "http:phpsamldemo1". This is causing the php-saml > library to throw exceptions. I'm using keycloak 1.2.0.Final. > > How can I overcome this problem? > > > [1]https://github.com/onelogin/php-saml > > -- > Thanks, > Pubudu -- Thanks, Pubudu From chenkeong.yap at izeno.com Thu Jun 4 08:29:15 2015 From: chenkeong.yap at izeno.com (chenkeong.yap at izeno.com) Date: Thu, 4 Jun 2015 20:29:15 +0800 Subject: [keycloak-user] Using OneLogin php-saml library with keycloak In-Reply-To: References: Message-ID: <8067D077-7764-421F-B032-57E2539F3E44@izeno.com> hi, can i know what is the error you received from keycloak? is it invalid requester? Regards, CK Yap > On 4 Jun 2015, at 8:13 pm, pubudu gunawardena wrote: > > After debugging found a possible cause for this. In line 305 of > SAML2BindingBuilder2 there is code as following > > escapeAttribute(relayState) > > which removes the forward slashes from the url. So I guess this is a bug? > >> On Thu, Jun 4, 2015 at 5:14 PM, pubudu gunawardena wrote: >> Hi All, >> >> I am trying to use the OneLogin php-saml library[1] as a service >> provider that uses keycloak as a SAML identity provider. The >> "RelayState" parameter is sent properly form the SP to the IDP but in >> the response, the forward slashes are missing from the RelayState. >> For example in the post parameters of the authentication request, the >> RelayState shows "http://phpsaml/demo1/" but in the response from >> keycloak, it shows "http:phpsamldemo1". This is causing the php-saml >> library to throw exceptions. I'm using keycloak 1.2.0.Final. >> >> How can I overcome this problem? >> >> >> [1]https://github.com/onelogin/php-saml >> >> -- >> Thanks, >> Pubudu > > > > -- > Thanks, > Pubudu > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user From stian at redhat.com Thu Jun 4 08:32:14 2015 From: stian at redhat.com (Stian Thorgersen) Date: Thu, 4 Jun 2015 08:32:14 -0400 (EDT) Subject: [keycloak-user] HTTP 403 Forbidden while connecting to bearer only application In-Reply-To: References: Message-ID: <1736491496.12047414.1433421134929.JavaMail.zimbra@redhat.com> We'll need much more info here. How have you secured the app? Is it a WAR? Do you require any roles for the resource you're invoking? Are you sending a bearer token with the request? How do you get the request? Does the user have the required roles? Does the client have the required scope? ----- Original Message ----- > From: "Arjit Agrawal" > To: "keycloak-user" > Sent: Thursday, 4 June, 2015 5:49:08 AM > Subject: [keycloak-user] HTTP 403 Forbidden while connecting to bearer only application > > Hi, > > I have a new application - 'testapi' under a new realm - 'testrealm'. This > application is to be used as an API. Its an bearer only application . > > I have also made an OAuth Client to access this service. > > I am using iOS AeroGear plugin in my project to connect to API service with > all the required creditionals like clientId, roles etc. > > Version of Keycloak - 1.0-beta3 . > Version of Jboss - JBoss AS 7.1.1 > > Its hosted on Amazon AWS . (I tried the same in my local environment it was > working but when i have done the same on Amazon server, i am getting this > issue.) > > > Thanks for any help on this one. > > Regards, > Arjit Agrawal > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user From stian at redhat.com Thu Jun 4 08:33:55 2015 From: stian at redhat.com (Stian Thorgersen) Date: Thu, 4 Jun 2015 08:33:55 -0400 (EDT) Subject: [keycloak-user] Distinguish between Existing user login and new registration In-Reply-To: <1433390126.77812807@apps.rackspace.com> References: <1433390126.77812807@apps.rackspace.com> Message-ID: <814583695.12047974.1433421235334.JavaMail.zimbra@redhat.com> No we don't have that atm. Not sure it makes sense doing it that way either. You could do an event listener that listens for registrations instead? ----- Original Message ----- > From: "Kalinga Dissanayake" > To: keycloak-user at lists.jboss.org > Sent: Thursday, 4 June, 2015 5:55:26 AM > Subject: [keycloak-user] Distinguish between Existing user login and new registration > > > > > > Hi guys, > > > > Is there an easy to way to distinguish between a JWT token received after a > brand new user registration or an existing user login? > > Basically in my use case the client will be given the responsibility to > update roles if its a brand new user registration or deny access if its an > existing user. Is there an easy way to distinguish between the two. > > > > Thanks. > > > > Kalinga > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user From arjit.agrawal.07 at gmail.com Thu Jun 4 10:17:09 2015 From: arjit.agrawal.07 at gmail.com (Arjit Agrawal) Date: Thu, 4 Jun 2015 19:47:09 +0530 Subject: [keycloak-user] HTTP 403 Forbidden while connecting to bearer only application In-Reply-To: <1736491496.12047414.1433421134929.JavaMail.zimbra@redhat.com> References: <1736491496.12047414.1433421134929.JavaMail.zimbra@redhat.com> Message-ID: Hi, I have the war file of service bearer only application in *jboss deployments folder, *the auth-server.war for keycloak is also at the same location. Roles configured:- [image: Inline image 1] Here' my web.xml for service bearer only application:- [image: Inline image 2] Here's the setting for the bearer only application in keycloak [image: Inline image 3] User Role Mappings [image: Inline image 1] I am using REST services to fulfill the request. Here's a snippet of code:- *KeycloakSecurityContext securityContext = (KeycloakSecurityContext) httpRequest* * .getAttribute(KeycloakSecurityContext.class.getName());* *AccessToken accessToken = securityContext.getToken();* OAuth Client Scope Mappings:- [image: Inline image 2] Please let me know, if any more information is required. Regards, Arjit Agrawal On Thu, Jun 4, 2015 at 6:02 PM, Stian Thorgersen wrote: > We'll need much more info here. How have you secured the app? Is it a WAR? > Do you require any roles for the resource you're invoking? Are you sending > a bearer token with the request? How do you get the request? Does the user > have the required roles? Does the client have the required scope? > > ----- Original Message ----- > > From: "Arjit Agrawal" > > To: "keycloak-user" > > Sent: Thursday, 4 June, 2015 5:49:08 AM > > Subject: [keycloak-user] HTTP 403 Forbidden while connecting to bearer > only application > > > > Hi, > > > > I have a new application - 'testapi' under a new realm - 'testrealm'. > This > > application is to be used as an API. Its an bearer only application . > > > > I have also made an OAuth Client to access this service. > > > > I am using iOS AeroGear plugin in my project to connect to API service > with > > all the required creditionals like clientId, roles etc. > > > > Version of Keycloak - 1.0-beta3 . > > Version of Jboss - JBoss AS 7.1.1 > > > > Its hosted on Amazon AWS . (I tried the same in my local environment it > was > > working but when i have done the same on Amazon server, i am getting this > > issue.) > > > > > > Thanks for any help on this one. > > > > Regards, > > Arjit Agrawal > > > > _______________________________________________ > > keycloak-user mailing list > > keycloak-user at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/keycloak-user > -- Arjit Agrawal AKGEC, Ghaziabad -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150604/80cd45c4/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 29442 bytes Desc: not available Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20150604/80cd45c4/attachment-0005.png -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 25982 bytes Desc: not available Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20150604/80cd45c4/attachment-0006.png -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 17372 bytes Desc: not available Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20150604/80cd45c4/attachment-0007.png -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 22110 bytes Desc: not available Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20150604/80cd45c4/attachment-0008.png -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 34590 bytes Desc: not available Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20150604/80cd45c4/attachment-0009.png From bburke at redhat.com Thu Jun 4 10:29:31 2015 From: bburke at redhat.com (Bill Burke) Date: Thu, 04 Jun 2015 10:29:31 -0400 Subject: [keycloak-user] HTTP 403 Forbidden while connecting to bearer only application In-Reply-To: References: <1736491496.12047414.1433421134929.JavaMail.zimbra@redhat.com> Message-ID: <557060CB.9060707@redhat.com> On 6/4/2015 10:17 AM, Arjit Agrawal wrote: > > Version of Keycloak - 1.0-beta3 . > > Version of Jboss - JBoss AS 7.1.1 > > I'm sorry. Too much has changed since Keycloak 1.0-beta3. You need to upgrade. We also do not support running on JBoss AS 7.1.1 anymore. Upgrade to JBoss EAP 6.x or Wildfly 8+ -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com From arjit.agrawal.07 at gmail.com Thu Jun 4 10:33:30 2015 From: arjit.agrawal.07 at gmail.com (Arjit Agrawal) Date: Thu, 4 Jun 2015 20:03:30 +0530 Subject: [keycloak-user] HTTP 403 Forbidden while connecting to bearer only application In-Reply-To: <557060CB.9060707@redhat.com> References: <1736491496.12047414.1433421134929.JavaMail.zimbra@redhat.com> <557060CB.9060707@redhat.com> Message-ID: I will update the version but please let me know, how to resolve this first. I need to make it running. On Thu, Jun 4, 2015 at 7:59 PM, Bill Burke wrote: > > > On 6/4/2015 10:17 AM, Arjit Agrawal wrote: > > > Version of Keycloak - 1.0-beta3 . > > > Version of Jboss - JBoss AS 7.1.1 > > > > > I'm sorry. Too much has changed since Keycloak 1.0-beta3. You need to > upgrade. We also do not support running on JBoss AS 7.1.1 anymore. > Upgrade to JBoss EAP 6.x or Wildfly 8+ > > > -- > Bill Burke > JBoss, a division of Red Hat > http://bill.burkecentral.com > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user > -- Arjit Agrawal AKGEC, Ghaziabad -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150604/af420ed9/attachment.html From juandiego83 at gmail.com Thu Jun 4 14:04:19 2015 From: juandiego83 at gmail.com (Juan Diego) Date: Thu, 4 Jun 2015 13:04:19 -0500 Subject: [keycloak-user] keycloak.js with a different domain (cross domain problems) Message-ID: Hi, I am getting this error when I try to run this from my apache server instead from my app with jboss, XMLHttpRequest cannot load http://unika.localdomain:8080/auth/realms/unika/tokens/access/codes. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://unika.localdomain' is therefore not allowed access unica.localdomain is set on my /etc/hosts Do I have to run my web app on the same server to avoid this? GET http://localhost:8080/unika/test/undefined/realms/undefined/account 401 (Unauthorized) Also when I try to run it from as part of my war file on my server 12:48:27,159 WARN [org.keycloak.adapters.OAuthRequestAuthenticator] (default task-122) No state cookie 12:48:56,153 WARN [org.keycloak.protocol.oidc.endpoints.AuthorizationEndpoint] (default task-127) Invoking deprecated endpoint http://localhost:8080/auth/realms/unika/tokens/login?client_id=unika-angular&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Funika%2Ftest%2Fcustomers%2Fview.html&state=48084ae8-d454-4e7e-8c42-01c51ec09a3c&response_type=code 12:48:58,570 WARN [org.keycloak.adapters.OAuthRequestAuthenticator] (default task-1) No state cookie And I get a "bad request" on my browser. My test app is basically the customer-portal-js example with a different keycloak.json file I also set in web.xml to secure some folders, and it works fine. So basically when I log on to those folders and go back to my web-app it shows the correct info. thanks, Juan Diego -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150604/9155a963/attachment.html From juandiego83 at gmail.com Thu Jun 4 14:43:20 2015 From: juandiego83 at gmail.com (Juan Diego) Date: Thu, 4 Jun 2015 13:43:20 -0500 Subject: [keycloak-user] HTTP 403 Forbidden while connecting to bearer only application In-Reply-To: References: <1736491496.12047414.1433421134929.JavaMail.zimbra@redhat.com> <557060CB.9060707@redhat.com> Message-ID: Hi, I dont know it is realted but 403 errors can be related to cross domain problems, does you keycloak.json is set to "auth-server-url": " http://localhost:8080/auth" maybe try an external url or something like that. On Thu, Jun 4, 2015 at 9:33 AM, Arjit Agrawal wrote: > I will update the version but please let me know, how to resolve this > first. I need to make it running. > > On Thu, Jun 4, 2015 at 7:59 PM, Bill Burke wrote: > >> >> >> On 6/4/2015 10:17 AM, Arjit Agrawal wrote: >> > > Version of Keycloak - 1.0-beta3 . >> > > Version of Jboss - JBoss AS 7.1.1 >> > > >> >> I'm sorry. Too much has changed since Keycloak 1.0-beta3. You need to >> upgrade. We also do not support running on JBoss AS 7.1.1 anymore. >> Upgrade to JBoss EAP 6.x or Wildfly 8+ >> >> >> -- >> Bill Burke >> JBoss, a division of Red Hat >> http://bill.burkecentral.com >> _______________________________________________ >> keycloak-user mailing list >> keycloak-user at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/keycloak-user >> > > > > -- > Arjit Agrawal > AKGEC, Ghaziabad > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150604/aace3db3/attachment.html From juandiego83 at gmail.com Thu Jun 4 17:46:58 2015 From: juandiego83 at gmail.com (Juan Diego) Date: Thu, 4 Jun 2015 16:46:58 -0500 Subject: [keycloak-user] Multilingual support Message-ID: Is it possible to set the login and register form different languages? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150604/4e9b153b/attachment.html From shivasaxena999 at gmail.com Thu Jun 4 18:05:19 2015 From: shivasaxena999 at gmail.com (Shiva Saxena) Date: Fri, 5 Jun 2015 03:35:19 +0530 Subject: [keycloak-user] Multilingual support In-Reply-To: References: Message-ID: Yes, its possible,please refer to this feature request https://issues.jboss.org/browse/KEYCLOAK-301 On Fri, Jun 5, 2015 at 3:16 AM, Juan Diego wrote: > Is it possible to set the login and register form different languages? > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150605/c3345edd/attachment.html From juandiego83 at gmail.com Thu Jun 4 21:21:00 2015 From: juandiego83 at gmail.com (Juan Diego) Date: Thu, 4 Jun 2015 20:21:00 -0500 Subject: [keycloak-user] Multilingual support In-Reply-To: References: Message-ID: Thanks On Thu, Jun 4, 2015 at 5:05 PM, Shiva Saxena wrote: > Yes, its possible,please refer to this feature request > https://issues.jboss.org/browse/KEYCLOAK-301 > > On Fri, Jun 5, 2015 at 3:16 AM, Juan Diego wrote: > >> Is it possible to set the login and register form different languages? >> >> _______________________________________________ >> keycloak-user mailing list >> keycloak-user at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/keycloak-user >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150604/02e7fe40/attachment-0001.html From juandiego83 at gmail.com Thu Jun 4 21:24:36 2015 From: juandiego83 at gmail.com (Juan Diego) Date: Thu, 4 Jun 2015 20:24:36 -0500 Subject: [keycloak-user] Multilingual support In-Reply-To: References: Message-ID: Is it possible to add your custom Locales On Thu, Jun 4, 2015 at 8:21 PM, Juan Diego wrote: > Thanks > > On Thu, Jun 4, 2015 at 5:05 PM, Shiva Saxena > wrote: > >> Yes, its possible,please refer to this feature request >> https://issues.jboss.org/browse/KEYCLOAK-301 >> >> On Fri, Jun 5, 2015 at 3:16 AM, Juan Diego wrote: >> >>> Is it possible to set the login and register form different languages? >>> >>> _______________________________________________ >>> keycloak-user mailing list >>> keycloak-user at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/keycloak-user >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150604/1e08c890/attachment.html From stian at redhat.com Fri Jun 5 00:47:22 2015 From: stian at redhat.com (Stian Thorgersen) Date: Fri, 5 Jun 2015 00:47:22 -0400 (EDT) Subject: [keycloak-user] keycloak.js with a different domain (cross domain problems) In-Reply-To: References: Message-ID: <2132888715.12465779.1433479642703.JavaMail.zimbra@redhat.com> You need to add web origins to your client to allow CORS requests to Keycloak. Open the admin console, find your client, in web origins add 'http://unika.localdomain'. ----- Original Message ----- > From: "Juan Diego" > To: keycloak-user at lists.jboss.org > Sent: Thursday, 4 June, 2015 8:04:19 PM > Subject: [keycloak-user] keycloak.js with a different domain (cross domain problems) > > Hi, > > I am getting this error when I try to run this from my apache server instead > from my app with jboss, > > XMLHttpRequest cannot load > http://unika.localdomain:8080/auth/realms/unika/tokens/access/codes . No > 'Access-Control-Allow-Origin' header is present on the requested resource. > Origin ' http://unika.localdomain ' is therefore not allowed access > > unica.localdomain is set on my /etc/hosts > > Do I have to run my web app on the same server to avoid this? > > GET http://localhost:8080/unika/test/undefined/realms/undefined/account 401 > (Unauthorized) > > > Also when I try to run it from as part of my war file on my server > 12:48:27,159 WARN [org.keycloak.adapters.OAuthRequestAuthenticator] (default > task-122) No state cookie > 12:48:56,153 WARN > [org.keycloak.protocol.oidc.endpoints.AuthorizationEndpoint] (default > task-127) Invoking deprecated endpoint > http://localhost:8080/auth/realms/unika/tokens/login?client_id=unika-angular&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Funika%2Ftest%2Fcustomers%2Fview.html&state=48084ae8-d454-4e7e-8c42-01c51ec09a3c&response_type=code > 12:48:58,570 WARN [org.keycloak.adapters.OAuthRequestAuthenticator] (default > task-1) No state cookie > > And I get a "bad request" on my browser. > > My test app is basically the customer-portal-js example with a different > keycloak.json file > > > I also set in web.xml to secure some folders, and it works fine. So basically > when I log on to those folders and go back to my web-app it shows the > correct info. > > thanks, > > Juan Diego > > > > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user From pubudupg at gmail.com Fri Jun 5 02:43:44 2015 From: pubudupg at gmail.com (pubudu gunawardena) Date: Fri, 5 Jun 2015 12:13:44 +0530 Subject: [keycloak-user] Using OneLogin php-saml library with keycloak In-Reply-To: References: Message-ID: Quoting from section "3.1.1 Use of RelayState" in the spec (https://www.oasis-open.org/committees/download.php/35387/sstc-saml-bindings-errata-2.0-wd-05-diff.pdf), "Namely, if a SAML request message is accompanied by RelayState data, then the SAML responder MUST return its SAML protocol response using a binding that also supports a RelayState mechanism, and it MUST place the exact RelayState data it received with the request into the corresponding RelayState parameter in the response." which is not the case if keycloak is removing the forward slashes from the RelayState. So I think there should be a mechanism to escape the RelayState data and yet return the data to the Service Provider unmodified. On Thu, Jun 4, 2015 at 5:43 PM, pubudu gunawardena wrote: > After debugging found a possible cause for this. In line 305 of > SAML2BindingBuilder2 there is code as following > > escapeAttribute(relayState) > > which removes the forward slashes from the url. So I guess this is a bug? > > On Thu, Jun 4, 2015 at 5:14 PM, pubudu gunawardena wrote: >> Hi All, >> >> I am trying to use the OneLogin php-saml library[1] as a service >> provider that uses keycloak as a SAML identity provider. The >> "RelayState" parameter is sent properly form the SP to the IDP but in >> the response, the forward slashes are missing from the RelayState. >> For example in the post parameters of the authentication request, the >> RelayState shows "http://phpsaml/demo1/" but in the response from >> keycloak, it shows "http:phpsamldemo1". This is causing the php-saml >> library to throw exceptions. I'm using keycloak 1.2.0.Final. >> >> How can I overcome this problem? >> >> >> [1]https://github.com/onelogin/php-saml >> >> -- >> Thanks, >> Pubudu > > > > -- > Thanks, > Pubudu -- Thanks, Pubudu From bburke at redhat.com Fri Jun 5 02:51:03 2015 From: bburke at redhat.com (Bill Burke) Date: Fri, 05 Jun 2015 02:51:03 -0400 Subject: [keycloak-user] Using OneLogin php-saml library with keycloak In-Reply-To: References: Message-ID: <557146D7.5010500@redhat.com> How is the relay state transfered? POST or Redirect GET? How is it encoded? On 6/5/2015 2:43 AM, pubudu gunawardena wrote: > Quoting from section "3.1.1 Use of RelayState" in the spec > (https://www.oasis-open.org/committees/download.php/35387/sstc-saml-bindings-errata-2.0-wd-05-diff.pdf), > > "Namely, if a SAML request message is accompanied by RelayState data, > then the SAML responder MUST return its SAML protocol response using a > binding that also supports a RelayState mechanism, and it MUST place > the exact RelayState data it received with the request into the > corresponding RelayState parameter in the response." > > which is not the case if keycloak is removing the forward slashes from > the RelayState. So I think there should be a mechanism to escape the > RelayState data and yet return the data to the Service Provider > unmodified. > > On Thu, Jun 4, 2015 at 5:43 PM, pubudu gunawardena wrote: >> After debugging found a possible cause for this. In line 305 of >> SAML2BindingBuilder2 there is code as following >> >> escapeAttribute(relayState) >> >> which removes the forward slashes from the url. So I guess this is a bug? >> >> On Thu, Jun 4, 2015 at 5:14 PM, pubudu gunawardena wrote: >>> Hi All, >>> >>> I am trying to use the OneLogin php-saml library[1] as a service >>> provider that uses keycloak as a SAML identity provider. The >>> "RelayState" parameter is sent properly form the SP to the IDP but in >>> the response, the forward slashes are missing from the RelayState. >>> For example in the post parameters of the authentication request, the >>> RelayState shows "http://phpsaml/demo1/" but in the response from >>> keycloak, it shows "http:phpsamldemo1". This is causing the php-saml >>> library to throw exceptions. I'm using keycloak 1.2.0.Final. >>> >>> How can I overcome this problem? >>> >>> >>> [1]https://github.com/onelogin/php-saml >>> >>> -- >>> Thanks, >>> Pubudu >> >> >> >> -- >> Thanks, >> Pubudu > > > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com From pubudupg at gmail.com Fri Jun 5 02:51:19 2015 From: pubudupg at gmail.com (pubudu gunawardena) Date: Fri, 5 Jun 2015 12:21:19 +0530 Subject: [keycloak-user] Problem with SAML SLO with Redirect Binding Message-ID: Hi All, When trying out SAML SLO with keycloak using Redirect Binding, noticed that the "SigAlg" GET parameter of the logout response was set to something like "SHA256withRSA". Quoting from section "3.4.4.1 DEFLATE Encoding" of the spec, "The signature algorithm identifier MUST be included as an additional query string parameter,named SigAlg. The value of this parameter MUST be a URI that identifies the algorithm used to sign the URL-encoded SAML protocol message, specified according to [XMLSig] or whatever specification governs the algorithm" and libraries such as simplesamlphp and php-saml expect it to be a uri in the form of "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256". The mismatch causes those libraries to give errors when used with keycloak idp. -- Thanks, Pubudu From pubudupg at gmail.com Fri Jun 5 02:55:52 2015 From: pubudupg at gmail.com (pubudu gunawardena) Date: Fri, 5 Jun 2015 12:25:52 +0530 Subject: [keycloak-user] Using OneLogin php-saml library with keycloak In-Reply-To: <557146D7.5010500@redhat.com> References: <557146D7.5010500@redhat.com> Message-ID: The relay state is transferred to keycloak in an HTTP GET. It seems to be urlencoded by the library that I'm using. The parameter looks like "RelayState=http%3A%2F%2Fportal-simulator%2Fprotected.php". On Fri, Jun 5, 2015 at 12:21 PM, Bill Burke wrote: > How is the relay state transfered? POST or Redirect GET? How is it > encoded? > > On 6/5/2015 2:43 AM, pubudu gunawardena wrote: >> Quoting from section "3.1.1 Use of RelayState" in the spec >> (https://www.oasis-open.org/committees/download.php/35387/sstc-saml-bindings-errata-2.0-wd-05-diff.pdf), >> >> "Namely, if a SAML request message is accompanied by RelayState data, >> then the SAML responder MUST return its SAML protocol response using a >> binding that also supports a RelayState mechanism, and it MUST place >> the exact RelayState data it received with the request into the >> corresponding RelayState parameter in the response." >> >> which is not the case if keycloak is removing the forward slashes from >> the RelayState. So I think there should be a mechanism to escape the >> RelayState data and yet return the data to the Service Provider >> unmodified. >> >> On Thu, Jun 4, 2015 at 5:43 PM, pubudu gunawardena wrote: >>> After debugging found a possible cause for this. In line 305 of >>> SAML2BindingBuilder2 there is code as following >>> >>> escapeAttribute(relayState) >>> >>> which removes the forward slashes from the url. So I guess this is a bug? >>> >>> On Thu, Jun 4, 2015 at 5:14 PM, pubudu gunawardena wrote: >>>> Hi All, >>>> >>>> I am trying to use the OneLogin php-saml library[1] as a service >>>> provider that uses keycloak as a SAML identity provider. The >>>> "RelayState" parameter is sent properly form the SP to the IDP but in >>>> the response, the forward slashes are missing from the RelayState. >>>> For example in the post parameters of the authentication request, the >>>> RelayState shows "http://phpsaml/demo1/" but in the response from >>>> keycloak, it shows "http:phpsamldemo1". This is causing the php-saml >>>> library to throw exceptions. I'm using keycloak 1.2.0.Final. >>>> >>>> How can I overcome this problem? >>>> >>>> >>>> [1]https://github.com/onelogin/php-saml >>>> >>>> -- >>>> Thanks, >>>> Pubudu >>> >>> >>> >>> -- >>> Thanks, >>> Pubudu >> >> >> > > -- > Bill Burke > JBoss, a division of Red Hat > http://bill.burkecentral.com > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user -- Thanks, Pubudu From bburke at redhat.com Fri Jun 5 08:50:55 2015 From: bburke at redhat.com (Bill Burke) Date: Fri, 05 Jun 2015 08:50:55 -0400 Subject: [keycloak-user] Using OneLogin php-saml library with keycloak In-Reply-To: References: Message-ID: <55719B2F.2020009@redhat.com> https://issues.jboss.org/browse/KEYCLOAK-1408 Its in my queue now. On 6/4/2015 7:44 AM, pubudu gunawardena wrote: > Hi All, > > I am trying to use the OneLogin php-saml library[1] as a service > provider that uses keycloak as a SAML identity provider. The > "RelayState" parameter is sent properly form the SP to the IDP but in > the response, the forward slashes are missing from the RelayState. > For example in the post parameters of the authentication request, the > RelayState shows "http://phpsaml/demo1/" but in the response from > keycloak, it shows "http:phpsamldemo1". This is causing the php-saml > library to throw exceptions. I'm using keycloak 1.2.0.Final. > > How can I overcome this problem? > > > [1]https://github.com/onelogin/php-saml > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com From akurdyukov at gmail.com Fri Jun 5 09:35:13 2015 From: akurdyukov at gmail.com (Alik Kurdyukov) Date: Fri, 5 Jun 2015 16:35:13 +0300 Subject: [keycloak-user] Keycloak and desktop Message-ID: Hello, I have a little question on integrating desktop application with Keycloak. I have 1. Desktop application that is a client to (1) a non-web server application and (2) a web server application 2. Non-web server application 3. Web application that is a Keycloak client 4. Keycloak server I want to ask user to auth once with Keycloak (using native WPF window) and use token of some kind for both servers. The questions are 1. What API should desktop application use to auth user with Keycloak? (maybe, I need to read keycloak.js code?) 2. What API should non-web server use to verify token? 3. Can I use bearer token with keycloak client that has access type ?confidential', not ?bearer only?? Thank you for your work :) --? Best regards, Alik Kurdyukov -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150605/b03df148/attachment-0001.html From juandiego83 at gmail.com Fri Jun 5 11:18:41 2015 From: juandiego83 at gmail.com (Juan Diego) Date: Fri, 5 Jun 2015 10:18:41 -0500 Subject: [keycloak-user] keycloak.js with a different domain (cross domain problems) In-Reply-To: <2132888715.12465779.1433479642703.JavaMail.zimbra@redhat.com> References: <2132888715.12465779.1433479642703.JavaMail.zimbra@redhat.com> Message-ID: Thanks, yes the problem was that I added http://unika.localdomain/ with a slash at the end, it took me a while to realize the problem On Thu, Jun 4, 2015 at 11:47 PM, Stian Thorgersen wrote: > You need to add web origins to your client to allow CORS requests to > Keycloak. > > Open the admin console, find your client, in web origins add ' > http://unika.localdomain'. > > ----- Original Message ----- > > From: "Juan Diego" > > To: keycloak-user at lists.jboss.org > > Sent: Thursday, 4 June, 2015 8:04:19 PM > > Subject: [keycloak-user] keycloak.js with a different domain (cross > domain problems) > > > > Hi, > > > > I am getting this error when I try to run this from my apache server > instead > > from my app with jboss, > > > > XMLHttpRequest cannot load > > http://unika.localdomain:8080/auth/realms/unika/tokens/access/codes . No > > 'Access-Control-Allow-Origin' header is present on the requested > resource. > > Origin ' http://unika.localdomain ' is therefore not allowed access > > > > unica.localdomain is set on my /etc/hosts > > > > Do I have to run my web app on the same server to avoid this? > > > > GET http://localhost:8080/unika/test/undefined/realms/undefined/account > 401 > > (Unauthorized) > > > > > > Also when I try to run it from as part of my war file on my server > > 12:48:27,159 WARN [org.keycloak.adapters.OAuthRequestAuthenticator] > (default > > task-122) No state cookie > > 12:48:56,153 WARN > > [org.keycloak.protocol.oidc.endpoints.AuthorizationEndpoint] (default > > task-127) Invoking deprecated endpoint > > > http://localhost:8080/auth/realms/unika/tokens/login?client_id=unika-angular&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Funika%2Ftest%2Fcustomers%2Fview.html&state=48084ae8-d454-4e7e-8c42-01c51ec09a3c&response_type=code > > 12:48:58,570 WARN [org.keycloak.adapters.OAuthRequestAuthenticator] > (default > > task-1) No state cookie > > > > And I get a "bad request" on my browser. > > > > My test app is basically the customer-portal-js example with a different > > keycloak.json file > > > > > > I also set in web.xml to secure some folders, and it works fine. So > basically > > when I log on to those folders and go back to my web-app it shows the > > correct info. > > > > thanks, > > > > Juan Diego > > > > > > > > > > _______________________________________________ > > keycloak-user mailing list > > keycloak-user at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/keycloak-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150605/9833c548/attachment.html From shivasaxena999 at gmail.com Fri Jun 5 18:06:30 2015 From: shivasaxena999 at gmail.com (Shiva Saxena) Date: Sat, 6 Jun 2015 03:36:30 +0530 Subject: [keycloak-user] Multilingual support In-Reply-To: References: Message-ID: Hi Juan, Its possible to create new Locales just go to the web keycloak admin console >select your realm>settings>Themes tab Here you can enable internationalization and type a Locale(if already not present in dropdown) and hit enter. Then you will have to create a property file for the messages(that will contain the text in the new language).I am giving an example for login page but you can use the same every where. 1. open folder "KEYCLOAK_HOME/standalone/configuration/themes/base/login/messages" 2. create a file *messages_NEWLOCALE.properties* and enter the messages in the translated language. You can use the existing properties files as reference. Here KEYCLOAK_HOME is the location where keycloak is located and NEWLOCALE should be the name of the local you have created. -- Best Regards *Shiva Saxena* *Blog | Linkedin | StackOverflow * On Fri, Jun 5, 2015 at 6:54 AM, Juan Diego wrote: > Is it possible to add your custom Locales > > On Thu, Jun 4, 2015 at 8:21 PM, Juan Diego wrote: > >> Thanks >> >> On Thu, Jun 4, 2015 at 5:05 PM, Shiva Saxena >> wrote: >> >>> Yes, its possible,please refer to this feature request >>> https://issues.jboss.org/browse/KEYCLOAK-301 >>> >>> On Fri, Jun 5, 2015 at 3:16 AM, Juan Diego >>> wrote: >>> >>>> Is it possible to set the login and register form different languages? >>>> >>>> _______________________________________________ >>>> keycloak-user mailing list >>>> keycloak-user at lists.jboss.org >>>> https://lists.jboss.org/mailman/listinfo/keycloak-user >>>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150606/071240de/attachment.html From juandiego83 at gmail.com Fri Jun 5 21:07:02 2015 From: juandiego83 at gmail.com (Juan Diego) Date: Fri, 5 Jun 2015 20:07:02 -0500 Subject: [keycloak-user] After reloading web page I loose the token. Message-ID: I am trying to understando how to use keycloak.js in a web app with angular, I created a button that calls keycloak.login(); and it seems to work I am prompted with keycloaks login form, and it seems to work, I am able to retrieve my username and display it on my page. But when I refresh my page, it seems to loses the token. The idtoken is null or not defined. Here it is an example of my code, http://pastebin.com/W0ZHbtUW, -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150605/34a7d8fd/attachment.html From stan.ieugen at gmail.com Sat Jun 6 04:38:43 2015 From: stan.ieugen at gmail.com (Ioan Eugen Stan) Date: Sat, 06 Jun 2015 08:38:43 +0000 Subject: [keycloak-user] After reloading web page I loose the token. In-Reply-To: References: Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hello Juan, It is expected. You are reloading your app. Try persisting the token in local storage. Regards, On 6 iunie 2015 04:07:02 EEST, Juan Diego wrote: >I am trying to understando how to use keycloak.js in a web app with >angular, I created a button that calls keycloak.login(); and it seems >to >work I am prompted with keycloaks login form, and it seems to work, I >am >able to retrieve my username and display it on my page. But when I >refresh >my page, it seems to loses the token. The idtoken is null or not >defined. >Here it is an example of my code, http://pastebin.com/W0ZHbtUW, > > >------------------------------------------------------------------------ > >_______________________________________________ >keycloak-user mailing list >keycloak-user at lists.jboss.org >https://lists.jboss.org/mailman/listinfo/keycloak-user - -- Sent from my Android device with K-9 Mail. Please excuse my brevity. -----BEGIN PGP SIGNATURE----- iQFOBAEBCAA4MRxJb2FuIEV1Z2VuIFN0YW4gKGlldWdlbikgPHN0YW4uaWV1Z2Vu QGdtYWlsLmNvbT4FAlVysZIACgkQ7Qltk+7tR9qaLAf/ds46CpbiCVcmFdYwD6WI mOi/hse+BegoweWrUa7aeKP9mH8sy6cRvPQ4aWYl6qOojmWwNPKE/modSx1B8qA0 +lCII0BmVsCJyhJXD88aY1bEITLYX/G768qhA/kZmWa9tyLCYgLq52q/maZa3OlH 0ZF/iZPrf1ASvnWZkriI9ZjBSMhA+RDYWdbvC0pwwiM2cOPhIlBipWdiiiuPJCtJ bqAfKPtcn0G0F8P8ykQK1fk5rrjkfbK/shZ3R4bGU6/Q5Sj5a8s9E9Nw7Y9S/7ux 1HUsYXgl32+XE3oc2A0Ec4/McOJ5TNW9LGUc+ByJLL3QRcUO4VzKFxN0OeH+iVl/ Vg== =WPo4 -----END PGP SIGNATURE----- From chrisflatley at gmx.net Mon Jun 8 07:16:50 2015 From: chrisflatley at gmx.net (Chris Flatley) Date: Mon, 8 Jun 2015 12:16:50 +0100 Subject: [keycloak-user] Get user by id Message-ID: This is probably really obvious, but I can't find it. I'm currently using the Admin REST API to find users by search. I see that the Admin REST API has get user representation by username, but I want to also find user info (UserRepresentation) given the id. If this possible through REST? (Use case being it makes more sense to me to store the user id in my database as a reference back to keycloak rather than the username or replicate any of the user info which keycloak has stored). Many thanks (great product!) C -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150608/e4d92c3c/attachment.html From stian at redhat.com Mon Jun 8 07:21:25 2015 From: stian at redhat.com (Stian Thorgersen) Date: Mon, 8 Jun 2015 07:21:25 -0400 (EDT) Subject: [keycloak-user] Get user by id In-Reply-To: References: Message-ID: <1848033160.13483940.1433762485643.JavaMail.zimbra@redhat.com> In the past we had a mix of lookup by username/name and id. To make it more consistent in 1.3 we're changing this to only allow lookup by id. 1.3 should be out next week. ----- Original Message ----- > From: "Chris Flatley" > To: keycloak-user at lists.jboss.org > Sent: Monday, 8 June, 2015 1:16:50 PM > Subject: [keycloak-user] Get user by id > > This is probably really obvious, but I can't find it. > > I'm currently using the Admin REST API to find users by search. > > I see that the Admin REST API has get user representation by username, but I > want to also find user info (UserRepresentation) given the id. > > If this possible through REST? > > (Use case being it makes more sense to me to store the user id in my database > as a reference back to keycloak rather than the username or replicate any of > the user info which keycloak has stored). > > Many thanks (great product!) > > C > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user From chrisflatley at gmx.net Mon Jun 8 08:52:12 2015 From: chrisflatley at gmx.net (Chris Flatley) Date: Mon, 8 Jun 2015 13:52:12 +0100 Subject: [keycloak-user] Get user by id In-Reply-To: References: <1848033160.13483940.1433762485643.JavaMail.zimbra@redhat.com> Message-ID: Thanks. I noticed some comments on that, changing usernames, etc in the dev mailing list. I couldn't quite see what the end results was (between the mailing list, jira, etc). Is the preferredUsername going to change too? Just wondered since I can register google.username at domain.com (as my username on keycloak's user inbuilt db). That overlaps with username at domain.com for a google provided account. Then the username at domain.com can't do social login through google. It would be nice if all brokers (including the internal one prefixed an brokerid to avoid this), C > C > > On Mon, Jun 8, 2015 at 12:21 PM, Stian Thorgersen > wrote: > >> In the past we had a mix of lookup by username/name and id. To make it >> more consistent in 1.3 we're changing this to only allow lookup by id. 1.3 >> should be out next week. >> >> ----- Original Message ----- >> > From: "Chris Flatley" >> > To: keycloak-user at lists.jboss.org >> > Sent: Monday, 8 June, 2015 1:16:50 PM >> > Subject: [keycloak-user] Get user by id >> > >> > This is probably really obvious, but I can't find it. >> > >> > I'm currently using the Admin REST API to find users by search. >> > >> > I see that the Admin REST API has get user representation by username, >> but I >> > want to also find user info (UserRepresentation) given the id. >> > >> > If this possible through REST? >> > >> > (Use case being it makes more sense to me to store the user id in my >> database >> > as a reference back to keycloak rather than the username or replicate >> any of >> > the user info which keycloak has stored). >> > >> > Many thanks (great product!) >> > >> > C >> > >> > _______________________________________________ >> > keycloak-user mailing list >> > keycloak-user at lists.jboss.org >> > https://lists.jboss.org/mailman/listinfo/keycloak-user >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150608/c4a264cb/attachment.html From Henk.Laracker at planonsoftware.com Mon Jun 8 09:51:47 2015 From: Henk.Laracker at planonsoftware.com (Henk Laracker) Date: Mon, 8 Jun 2015 15:51:47 +0200 Subject: [keycloak-user] Import External IDP Config Message-ID: Hi, >From two different customers I received a idp config xml file. Both files I can import without a error, but nothing is filled in the fields. From security reasons I can not send the files. What is input you need to solve this problem? Is it possible to change the log level of the keycloak server. We are running it on openshift (private) Met vriendelijke groet / Yours sincerely / Mit freundlichen Gr??en / Tr?s cordialement, Henk Laracker -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150608/93561932/attachment.html From carlosthe19916 at gmail.com Mon Jun 8 11:56:54 2015 From: carlosthe19916 at gmail.com (Carlos Feria) Date: Mon, 8 Jun 2015 10:56:54 -0500 Subject: [keycloak-user] org.keycloak.VerificationException: Token is not active Message-ID: Hi all. I'm migrating my app to *keycloak-1.2.0.Final*. In this escenario i *have two servers*, one for *keycloak* and other *wildfly+keycloak-adapter* for myApp.war, both servers are in diferent hosts. I'm using javascript adapter for my app and a wildfly-adapter for my restApi.war. Javascript adapter send a requests as: *Bearer eyJhb..............b-ckM2WKRPgopaeQ3I3ZXQwOyYWFGEd5OIHqA* my problem is that when i send a request to restApi.war i have an exception as: ERROR [org.keycloak.adapters.BearerTokenRequestAuthenticator] (default task-14) Failed to verify token: *org.keycloak.VerificationException: Token is not active.* this tell me that my token is not active....i can't find where is the problem. In keycloak-1.1.Final this configuration was good. Please help me. -- Carlos E. Feria Vila -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150608/33315b17/attachment.html From bburke at redhat.com Mon Jun 8 12:47:28 2015 From: bburke at redhat.com (Bill Burke) Date: Mon, 08 Jun 2015 12:47:28 -0400 Subject: [keycloak-user] Using OneLogin php-saml library with keycloak In-Reply-To: References: Message-ID: <5575C720.3020905@redhat.com> Should be fixed in master and will be in 1.3 release. On 6/4/2015 7:44 AM, pubudu gunawardena wrote: > Hi All, > > I am trying to use the OneLogin php-saml library[1] as a service > provider that uses keycloak as a SAML identity provider. The > "RelayState" parameter is sent properly form the SP to the IDP but in > the response, the forward slashes are missing from the RelayState. > For example in the post parameters of the authentication request, the > RelayState shows "http://phpsaml/demo1/" but in the response from > keycloak, it shows "http:phpsamldemo1". This is causing the php-saml > library to throw exceptions. I'm using keycloak 1.2.0.Final. > > How can I overcome this problem? > > > [1]https://github.com/onelogin/php-saml > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com From peterson.dean at gmail.com Mon Jun 8 14:46:52 2015 From: peterson.dean at gmail.com (Dean Peterson) Date: Mon, 8 Jun 2015 13:46:52 -0500 Subject: [keycloak-user] When will Keycloak be a supported service? Message-ID: I have been using Keycloak for some time now. I love it. I am doing a proof of concept for work. Unfortunately I am one of two architects. For reasons I won't go into, the other architect keeps changing his requirements. The new requirement is that security be a supported and externally hosted service. Do you have a time frame when Keycloak will be something we can just pay support for and have it hosted externally? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150608/32959824/attachment.html From bburke at redhat.com Mon Jun 8 14:59:45 2015 From: bburke at redhat.com (Bill Burke) Date: Mon, 08 Jun 2015 14:59:45 -0400 Subject: [keycloak-user] When will Keycloak be a supported service? In-Reply-To: References: Message-ID: <5575E621.6010008@redhat.com> I'm not supposed to talk about productization timelines, but Keycloak is in the pipeline to be a supported product at Red Hat. So, its not an if, but a when... That's all I can say, sorry. On 6/8/2015 2:46 PM, Dean Peterson wrote: > I have been using Keycloak for some time now. I love it. I am doing a > proof of concept for work. Unfortunately I am one of two architects. > For reasons I won't go into, the other architect keeps changing his > requirements. The new requirement is that security be a supported and > externally hosted service. Do you have a time frame when Keycloak will > be something we can just pay support for and have it hosted externally? > > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com From ayrton at ubuntu.com Mon Jun 8 15:58:19 2015 From: ayrton at ubuntu.com (=?UTF-8?Q?Ayrton_Ara=C3=BAjo?=) Date: Mon, 8 Jun 2015 15:58:19 -0400 Subject: [keycloak-user] LDAP configuration In-Reply-To: <555D77F6.6050905@redhat.com> References: <555D77F6.6050905@redhat.com> Message-ID: Okay, as your suggestion I changed to the complete DN, but now I get this: Caused by: org.picketlink.idm.IdentityManagementException: PLIDM000501: Could not query IdentityType using query [org.picketlink.idm.query.internal.D efaultIdentityQuery at 69d4fcb8]. at org.picketlink.idm.ldap.internal.LDAPIdentityStore.fetchQueryResults(LDAPIdentityStore.java:236) at org.picketlink.idm.query.internal.DefaultIdentityQuery.getResultList(DefaultIdentityQuery.java:190) ... 57 more Caused by: org.picketlink.idm.IdentityManagementException: Could not populate attribute type org.picketlink.idm.model.basic.User at 8665a20. at org.picketlink.idm.ldap.internal.LDAPIdentityStore.populateAttributedType(LDAPIdentityStore.java:815) at org.picketlink.idm.ldap.internal.LDAPIdentityStore.populateAttributedType(LDAPIdentityStore.java:682) at org.picketlink.idm.ldap.internal.LDAPIdentityStore.fetchQueryResults(LDAPIdentityStore.java:231) ... 58 more Caused by: java.lang.NullPointerException Em quinta-feira, 21 de maio de 2015, Marek Posolda escreveu: > On 20.5.2015 22:00, Ayrton Ara?jo wrote: > > I'm trying do add a new user federation provider for integrate keycloak > with a ldap server. > > The parameters: > Console display name -> Active Directory > Priority -> 0 > Edit Mode -> READ_ONLY > Sync Registrations -> OFF > Vendor -> Active Directory > Username LDAP attribute -> sAMAccountName > User Object Classes -> person, organizationPerson, user > Connection URL -> ldap://dom.example.com:389 > Base DN -> DC=dom,DC=example,DC=com > User DN Suffix -> CN=Users > Bind DN -> CN=Keycloak.LDAP;CN=Users;DC=dom,DC=example,DC=com > Bind Credential -> ******** > Connection pooling -> ON > Pagination -> ON > Enable Account After Password Update -> OFF > Batch Size -> 100 > Periodic Full Sync -> OFF > Periodic changed users sync -> ON > Changed users sync period -> 86400 > > I tried change User DN Suffix to only Users, but it not works. The log > always saying: > LDAP: error code 1 - 000020D6: SvcErr: DSID-031007DB, problem 5012 > (DIR_ERROR) > And it says this when it tries to parse the User DN Suffix. > > Currently "User DN Suffix" is supposed to contain whole DN. So in your > case it should be probably something like: CN=Users,DC=dom,DC=example,DC=com > > I agree that name of the parameter "User DN Suffix" is misleading. It will > be improved in next version ( 1.3.0.Beta1 ) and also it will be possible to > configure more User DNs to search for users. > > Marek > > > Theres something wrong with my conf? > > > _______________________________________________ > keycloak-user mailing listkeycloak-user at lists.jboss.org https://lists.jboss.org/mailman/listinfo/keycloak-user > > > -- Ayrton Ara?jo "If you can tell the false from the true you are already a scientist." -- http://ayr-ton.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150608/8286b9b5/attachment-0001.html From John.Schneider at carrier.utc.com Mon Jun 8 16:45:19 2015 From: John.Schneider at carrier.utc.com (Schneider, John DODGE CONSULTING SERVICES, LLC) Date: Mon, 8 Jun 2015 20:45:19 +0000 Subject: [keycloak-user] When will Keycloak be a supported Message-ID: +1 for paid Keycloak support services from JBoss. If you could advocate for this by 2016, it'd be much appreciated. My client is evaluating other products mainly because of the FUD of free products and lack of commercial support. Some people in big companies think a product is better just because they have to pay for support. In the meantime, keep up the great work on development and don't take this as a message that you're not already doing a fantastic job supporting Keycloak. You are! Thanks, John -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150608/9670bdef/attachment.html From prabhalar at yahoo.com Mon Jun 8 17:31:36 2015 From: prabhalar at yahoo.com (Raghu Prabhala) Date: Mon, 8 Jun 2015 21:31:36 +0000 (UTC) Subject: [keycloak-user] Import External IDP Config In-Reply-To: References: Message-ID: <1563197306.7542120.1433799096176.JavaMail.yahoo@mail.yahoo.com> Even I had similar issue earlier. Cleaning the browser cache and?importing the config files?addressed it?You can give it a try. ? From: Henk Laracker To: "keycloak-user at lists.jboss.org" Sent: Monday, June 8, 2015 9:51 AM Subject: [keycloak-user] Import External IDP Config Hi, >From two different customers I received a idp config xml file. Both files I can import without a error, but nothing is filled in the fields. From security reasons I can not send the files. What is input you need to solve this problem? Is it possible to change the log level of the keycloak server. We are running it on openshift (private)? Met vriendelijke groet / Yours sincerely / Mit freundlichen Gr??en / Tr?s cordialement, Henk Laracker _______________________________________________ keycloak-user mailing list keycloak-user at lists.jboss.org https://lists.jboss.org/mailman/listinfo/keycloak-user -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150608/fcdbd46d/attachment.html From pubudupg at gmail.com Mon Jun 8 20:43:44 2015 From: pubudupg at gmail.com (pubudu gunawardena) Date: Tue, 9 Jun 2015 06:13:44 +0530 Subject: [keycloak-user] Using OneLogin php-saml library with keycloak In-Reply-To: <5575C720.3020905@redhat.com> References: <5575C720.3020905@redhat.com> Message-ID: That's great. And thanks for the great product. On Mon, Jun 8, 2015 at 10:17 PM, Bill Burke wrote: > Should be fixed in master and will be in 1.3 release. > > On 6/4/2015 7:44 AM, pubudu gunawardena wrote: >> Hi All, >> >> I am trying to use the OneLogin php-saml library[1] as a service >> provider that uses keycloak as a SAML identity provider. The >> "RelayState" parameter is sent properly form the SP to the IDP but in >> the response, the forward slashes are missing from the RelayState. >> For example in the post parameters of the authentication request, the >> RelayState shows "http://phpsaml/demo1/" but in the response from >> keycloak, it shows "http:phpsamldemo1". This is causing the php-saml >> library to throw exceptions. I'm using keycloak 1.2.0.Final. >> >> How can I overcome this problem? >> >> >> [1]https://github.com/onelogin/php-saml >> > > -- > Bill Burke > JBoss, a division of Red Hat > http://bill.burkecentral.com > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user -- Thanks, Pubudu From Henk.Laracker at planonsoftware.com Tue Jun 9 05:14:11 2015 From: Henk.Laracker at planonsoftware.com (Henk Laracker) Date: Tue, 9 Jun 2015 11:14:11 +0200 Subject: [keycloak-user] Import External IDP Config In-Reply-To: <1563197306.7542120.1433799096176.JavaMail.yahoo@mail.yahoo.com> References: <1563197306.7542120.1433799096176.JavaMail.yahoo@mail.yahoo.com> Message-ID: Hi, It is not related to the cache, I tired it in different browser and cleaning the cache. Met vriendelijke groet / Yours sincerely / Mit freundlichen Gr??en / Tr?s cordialement, Henk Laracker From: Raghu Prabhala > Reply-To: Raghu Prabhala > Date: Monday 8 June 2015 23:31 To: Henk Laracker >, "keycloak-user at lists.jboss.org" > Subject: Re: [keycloak-user] Import External IDP Config Even I had similar issue earlier. Cleaning the browser cache and importing the config files addressed it You can give it a try. ________________________________ From: Henk Laracker > To: "keycloak-user at lists.jboss.org" > Sent: Monday, June 8, 2015 9:51 AM Subject: [keycloak-user] Import External IDP Config Hi, >From two different customers I received a idp config xml file. Both files I can import without a error, but nothing is filled in the fields. From security reasons I can not send the files. What is input you need to solve this problem? Is it possible to change the log level of the keycloak server. We are running it on openshift (private) Met vriendelijke groet / Yours sincerely / Mit freundlichen Gr??en / Tr?s cordialement, Henk Laracker _______________________________________________ keycloak-user mailing list keycloak-user at lists.jboss.org https://lists.jboss.org/mailman/listinfo/keycloak-user -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150609/3809539c/attachment.html From mposolda at redhat.com Tue Jun 9 10:07:12 2015 From: mposolda at redhat.com (Marek Posolda) Date: Tue, 09 Jun 2015 16:07:12 +0200 Subject: [keycloak-user] LDAP configuration In-Reply-To: References: <555D77F6.6050905@redhat.com> Message-ID: <5576F310.8090502@redhat.com> You did not include whole exception though. Especially you omit on which line NullPointerException is thrown, which is most important here. Could you also please enable TRACE logging for org.picketlink.idm.ldap.internal.LDAPIdentityStore and send some log snippet with few lines before this exception is thrown? Thanks, Marek On 8.6.2015 21:58, Ayrton Ara?jo wrote: > Okay, > > as your suggestion I changed to the complete DN, but now I get this: > > Caused by: org.picketlink.idm.IdentityManagementException: > PLIDM000501: Could not query IdentityType using query > [org.picketlink.idm.query.internal.D > efaultIdentityQuery at 69d4fcb8]. > at > org.picketlink.idm.ldap.internal.LDAPIdentityStore.fetchQueryResults(LDAPIdentityStore.java:236) > at > org.picketlink.idm.query.internal.DefaultIdentityQuery.getResultList(DefaultIdentityQuery.java:190) > ... 57 more > Caused by: org.picketlink.idm.IdentityManagementException: Could not > populate attribute type org.picketlink.idm.model.basic.User at 8665a20. > at > org.picketlink.idm.ldap.internal.LDAPIdentityStore.populateAttributedType(LDAPIdentityStore.java:815) > at > org.picketlink.idm.ldap.internal.LDAPIdentityStore.populateAttributedType(LDAPIdentityStore.java:682) > at > org.picketlink.idm.ldap.internal.LDAPIdentityStore.fetchQueryResults(LDAPIdentityStore.java:231) > ... 58 more > Caused by: java.lang.NullPointerException > > > Em quinta-feira, 21 de maio de 2015, Marek Posolda > > escreveu: > > On 20.5.2015 22:00, Ayrton Ara?jo wrote: >> I'm trying do add a new user federation provider for integrate >> keycloak with a ldap server. >> >> The parameters: >> Console display name -> Active Directory >> Priority -> 0 >> Edit Mode -> READ_ONLY >> Sync Registrations -> OFF >> Vendor -> Active Directory >> Username LDAP attribute -> sAMAccountName >> User Object Classes -> person, organizationPerson, user >> Connection URL -> ldap://dom.example.com:389 >> >> Base DN -> DC=dom,DC=example,DC=com >> User DN Suffix -> CN=Users >> Bind DN -> CN=Keycloak.LDAP;CN=Users;DC=dom,DC=example,DC=com >> Bind Credential -> ******** >> Connection pooling -> ON >> Pagination -> ON >> Enable Account After Password Update -> OFF >> Batch Size -> 100 >> Periodic Full Sync -> OFF >> Periodic changed users sync -> ON >> Changed users sync period -> 86400 >> >> I tried change User DN Suffix to only Users, but it not works. >> The log always saying: >> LDAP: error code 1 - 000020D6: SvcErr: DSID-031007DB, problem >> 5012 (DIR_ERROR) >> And it says this when it tries to parse the User DN Suffix. > Currently "User DN Suffix" is supposed to contain whole DN. So in > your case it should be probably something like: > CN=Users,DC=dom,DC=example,DC=com > > I agree that name of the parameter "User DN Suffix" is misleading. > It will be improved in next version ( 1.3.0.Beta1 ) and also it > will be possible to configure more User DNs to search for users. > > Marek >> >> Theres something wrong with my conf? >> >> >> _______________________________________________ >> keycloak-user mailing list >> keycloak-user at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/keycloak-user > > > > -- > Ayrton Ara?jo > "If you can tell the false from the true you are already a scientist." > > -- > http://ayr-ton.net/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150609/8cb9bc12/attachment-0001.html From emorny at gmail.com Tue Jun 9 11:42:17 2015 From: emorny at gmail.com (Edem Morny) Date: Tue, 09 Jun 2015 15:42:17 +0000 Subject: [keycloak-user] Unable to Import Realm Json file in 1.2.0-RC1 Message-ID: <1433864537.6083.5.camel@localhost.localdomain> Hi, I created a realm in keycloak 1.2.0-RC1, exported it with the following command standalone.sh -Dkeycloak.migration.action=export -Dkeycloak.migration.provider=singleFile -Dkeycloak.migration.file=carewexmh-realm.json Unfortunately my colleagues are unable to import the exported realm file, and when I intentionally delete the realm and try to import it myself, I get the same exception as they do. Any idea what's wrong? Find the stacktrace below. If I need to include the jon file, do let me know and i'll include it. 15:25:35,904 ERROR [io.undertow.request] (default task-30) UT005023: Exception handling request to /auth/admin/realms: java.lang.RuntimeException: request path: /auth/admin/realms at org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:54) [keycloak-services-1.2.0.CR1.jar:1.2.0.CR1] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final] at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final] at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.1.0.Final.jar:1.1.0.Final] at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.0.Final.jar:1.1.0.Final] at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.0.Final.jar:1.1.0.Final] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final] at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final] at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Final.jar:1.1.0.Final] at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) [undertow-core-1.1.0.Final.jar:1.1.0.Final] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_25] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_25] Caused by: org.jboss.resteasy.spi.UnhandledException: org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of org.keycloak.representations.idm.RealmRepresentation out of START_ARRAY token at [Source: java.io.StringReader at 3119350b; line: 1, column: 1] at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:76) [resteasy-jaxrs-3.0.10.Final.jar:] at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:212) [resteasy-jaxrs-3.0.10.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:149) [resteasy-jaxrs-3.0.10.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:372) [resteasy-jaxrs-3.0.10.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179) [resteasy-jaxrs-3.0.10.Final.jar:] at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220) [resteasy-jaxrs-3.0.10.Final.jar:] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [resteasy-jaxrs-3.0.10.Final.jar:] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [resteasy-jaxrs-3.0.10.Final.jar:] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final] at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] at org.keycloak.services.filters.ClientConnectionFilter.doFilter(ClientConnectionFilter.java:41) [keycloak-services-1.2.0.CR1.jar:1.2.0.CR1] at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] at org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:40) [keycloak-services-1.2.0.CR1.jar:1.2.0.CR1] ... 28 more Caused by: org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of org.keycloak.representations.idm.RealmRepresentation out of START_ARRAY token at [Source: java.io.StringReader at 3119350b; line: 1, column: 1] at org.codehaus.jackson.map.JsonMappingException.from(JsonMappingException.java:163) [jackson-mapper-asl-1.9.13.jar:1.9.13] at org.codehaus.jackson.map.deser.StdDeserializationContext.mappingException(StdDeserializationContext.java:219) [jackson-mapper-asl-1.9.13.jar:1.9.13] at org.codehaus.jackson.map.deser.StdDeserializationContext.mappingException(StdDeserializationContext.java:212) [jackson-mapper-asl-1.9.13.jar:1.9.13] at org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromArray(BeanDeserializer.java:875) [jackson-mapper-asl-1.9.13.jar:1.9.13] at org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:597) [jackson-mapper-asl-1.9.13.jar:1.9.13] at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2732) [jackson-mapper-asl-1.9.13.jar:1.9.13] at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1863) [jackson-mapper-asl-1.9.13.jar:1.9.13] at org.keycloak.util.JsonSerialization.readValue(JsonSerialization.java:50) [keycloak-core-1.2.0.CR1.jar:1.2.0.CR1] at org.keycloak.services.resources.admin.RealmsAdminResource.uploadRealm(RealmsAdminResource.java:164) [keycloak-services-1.2.0.CR1.jar:1.2.0.CR1] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0_25] at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137) [resteasy-jaxrs-3.0.10.Final.jar:] at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296) [resteasy-jaxrs-3.0.10.Final.jar:] at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250) [resteasy-jaxrs-3.0.10.Final.jar:] at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:140) [resteasy-jaxrs-3.0.10.Final.jar:] at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:103) [resteasy-jaxrs-3.0.10.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) [resteasy-jaxrs-3.0.10.Final.jar:] ... 39 more -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150609/09ff180e/attachment.html From mposolda at redhat.com Tue Jun 9 11:57:28 2015 From: mposolda at redhat.com (Marek Posolda) Date: Tue, 09 Jun 2015 17:57:28 +0200 Subject: [keycloak-user] Unable to Import Realm Json file in 1.2.0-RC1 In-Reply-To: <1433864537.6083.5.camel@localhost.localdomain> References: <1433864537.6083.5.camel@localhost.localdomain> Message-ID: <55770CE8.3090603@redhat.com> Your colleagues are importing the realm file through admin console, right? That won't work because you did full export (you exported all the realms to the file) and hence the file contains the array of realms, not single realm, which admin console expects. To fix it, you can either: 1) Export just the single realm instead of all realms. You can do it by adding the additional property -Dkeycloak.migration.realmName (See docs for details). In this case file will contain just one realm and your colleagues can import it via admin console 2) Your colleagues will import file with all realms at startup with the system properties: /*standalone.sh -Dkeycloak.migration.action=import -Dkeycloak.migration.provider=singleFile -Dkeycloak.migration.file=carewexmh-realm.json*/ but not through admin console. Case (1) is when you want to export and import just one realm. Case (2) when you want to export and import all realms including master realm. Marek On 9.6.2015 17:42, Edem Morny wrote: > Hi, > > I created a realm in keycloak 1.2.0-RC1, exported it with the > following command > > /*standalone.sh -Dkeycloak.migration.action=export > -Dkeycloak.migration.provider=singleFile > -Dkeycloak.migration.file=carewexmh-realm.json*/ > > Unfortunately my colleagues are unable to import the exported realm > file, and when I intentionally delete the realm and try to import it > myself, I get the same exception as they do. Any idea what's wrong? > > Find the stacktrace below. If I need to include the jon file, do let > https://github.com/aerogear/aerogear-unifiedpush-server-integration-tests/blob/rewrite/tools/test-extension/server/src/main/java/org/jboss/aerogear/unifiedpush/test/KeycloakConfigurator.java#L96-L121me > know and i'll include it. > > > 15:25:35,904 ERROR [io.undertow.request] (default task-30) UT005023: Exception handling request to /auth/admin/realms: java.lang.RuntimeException: request path: /auth/admin/realms > at org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:54) [keycloak-services-1.2.0.CR1.jar:1.2.0.CR1] > at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] > at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] > at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] > at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] > at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] > at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78) > at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final] > at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] > at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] > at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final] > at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.1.0.Final.jar:1.1.0.Final] > at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] > at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.0.Final.jar:1.1.0.Final] > at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] > at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.0.Final.jar:1.1.0.Final] > at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final] > at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61) > at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final] > at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final] > at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] > at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] > at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] > at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] > at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Final.jar:1.1.0.Final] > at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) [undertow-core-1.1.0.Final.jar:1.1.0.Final] > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_25] > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_25] > at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_25] > Caused by: org.jboss.resteasy.spi.UnhandledException: org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of org.keycloak.representations.idm.RealmRepresentation out of START_ARRAY token > at [Source:java.io.StringReader at 3119350b ; line: 1, column: 1] > at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:76) [resteasy-jaxrs-3.0.10.Final.jar:] > at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:212) [resteasy-jaxrs-3.0.10.Final.jar:] > at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:149) [resteasy-jaxrs-3.0.10.Final.jar:] > at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:372) [resteasy-jaxrs-3.0.10.Final.jar:] > at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179) [resteasy-jaxrs-3.0.10.Final.jar:] > at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220) [resteasy-jaxrs-3.0.10.Final.jar:] > at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [resteasy-jaxrs-3.0.10.Final.jar:] > at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [resteasy-jaxrs-3.0.10.Final.jar:] > at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final] > at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] > at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] > at org.keycloak.services.filters.ClientConnectionFilter.doFilter(ClientConnectionFilter.java:41) [keycloak-services-1.2.0.CR1.jar:1.2.0.CR1] > at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] > at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final] > at org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:40) [keycloak-services-1.2.0.CR1.jar:1.2.0.CR1] > ... 28 more > Caused by: org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of org.keycloak.representations.idm.RealmRepresentation out of START_ARRAY token > at [Source:java.io.StringReader at 3119350b ; line: 1, column: 1] > at org.codehaus.jackson.map.JsonMappingException.from(JsonMappingException.java:163) [jackson-mapper-asl-1.9.13.jar:1.9.13] > at org.codehaus.jackson.map.deser.StdDeserializationContext.mappingException(StdDeserializationContext.java:219) [jackson-mapper-asl-1.9.13.jar:1.9.13] > at org.codehaus.jackson.map.deser.StdDeserializationContext.mappingException(StdDeserializationContext.java:212) [jackson-mapper-asl-1.9.13.jar:1.9.13] > at org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromArray(BeanDeserializer.java:875) [jackson-mapper-asl-1.9.13.jar:1.9.13] > at org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:597) [jackson-mapper-asl-1.9.13.jar:1.9.13] > at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2732) [jackson-mapper-asl-1.9.13.jar:1.9.13] > at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1863) [jackson-mapper-asl-1.9.13.jar:1.9.13] > at org.keycloak.util.JsonSerialization.readValue(JsonSerialization.java:50) [keycloak-core-1.2.0.CR1.jar:1.2.0.CR1] > at org.keycloak.services.resources.admin.RealmsAdminResource.uploadRealm(RealmsAdminResource.java:164) [keycloak-services-1.2.0.CR1.jar:1.2.0.CR1] > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_25] > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_25] > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_25] > at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0_25] > at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137) [resteasy-jaxrs-3.0.10.Final.jar:] > at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296) [resteasy-jaxrs-3.0.10.Final.jar:] > at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250) [resteasy-jaxrs-3.0.10.Final.jar:] > at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:140) [resteasy-jaxrs-3.0.10.Final.jar:] > at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:103) [resteasy-jaxrs-3.0.10.Final.jar:] > at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) [resteasy-jaxrs-3.0.10.Final.jar:] > ... 39 more > > > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150609/9c383a72/attachment-0001.html From orestis.tsakiridis at telestax.com Wed Jun 10 02:57:01 2015 From: orestis.tsakiridis at telestax.com (Orestis Tsakiridis) Date: Wed, 10 Jun 2015 09:57:01 +0300 Subject: [keycloak-user] Mixing https/http schemes with sslRequired == all Message-ID: Hello, Can keycloak operate on HTTPS while the REST application it protects runs on HTTP? I've also set "Require SSL" to "all requests" Regards Orestis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150610/7db1fb4d/attachment.html From stian at redhat.com Wed Jun 10 03:14:06 2015 From: stian at redhat.com (Stian Thorgersen) Date: Wed, 10 Jun 2015 03:14:06 -0400 (EDT) Subject: [keycloak-user] Mixing https/http schemes with sslRequired == all In-Reply-To: References: Message-ID: <1651616328.14982265.1433920446105.JavaMail.zimbra@redhat.com> ----- Original Message ----- > From: "Orestis Tsakiridis" > To: keycloak-user at lists.jboss.org > Sent: Wednesday, 10 June, 2015 8:57:01 AM > Subject: [keycloak-user] Mixing https/http schemes with sslRequired == all > > Hello, > > Can keycloak operate on HTTPS while the REST application it protects runs on > HTTP? > > I've also set "Require SSL" to "all requests" Keycloak only deals with request made to the Keycloak Server and doesn't put any restriction on the request to your rest endpoints. However, as you are passing the token in requests to your rest endpoints it wouldn't be the best idea to not use ssl. Although the risk can be mitigated slightly by having short lifespan on access tokens. > > > Regards > > Orestis > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user From stian at redhat.com Wed Jun 10 03:28:06 2015 From: stian at redhat.com (Stian Thorgersen) Date: Wed, 10 Jun 2015 03:28:06 -0400 (EDT) Subject: [keycloak-user] Keycloak and desktop In-Reply-To: References: Message-ID: <2049049799.14988770.1433921286761.JavaMail.zimbra@redhat.com> ----- Original Message ----- > From: "Alik Kurdyukov" > To: keycloak-user at lists.jboss.org > Sent: Friday, 5 June, 2015 3:35:13 PM > Subject: [keycloak-user] Keycloak and desktop > > Hello, > > I have a little question on integrating desktop application with Keycloak. I > have > 1. Desktop application that is a client to (1) a non-web server application > and (2) a web server application > 2. Non-web server application > 3. Web application that is a Keycloak client > 4. Keycloak server > > I want to ask user to auth once with Keycloak (using native WPF window) and > use token of some kind for both servers. > > The questions are > 1. What API should desktop application use to auth user with Keycloak? > (maybe, I need to read keycloak.js code?) Look at the customer-app-cli and https://github.com/keycloak/keycloak/blob/master/integration/installed/src/main/java/org/keycloak/adapters/installed/KeycloakInstalled.java KeycloakInstalled uses the desktop browser, but you should be able to easily modify it to use a native WPF window. > 2. What API should non-web server use to verify token? You can use org.keycloak.RSATokenVerifier from keycloak-core. > 3. Can I use bearer token with keycloak client that has access type > ?confidential', not ?bearer only?? Not sure what you mean about this question, but the intention is that a 'confidential' client is an app that initiates a login, while the 'bearer only' is a service that verifies the token. In your case the desktop app would be a confidential client (or a public if the app is publicly available as you can't keep the client secret private in that case) and the non-web server aka services would be a 'bearer only'. > > Thank you for your work :) > > -- > Best regards, > Alik Kurdyukov > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user From stian at redhat.com Wed Jun 10 03:35:50 2015 From: stian at redhat.com (Stian Thorgersen) Date: Wed, 10 Jun 2015 03:35:50 -0400 (EDT) Subject: [keycloak-user] Keycloak 1.2.0.Final released In-Reply-To: <5568277F.7080907@akvo.org> References: <815638486.1574215.1432036940104.JavaMail.zimbra@redhat.com> <5568277F.7080907@akvo.org> Message-ID: <1130181371.14991592.1433921750557.JavaMail.zimbra@redhat.com> We'll consider something (https://issues.jboss.org/browse/KEYCLOAK-1437) The files are also posted to JBoss Nexus [1] as well as Maven Central [2] so if you're concerned you can get them from one of these locations instead. [1] https://repository.jboss.org/nexus/#nexus-search;quick~keycloak-server-dist [2] http://search.maven.org/#artifactdetails%7Corg.keycloak%7Ckeycloak-server-dist%7C1.2.0.Final%7Cpom ----- Original Message ----- > From: "Iv?n Perdomo" > To: keycloak-user at lists.jboss.org > Sent: Friday, 29 May, 2015 10:46:55 AM > Subject: Re: [keycloak-user] Keycloak 1.2.0.Final released > > Hi, > > On 05/19/2015 02:02 PM, Stian Thorgersen wrote: > > to download go to > > https://sourceforge.net/projects/keycloak/files/1.2.0.Final/. > > Given the latest news on SF.net [1] I would suggest you publish the > files checksum, and/or perhaps sign the files [2] ? > > [1] > https://sourceforge.net/blog/gimp-win-project-wasnt-hijacked-just-abandoned/ > [2] https://www.gnupg.org/gph/en/manual/x135.html > > Cheers, > > -- > Iv?n > > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user From orestis.tsakiridis at telestax.com Wed Jun 10 06:57:28 2015 From: orestis.tsakiridis at telestax.com (Orestis Tsakiridis) Date: Wed, 10 Jun 2015 13:57:28 +0300 Subject: [keycloak-user] Mixing https/http schemes with sslRequired == all Message-ID: Indeed. I've already switched my application to https. The reason i'm asking this is because before switching i got blank (no content) responses from the application's endpoints. HTTP status code was 200 but there was no content returned. At the same time the following warning appeared in the logs. 12:21:55,085 WARN [org.keycloak.adapters.RequestAuthenticator] (http-/192.168.1.39:8080-4) SSL is required to authenticate On Wed, Jun 10, 2015 at 10:14 AM, Stian Thorgersen wrote: > > > ----- Original Message ----- > > From: "Orestis Tsakiridis" > > To: keycloak-user at lists.jboss.org > > Sent: Wednesday, 10 June, 2015 8:57:01 AM > > Subject: [keycloak-user] Mixing https/http schemes with sslRequired == > all > > > > Hello, > > > > Can keycloak operate on HTTPS while the REST application it protects > runs on > > HTTP? > > > > I've also set "Require SSL" to "all requests" > > Keycloak only deals with request made to the Keycloak Server and doesn't > put any restriction on the request to your rest endpoints. However, as you > are passing the token in requests to your rest endpoints it wouldn't be the > best idea to not use ssl. Although the risk can be mitigated slightly by > having short lifespan on access tokens. > > > > > > > Regards > > > > Orestis > > > > _______________________________________________ > > keycloak-user mailing list > > keycloak-user at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/keycloak-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150610/48e9d981/attachment.html From stian at redhat.com Wed Jun 10 07:13:50 2015 From: stian at redhat.com (Stian Thorgersen) Date: Wed, 10 Jun 2015 07:13:50 -0400 (EDT) Subject: [keycloak-user] Mixing https/http schemes with sslRequired == all In-Reply-To: References: Message-ID: <1724436949.15170259.1433934830369.JavaMail.zimbra@redhat.com> ----- Original Message ----- > From: "Orestis Tsakiridis" > To: "Stian Thorgersen" > Cc: keycloak-user at lists.jboss.org > Sent: Wednesday, 10 June, 2015 12:57:28 PM > Subject: Re: [keycloak-user] Mixing https/http schemes with sslRequired == all > > Indeed. I've already switched my application to https. > > The reason i'm asking this is because before switching i got blank (no > content) responses from the application's endpoints. HTTP status code was > 200 but there was no content returned. At the same time the following > warning appeared in the logs. > > 12:21:55,085 WARN [org.keycloak.adapters.RequestAuthenticator] > (http-/192.168.1.39:8080-4) SSL is required to authenticate In that case I'm probably mistaken and the Keycloak adapter actually checks that the request uses SSL when there's a token in it. That would make sense to me that it does, but I wasn't aware that it did ;) > > > On Wed, Jun 10, 2015 at 10:14 AM, Stian Thorgersen wrote: > > > > > > > ----- Original Message ----- > > > From: "Orestis Tsakiridis" > > > To: keycloak-user at lists.jboss.org > > > Sent: Wednesday, 10 June, 2015 8:57:01 AM > > > Subject: [keycloak-user] Mixing https/http schemes with sslRequired == > > all > > > > > > Hello, > > > > > > Can keycloak operate on HTTPS while the REST application it protects > > runs on > > > HTTP? > > > > > > I've also set "Require SSL" to "all requests" > > > > Keycloak only deals with request made to the Keycloak Server and doesn't > > put any restriction on the request to your rest endpoints. However, as you > > are passing the token in requests to your rest endpoints it wouldn't be the > > best idea to not use ssl. Although the risk can be mitigated slightly by > > having short lifespan on access tokens. > > > > > > > > > > > Regards > > > > > > Orestis > > > > > > _______________________________________________ > > > keycloak-user mailing list > > > keycloak-user at lists.jboss.org > > > https://lists.jboss.org/mailman/listinfo/keycloak-user > > > From orestis.tsakiridis at telestax.com Wed Jun 10 11:09:31 2015 From: orestis.tsakiridis at telestax.com (Orestis Tsakiridis) Date: Wed, 10 Jun 2015 18:09:31 +0300 Subject: [keycloak-user] Mixing https/http schemes with sslRequired == all In-Reply-To: <1724436949.15170259.1433934830369.JavaMail.zimbra@redhat.com> References: <1724436949.15170259.1433934830369.JavaMail.zimbra@redhat.com> Message-ID: Yep, it appears so. So, we're either talking about a feature, or some sort behaviour that is desired. Right? Anyway, thanks for clarifying this. On Wed, Jun 10, 2015 at 2:13 PM, Stian Thorgersen wrote: > > > ----- Original Message ----- > > From: "Orestis Tsakiridis" > > To: "Stian Thorgersen" > > Cc: keycloak-user at lists.jboss.org > > Sent: Wednesday, 10 June, 2015 12:57:28 PM > > Subject: Re: [keycloak-user] Mixing https/http schemes with sslRequired > == all > > > > Indeed. I've already switched my application to https. > > > > The reason i'm asking this is because before switching i got blank (no > > content) responses from the application's endpoints. HTTP status code was > > 200 but there was no content returned. At the same time the following > > warning appeared in the logs. > > > > 12:21:55,085 WARN [org.keycloak.adapters.RequestAuthenticator] > > (http-/192.168.1.39:8080-4) SSL is required to authenticate > > In that case I'm probably mistaken and the Keycloak adapter actually > checks that the request uses SSL when there's a token in it. That would > make sense to me that it does, but I wasn't aware that it did ;) > > > > > > > On Wed, Jun 10, 2015 at 10:14 AM, Stian Thorgersen > wrote: > > > > > > > > > > > ----- Original Message ----- > > > > From: "Orestis Tsakiridis" > > > > To: keycloak-user at lists.jboss.org > > > > Sent: Wednesday, 10 June, 2015 8:57:01 AM > > > > Subject: [keycloak-user] Mixing https/http schemes with sslRequired > == > > > all > > > > > > > > Hello, > > > > > > > > Can keycloak operate on HTTPS while the REST application it protects > > > runs on > > > > HTTP? > > > > > > > > I've also set "Require SSL" to "all requests" > > > > > > Keycloak only deals with request made to the Keycloak Server and > doesn't > > > put any restriction on the request to your rest endpoints. However, as > you > > > are passing the token in requests to your rest endpoints it wouldn't > be the > > > best idea to not use ssl. Although the risk can be mitigated slightly > by > > > having short lifespan on access tokens. > > > > > > > > > > > > > > > Regards > > > > > > > > Orestis > > > > > > > > _______________________________________________ > > > > keycloak-user mailing list > > > > keycloak-user at lists.jboss.org > > > > https://lists.jboss.org/mailman/listinfo/keycloak-user > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150610/cec0203a/attachment-0001.html From fadiabdeen at gmail.com Wed Jun 10 12:04:58 2015 From: fadiabdeen at gmail.com (Fadi Abdin) Date: Wed, 10 Jun 2015 12:04:58 -0400 Subject: [keycloak-user] Token is not active Message-ID: When my keycloak server run for few days, it start acting weird and start returning "Token is not active" when i just issued the token. My server is synced with a time server so the system date should be always valid. The solution is to restart keycloak. Have anyone faced this issue before ?? this issue is driving me crazy and i cant figure it out, i appreciate some help . . Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150610/c723b8f3/attachment.html From stian at redhat.com Wed Jun 10 13:16:08 2015 From: stian at redhat.com (Stian Thorgersen) Date: Wed, 10 Jun 2015 13:16:08 -0400 (EDT) Subject: [keycloak-user] Mixing https/http schemes with sslRequired == all In-Reply-To: References: <1724436949.15170259.1433934830369.JavaMail.zimbra@redhat.com> Message-ID: <839205973.15528041.1433956568553.JavaMail.zimbra@redhat.com> ----- Original Message ----- > From: "Orestis Tsakiridis" > To: "Stian Thorgersen" > Cc: keycloak-user at lists.jboss.org > Sent: Wednesday, 10 June, 2015 5:09:31 PM > Subject: Re: [keycloak-user] Mixing https/http schemes with sslRequired == all > > Yep, it appears so. > > So, we're either talking about a feature, or some sort behaviour that is > desired. Right? Yes, it is indeed the desired behavior. > > > Anyway, thanks for clarifying this. > > On Wed, Jun 10, 2015 at 2:13 PM, Stian Thorgersen wrote: > > > > > > > ----- Original Message ----- > > > From: "Orestis Tsakiridis" > > > To: "Stian Thorgersen" > > > Cc: keycloak-user at lists.jboss.org > > > Sent: Wednesday, 10 June, 2015 12:57:28 PM > > > Subject: Re: [keycloak-user] Mixing https/http schemes with sslRequired > > == all > > > > > > Indeed. I've already switched my application to https. > > > > > > The reason i'm asking this is because before switching i got blank (no > > > content) responses from the application's endpoints. HTTP status code was > > > 200 but there was no content returned. At the same time the following > > > warning appeared in the logs. > > > > > > 12:21:55,085 WARN [org.keycloak.adapters.RequestAuthenticator] > > > (http-/192.168.1.39:8080-4) SSL is required to authenticate > > > > In that case I'm probably mistaken and the Keycloak adapter actually > > checks that the request uses SSL when there's a token in it. That would > > make sense to me that it does, but I wasn't aware that it did ;) > > > > > > > > > > > On Wed, Jun 10, 2015 at 10:14 AM, Stian Thorgersen > > wrote: > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Orestis Tsakiridis" > > > > > To: keycloak-user at lists.jboss.org > > > > > Sent: Wednesday, 10 June, 2015 8:57:01 AM > > > > > Subject: [keycloak-user] Mixing https/http schemes with sslRequired > > == > > > > all > > > > > > > > > > Hello, > > > > > > > > > > Can keycloak operate on HTTPS while the REST application it protects > > > > runs on > > > > > HTTP? > > > > > > > > > > I've also set "Require SSL" to "all requests" > > > > > > > > Keycloak only deals with request made to the Keycloak Server and > > doesn't > > > > put any restriction on the request to your rest endpoints. However, as > > you > > > > are passing the token in requests to your rest endpoints it wouldn't > > be the > > > > best idea to not use ssl. Although the risk can be mitigated slightly > > by > > > > having short lifespan on access tokens. > > > > > > > > > > > > > > > > > > > Regards > > > > > > > > > > Orestis > > > > > > > > > > _______________________________________________ > > > > > keycloak-user mailing list > > > > > keycloak-user at lists.jboss.org > > > > > https://lists.jboss.org/mailman/listinfo/keycloak-user > > > > > > > > > > From pubudupg at gmail.com Thu Jun 11 02:10:04 2015 From: pubudupg at gmail.com (pubudu gunawardena) Date: Thu, 11 Jun 2015 11:40:04 +0530 Subject: [keycloak-user] Client Configuration - SAML Direct Grants Message-ID: Hi All, In the client configuration, there is a toggle option "Direct Grants Only". From the documentation at http://docs.jboss.org/keycloak/docs/1.2.0.CR1/userguide/html/direct-access-grants.html, it seemed to me that direct grants are only applicable to openid connect clients. But after turning that option on, I can still select SAML under "Client Protocol". Is it possible to get direct grants using SAML client protocol? Or have I misunderstood the settings in some way? -- Thanks, Pubudu From mposolda at redhat.com Thu Jun 11 04:47:57 2015 From: mposolda at redhat.com (Marek Posolda) Date: Thu, 11 Jun 2015 10:47:57 +0200 Subject: [keycloak-user] Keycloak Oracle WebLogic Adapter In-Reply-To: <5579477A.20809@redhat.com> References: <5579477A.20809@redhat.com> Message-ID: <55794B3D.5070807@redhat.com> CCing keycloak-user mailing list (Please write rather to this ML instead of personally). We don't have Oracle WebLogic adapter and I am not sure if there is plan to have one. Maybe it's possible to use jaspic ( https://jaspic-spec.java.net/ ) and write some generic jaspic adapter, which can be reused for more servers (Weblogic, Websphere, Glassfish, ...), but I am not sure. If you want to investigate and contribute the adapter, it will be great. I would suggest to look at source code of existing adapters as you're already doing and inspire here. Cheers, Marek On 11.6.2015 00:30, Monis Khan wrote: > > Good afternoon Bill and Marek, > > Recently we (Quintiles) have been evaluating Keycloak as a SSO > solution for various web apps. Keycloak?s large feature set is > impressive and meets our requirements. > > However, our apps are deployed on Oracle WebLogic servers, and thus we > require an adapter to interface with Keycloak. Are there any current > or future plans to write such an adapter? If there are not any plans > to develop such an adapter, could you point me to some documentation > or source code that would help me write one myself? I have begun to > review Keycloak?s Tomcat and Jetty adapter source code to get an idea > of what is required. > > Any help that you can provide is greatly appreciated. > > Kind regards, > > Monis Khan > > ********************** IMPORTANT--PLEASE READ ************************ > This electronic message, including its attachments, is COMPANY > CONFIDENTIAL and may contain PROPRIETARY or LEGALLY PRIVILEGED > information. If you are not the intended recipient, you are hereby > notified that any use, disclosure, copying, or distribution of this > message or any of the information included in it is unauthorized and > strictly prohibited. If you have received this message in error, > please immediately notify the sender by reply e-mail and permanently > delete this message and its attachments, along with any copies > thereof. Thank you. > ************************************************************************ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150611/56ab8975/attachment.html From tair.sabirgaliev at bee.kz Thu Jun 11 10:41:23 2015 From: tair.sabirgaliev at bee.kz (Tair Sabirgaliev) Date: Thu, 11 Jun 2015 20:41:23 +0600 Subject: [keycloak-user] Load bearer-only app resource to iframe Message-ID: Hi! I have a REST resource /rest/some/pdf in bearer-only application. The client app uses angular, I have setup it according to keycloak demos. On my angular page i have an