From uo67113 at gmail.com Tue Jan 1 06:42:56 2019 From: uo67113 at gmail.com (=?UTF-8?Q?Luis_Rodr=C3=ADguez_Fern=C3=A1ndez?=) Date: Tue, 1 Jan 2019 12:42:56 +0100 Subject: [keycloak-user] SSL connection to Keycloak Server In-Reply-To: References: Message-ID: Hello Kunal, Both sides, keycloak server and application need SSL. The SSL configuration depends on your setup. May I ask you to provide more details about it? Cheers, Luis El jue., 27 dic. 2018 a las 12:25, Kunal Kumar () escribi?: > Hi guys, > > I have 5 web apps that use Keycloak for authentication. But none of them > are using SSL yet. How is the practice done? Do i need to set SSL on the > Keycloak server for the Keycloak authentication page to have the secured > lock symbol? Or is setting SSL to my web apps enough? > I am not very clear about Keycloak and its SSL implementation, I hope > someone can help explain to me. > > Regards, > Kunal > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user > -- "Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better." - Samuel Beckett From david_christian.herrmann at daimler.com Wed Jan 2 04:25:24 2019 From: david_christian.herrmann at daimler.com (david_christian.herrmann at daimler.com) Date: Wed, 02 Jan 2019 09:25:24 +0000 Subject: [keycloak-user] Cross Realm authorization In-Reply-To: <1545908863.4245.1.camel@acutus.pro> References: <1545019731.12250.12.camel@acutus.pro> <26fbf1d833364509a912caf8aa5a2e04@DE36S004EXC0R.wp.corpintra.net> <18fdc6499b1140678e5ef2a73aa2338d@DE36S004EXC0R.wp.corpintra.net> <1545095418.13723.1.camel@acutus.pro> <60c6b91504684c73920c4432b85a1af7@DE36S004EXC0R.wp.corpintra.net> <7e3e119126e5493a93cb57cd51902e3d@DE36S004EXC0R.wp.corpintra.net> <1545908863.4245.1.camel@acutus.pro> Message-ID: Hi Dmitry, I set the realm in session to the issuer in the access token and then it works. Thanks! Hope you had a pleasant Christmas and a good start in the new year. : ) Mit freundlichen Gr??en / With kind regards David Herrmann RD/UIA Team Rising Stars Daimler AG HPC G464 70546 Stuttgart Mobil: +49 176 309 369 87 What3Words Address: entfalten.j?ngste.nehmen choppy.impact.moisture E-Mail: david_christian.herrmann at daimler.com Daimler AG Sitz und Registergericht / Domicile and Court of Registry: Stuttgart; HRB-Nr. / Commercial Register No. 19360 Vorsitzender des Aufsichtsrats / Chairman of the Supervisory Board: Manfred Bischoff Vorstand / Board of Management: Dieter Zetsche (Vorsitzender / Chairman), Wolfgang Bernhard, Renata Jungo Br?ngger, Ola K?llenius, Wilfried Porth, Britta Seeger, Hubertus Troska, Bodo Uebber -----Urspr?ngliche Nachricht----- Von: Dmitry Telegin [mailto:dt at acutus.pro] Gesendet: Donnerstag, 27. Dezember 2018 12:08 An: Herrmann, David Christian (059) ; keycloak-user at lists.jboss.org Cc: fabian.loewner at freiheit.com; Scheuermann, Marco (059) Betreff: Re: AW: [keycloak-user] Cross Realm authorization Hello David, Thanks a lot for your extensive research! Indeed, in recent Keycloak the internal authentication logic has changed. Particularly, session.context.realm has to be set to user's realm in order for authentication to succeed. As a consequence, custom REST resources can no longer rely on session.getContext().getRealm() for realm resolution. I've updated BeerCloak in GitHub, so please test it and let me know of the results. As the next major update (hopefully January) I'm planning to make the code more aligned to what we have in Keycloak (particularly org.keycloak.services.resources.admin.AdminRoot) and maybe implement fine-grained permissions. Merry Christmas and a Happy New Year to you and all the Keycloakers :) Dmitry Telegin CTO, Acutus s.r.o. Keycloak Consulting and Training Pod lipami street 339/52, 130 00 Prague 3, Czech Republic +42 (022) 888-30-71 E-mail: info at acutus.pro On Wed, 2018-12-19 at 10:57 +0000, david_christian.herrmann at daimler.com wrote: > Hi Dmitry, > > I setup remote debugging for Keycloak and had a look what happens in Keycloak 4.8.0 Final. > > authenticateBearerToken(session, realm) (or to be more precise verifyIdentiyToken( ....)) returns null in my testing because: > > - at > https://github.com/keycloak/keycloak/blob/master/services/src/main/jav > a/org/keycloak/services/managers/AuthenticationManager.java :1153 > there is an exception in verifier(kid) > > - this happens because in > https://github.com/keycloak/keycloak/blob/master/services/src/main/jav > a/org/keycloak/keys/DefaultKeyManager.java :106 the first part of the > if-statement in method getKey(RealmModel realm, String kid, KeyUse > use, String algorithm) does not become true > > - I think this happens because here getKey(...) is called with session.getContext().getRealm() --> The realm from the session --> The realm where the requested resource is. But kid is taken from token which is created for the realm where the technical user is. > - Call to getKey() is in > https://github.com/keycloak/keycloak/blob/master/services/src/main/jav > a/org/keycloak/crypto/ServerAsymmetricSignatureVerifierContext.java > :29 > - kid is taken in > https://github.com/keycloak/keycloak/blob/master/services/src/main/jav > a/org/keycloak/services/managers/AuthenticationManager.java :1145-1150 > > I hope this information is useful for you. > > Mit freundlichen Gr??en / With kind regards David HerrmannRD/UIA Team > Rising Stars Daimler AG HPC G464 > 70546 Stuttgart > Mobil: +49 176 309 369 87 > > What3Words Address: > entfalten.j?ngste.nehmen > choppy.impact.moistureE-Mail: david_christian.herrmann at daimler.com > > > Daimler AG > Sitz und Registergericht / Domicile and Court of Registry: Stuttgart; > HRB-Nr. / Commercial Register No. 19360 Vorsitzender des Aufsichtsrats > / Chairman of the Supervisory Board: Manfred Bischoff Vorstand / Board > of Management: Dieter Zetsche (Vorsitzender / Chairman), Wolfgang > Bernhard, Renata Jungo Br?ngger, Ola K?llenius, Wilfried Porth, Britta > Seeger, Hubertus Troska, Bodo Uebber > > > -----Urspr?ngliche Nachricht----- > > Von: keycloak-user-bounces at lists.jboss.org > > [mailto:keycloak-user-bounces at lists.jboss.org] Im Auftrag von > > david_christian.herrmann at daimler.com > Gesendet: Mittwoch, 19. Dezember 2018 08:24 > > An: dt at acutus.pro; keycloak-user at lists.jboss.org > Betreff: Re: [keycloak-user] Cross Realm authorization > > Hi Dmitry, > > in the meanwhile I tested with Keycloak 3.4.3 Final. Here I do not have the problem with the unauthorized. > > Mit freundlichen Gr??en / With kind regards > > David Herrmann > RD/UIA > Team Rising Stars > > > Daimler AG > HPC G464 > 70546 Stuttgart > Mobil: +49 176 309 369 87 > > What3Words Address: > entfalten.j?ngste.nehmen > choppy.impact.moisture > E-Mail: david_christian.herrmann at daimler.com > > > Daimler AG > Sitz und Registergericht / Domicile and Court of Registry: Stuttgart; > HRB-Nr. / Commercial Register No. 19360 Vorsitzender des Aufsichtsrats > / Chairman of the Supervisory Board: Manfred Bischoff Vorstand / Board > of Management: Dieter Zetsche (Vorsitzender / Chairman), Wolfgang > Bernhard, Renata Jungo Br?ngger, Ola K?llenius, Wilfried Porth, Britta > Seeger, Hubertus Troska, Bodo Uebber > > -----Urspr?ngliche Nachricht----- > Von: Herrmann, David Christian (059) > Gesendet: Dienstag, 18. Dezember 2018 09:24 > > An: 'Dmitry Telegin'
; keycloak-user at lists.jboss.org > Betreff: AW: AW: [keycloak-user] Cross Realm authorization > > Hi Dmitry, > > I used Keycloak 4.5.0.Final to test the implementation. > > Mit freundlichen Gr??en / With kind regards > > David Herrmann > RD/UIA > Team Rising Stars > > > Daimler AG > HPC G464 > 70546 Stuttgart > Mobil: +49 176 309 369 87 > > What3Words Address: > entfalten.j?ngste.nehmen > choppy.impact.moisture > E-Mail: david_christian.herrmann at daimler.com > > > Daimler AG > Sitz und Registergericht / Domicile and Court of Registry: Stuttgart; > HRB-Nr. / Commercial Register No. 19360 Vorsitzender des Aufsichtsrats > / Chairman of the Supervisory Board: Manfred Bischoff Vorstand / Board > of Management: Dieter Zetsche (Vorsitzender / Chairman), Wolfgang > Bernhard, Renata Jungo Br?ngger, Ola K?llenius, Wilfried Porth, Britta > Seeger, Hubertus Troska, Bodo Uebber > > > -----Urspr?ngliche Nachricht----- > > Von: Dmitry Telegin [mailto:dt at acutus.pro] > Gesendet: Dienstag, 18. Dezember 2018 02:10 > An: Herrmann, David Christian (059) > ; keycloak-user at lists.jboss.org > Betreff: Re: AW: [keycloak-user] Cross Realm authorization > > David, > > Which version of Keycloak are you using? > > The authorization subsystem undergoes changes from release to release, so I'm going to double check the BeerCloak works with the recent Keycloak versions and update it if necessary. > > Cheers, > Dmitry > > On Mon, 2018-12-17 at 13:09 +0000, david_christian.herrmann at daimler.com wrote: > > Hi Dmitry, > > > > I implemented it based on beercloak. > > > > Here in AbstractAdminRessource.java: > > AuthenticationManager.AuthResult authResult = > > authManager.authenticateBearerToken(session, realm); > > > > if (authResult == null) { > > throw new NotAuthorizedException("Bearer"); } > > > > Still results in Unauthorized. > > > > I tried it with an user in master realm, that has "view-users" for the user realm and an admin user from the master realm. Both resulted in an 401 at the mentioned code point. > > > > The realm is set to master realm and the session seems to be injected ... Any ideas? > > > > Mit freundlichen Gr??en / With kind regards > > > > David Herrmann > > RD/UIA > > Team Rising Stars > > > > > > Daimler AG > > HPC G464 > > 70546 Stuttgart > > Mobil: +49 176 309 369 87 > > > > What3Words Address: > > entfalten.j?ngste.nehmen > > choppy.impact.moisture > > E-Mail: david_christian.herrmann at daimler.com > > > > > > Daimler AG > > Sitz und Registergericht / Domicile and Court of Registry: > > Stuttgart; HRB-Nr. / Commercial Register No. 19360 Vorsitzender des > > Aufsichtsrats / Chairman of the Supervisory Board: Manfred Bischoff > > Vorstand / Board of Management: Dieter Zetsche (Vorsitzender / > > Chairman), Wolfgang Bernhard, Renata Jungo Br?ngger, Ola K?llenius, > > Wilfried Porth, Britta Seeger, Hubertus Troska, Bodo Uebber > > > > > > -----Urspr?ngliche Nachricht----- > > > Von: keycloak-user-bounces at lists.jboss.org > > > > [mailto:keycloak-user-bounces at lists.jboss.org] Im Auftrag von > > > david_christian.herrmann at daimler.com > > Gesendet: Montag, 17. Dezember 2018 08:29 > > > > An: dt at acutus.pro; keycloak-user at lists.jboss.org > > Betreff: Re: [keycloak-user] Cross Realm authorization > > > > Hi Dmitry, > > > > thanks for your answer and the link to your project! I will try this out. > > > > Mit freundlichen Gr??en / With kind regards > > > > David Herrmann > > RD/UIA > > Team Rising Stars > > > > > > Daimler AG > > HPC G464 > > 70546 Stuttgart > > Mobil: +49 176 309 369 87 > > > > What3Words Address: > > entfalten.j?ngste.nehmen > > choppy.impact.moisture > > E-Mail: david_christian.herrmann at daimler.com > > > > > > Daimler AG > > Sitz und Registergericht / Domicile and Court of Registry: > > Stuttgart; HRB-Nr. / Commercial Register No. 19360 Vorsitzender des > > Aufsichtsrats / Chairman of the Supervisory Board: Manfred Bischoff > > Vorstand / Board of Management: Dieter Zetsche (Vorsitzender / > > Chairman), Wolfgang Bernhard, Renata Jungo Br?ngger, Ola K?llenius, > > Wilfried Porth, Britta Seeger, Hubertus Troska, Bodo Uebber > > > > > > -----Urspr?ngliche Nachricht----- > > > > Von: Dmitry Telegin [mailto:dt at acutus.pro] > > Gesendet: Montag, 17. Dezember 2018 05:09 > > An: Herrmann, David Christian (059) > > > ; > > > keycloak-user at lists.jboss.org > > Betreff: Re: [keycloak-user] Cross Realm authorization > > > > Hello David, > > > > Please take a look at how it is done in BeerCloak: > > https://github.com/dteleguin/beercloak/tree/master/beercloak-module/ > > sr > > c/main/java/beercloak/resources > > > > All the heavy lifting is done in AbstractAdminResource, and you can use it in your project verbatim (you should only provide your own AdminAuth implementation). The whole purpose of this is to allow master realm users to administer objects in non-master realms. > > > > (Some musings: I dream of having AdminRealmResourceProvider with all > > that stuff OOTB; the idea has been around for years, but I'm afraid > > we won't have it in Keycloak anytime soon. Luckily, this can be done > > at a low price of introducing some boilerplate code into your > > project.) > > > > Good luck, > > Dmitry Telegin > > CTO, Acutus s.r.o. > > Keycloak Consulting and Training > > > > Pod lipami street 339/52, 130 00 Prague 3, Czech Republic > > +42 (022) 888-30-71 > > E-mail: info at acutus.pro > > > > On Fri, 2018-12-14 at 07:32 +0000, david_christian.herrmann at daimler.com wrote: > > > Hello, > > > > > > we implemented a custom REST endpoint using RealmResourceProvider to search for users by their attributes. We then secured the endpoint by using: > > > > > > AuthenticationManager.AuthResult authResult = > > > authManager.authenticateBearerToken(session); > > > > > > if (authResult == null) { > > > throw new NotAuthorizedException("Bearer token required"); } > > > > > > And > > > > > > > > > if(!auth.hasClientRole(client,"view-users")){ > > > throw new NotAuthorizedException("Necessary permission not > > >available"); } > > > > > > We now have the problem, that we want to access the endpoint with technical users which are in the master realm to separate them from the real end-users. > > > > > > So the technical users get their access token from the master realm (which contains the necessary resource permissions for the user realm) and then access the endpoint in the user realm. > > > > > > Here > > > > > > AuthenticationManager.AuthResult authResult = > > > authManager.authenticateBearerToken(session); > > > > > > if (authResult == null) { > > > throw new NotAuthorizedException("Bearer token required"); } > > > > > > Always results in unauthorized. > > > > > > Looking at the code and testing I think with authenticateBearerToken() cross realm authentication is not possible. Correct? Do you have a suggestion how to achieve our goal? > > > > > > Mit freundlichen Gr??en / With kind regards > > > > > > > > > > > > David Herrmann > > > > > > RD/UIA > > > Team Rising Stars > > > [Computergenerierter Alternativtext: RDIU] > > > > > > Daimler AG > > > HPC G464 > > > 70546 Stuttgart > > > Mobil: +49 176 309 369 87 > > > > > > What3Words Address: > > > ellbogen.spr?che.anf?nge > > > > > > > E-Mail: > > > > > david_christian.herrmann at daimler.com > > > > rrma > > > > nn > > > > @daimler.com> > > > > > > > > > Daimler AG > > > Sitz und Registergericht / Domicile and Court of Registry: > > > Stuttgart; HRB-Nr. / Commercial Register No. 19360 Vorsitzender > > > des Aufsichtsrats / Chairman of the Supervisory Board: Manfred > > > Bischoff Vorstand / Board of Management: Dieter Zetsche > > > (Vorsitzender / Chairman), Wolfgang Bernhard, Renata Jungo > > > Br?ngger, Ola K?llenius, Wilfried Porth, Britta Seeger, Hubertus > > > Troska, Bodo Uebber > > > > > > > > > If you are not the addressee, please inform us immediately that you have received this e-mail by mistake, and delete it. We thank you for your support. > > > > > > _______________________________________________ > > > keycloak-user mailing list > > > keycloak-user at lists.jboss.org > > > https://lists.jboss.org/mailman/listinfo/keycloak-user > > > > If you are not the addressee, please inform us immediately that you have received this e-mail by mistake, and delete it. We thank you for your support. > > > > > > _______________________________________________ > > keycloak-user mailing list > > keycloak-user at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/keycloak-user > > > > If you are not the addressee, please inform us immediately that you have received this e-mail by mistake, and delete it. We thank you for your support. > > > > If you are not the addressee, please inform us immediately that you have received this e-mail by mistake, and delete it. We thank you for your support. > > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user > > > > If you are not the addressee, please inform us immediately that you have received this e-mail by mistake, and delete it. We thank you for your support. > If you are not the addressee, please inform us immediately that you have received this e-mail by mistake, and delete it. We thank you for your support. From sthorger at redhat.com Wed Jan 2 05:13:25 2019 From: sthorger at redhat.com (Stian Thorgersen) Date: Wed, 2 Jan 2019 11:13:25 +0100 Subject: [keycloak-user] Keycloak 4.8.0.Final released In-Reply-To: References: Message-ID: In the past we didn't disable preview features (or make it obvious that they where preview) in the Keycloak releases. In RH-SSO releases we did make all these preview. To make it consistent and also to better communicate with the community what may not be fully production ready we decided to make it consistent. Preview doesn't mean it is buggy, but rather that the feature may be incomplete and may be drastically changed in the future (even completely removed) and that there are no guarantees for a seamless upgrade between releases if you use tech preview features. On Mon, 17 Dec 2018 at 13:21, Geoffrey Cleaves wrote: > Thanks for the update. I see more and more features being labeled as tech > preview and disabled by default. I guess that this means the features have > bugs or negatively impact performance? Any further insight would be > appreciated. > > On Mon, 17 Dec 2018 at 12:59, Stian Thorgersen > wrote: > >> To download the release go to the Keycloak homepage >> . >> >> For details on what is included in the release check out the Release notes >> >> >> The full list of resolved issues is available in JIRA >> < >> https://issues.jboss.org/issues/?jql=project%20%3D%20keycloak%20and%20fixVersion%20%3D%204.8.0.Final >> > >> . >> >> Before you upgrade remember to backup your database and check the upgrade >> guide for >> anything that may have changed. >> _______________________________________________ >> keycloak-user mailing list >> keycloak-user at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/keycloak-user >> > > > -- > > Regards, > Geoffrey Cleaves > > > > > > From erlend at hamnaberg.net Wed Jan 2 05:21:01 2019 From: erlend at hamnaberg.net (Erlend Hamnaberg) Date: Wed, 2 Jan 2019 11:21:01 +0100 Subject: [keycloak-user] Keycloak logout API not working properly In-Reply-To: References: Message-ID: You can't revoke access tokens. Make sure they have a sufficiently short timeout. /Erlend On Mon, Dec 24, 2018 at 2:11 PM Shubham Akodiya wrote: > Hi, > > I'm using the log out API( > > https://localhost:8080/auth/realms/my-realm-name/protocol/openid-connect/logout > ) > and sending all the required parameters i.r refresh_token, client_id and > client_secret. The API working properly but the user can still able to use > the access_token to access the APIs. How to revoke that access_token? > > Thanks, > Shubham Akodiya > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user > From francois.gourrier at libre-logic.fr Wed Jan 2 05:57:47 2019 From: francois.gourrier at libre-logic.fr (=?utf-8?Q?Fran=C3=A7ois?= Gourrier) Date: Wed, 2 Jan 2019 11:57:47 +0100 (CET) Subject: [keycloak-user] account creation process with email verification : problem or normal behavior ? Message-ID: <945022280.45531.1546426667402.JavaMail.zimbra@librelogic.fr> hello to everyone and very happy new year, I am faced with the following problem: I want to enable email verification when creating an account I ticked the "default action" box for "Verify Email" in "authentication". the observed behavior is as follows: - when a user creates an account via a public form, he receives an email with a link with the following structure: HOST /realms/connect/login-actions/action-token? = XXXXXXclient_id = XXXX XXXX = & tab_id - when he clicks on the link, it is sent back to his account (HOST / realms / connect / account /) and is therefore connected That's not at all the behavior I was expecting Another scenario: - when a user creates an account, he receives an email with a link with the following structure: HOST /realms/connect/login-actions/action-token?Key = XXXXXXclient_id = XXXX XXXX = & tab_id - when he takes this link and the copy in another browser than the one used to create the account, it is sent to a page with the message "Confirm the validity of the email address XXXX" with a button "Click here" - if the user clicks on the button, the account is created and he has to authenticate to connect This second scenario is the one expected. Have I forgotten something in understanding the features? Obviously, a cookie is created and associated with the account during its creation which explains that it is already identified when it is returned to its account Thank you in advance for your lights. I'am using Keyclaok 4.5.0 FGOURRIER From psilva at redhat.com Wed Jan 2 08:22:07 2019 From: psilva at redhat.com (Pedro Igor Silva) Date: Wed, 2 Jan 2019 11:22:07 -0200 Subject: [keycloak-user] Incorrect UMA Policy Evaluation In-Reply-To: <360F7E39-62E0-429B-A19A-A9432E69A274@sap.com> References: <29412C74-5B6C-46B4-9E5F-220653EBFB2E@sap.com> <13D64F2F-4665-41ED-92DA-A744FBB4C8A8@sap.com> <360F7E39-62E0-429B-A19A-A9432E69A274@sap.com> Message-ID: Hi Marco, For user-managed resources and permissions, we are currently returning any permission granted regardless the scopes being requested. What is causing this unexpected response when using the "decision" permission mode. To align the behaviour when not using UMA resources/permissions I've changed the policy engine to only return the requested scopes, as you pointed out. Regarding docs, created https://issues.jboss.org/browse/KEYCLOAK-9186. Regards. Pedro Igor On Thu, Dec 13, 2018 at 5:20 PM Lamina, Marco wrote: > I?ve used regular policies / permissions at first, but found that the way > they are evaluated showed inconsistencies. Unfortunately, neither the > documentation nor the community were able to give an explanation as to how > the policy evaluation actually works. I switched to using only UMA > policies, hoping that this would simplify things. This approach seemed to > work fine at first, but the results are just as confusing and unpredictable > as everything I?ve tried before. > > The documentation does a good job at explaining how to use Keycloak?s > authorization services, but the evaluation engine seems to be a magic black > box. It would be great to have a piece of documentation that explains in > more detail how the evaluation results I see can be traced back to the > permissions that I create in Keycloak. > > > From: Geoffrey Cleaves > Date: Thursday, December 13, 2018 at 10:29 AM > To: "Lamina, Marco" > Cc: keycloak-user > Subject: Re: [keycloak-user] Incorrect UMA Policy Evaluation > > Perhaps it's a bug introduced in the release that came out a few days ago. > Not that many people use it, and I get the impression that not many people > use Uma policy evaluation. > > On Thu, Dec 13, 2018, 18:36 Lamina, Marco marco.lamina at sap.com> wrote: > Just to be 100% certain, I created a test resource with its own resource > type and tried again. It shows the same behavior. Keycloak?s policy > enforcement mode is set to ?enforcing?. > I will create a ticket. However, if it ends up being a bug, wouldn?t that > be a fairly substantial flaw in the policy evaluation engine that should be > causing problems all over the place in Keycloak systems out there? I?m a > bit puzzled. > > > From: Geoffrey Cleaves > > Date: Wednesday, December 12, 2018 at 11:32 PM > To: "Lamina, Marco" > > Cc: keycloak-user keycloak-user at lists.jboss.org>> > Subject: Re: [keycloak-user] Incorrect UMA Policy Evaluation > > Also, if you have a resource level permission which grants access, I think > that includes all scopes, so look into that. > > On Thu, Dec 13, 2018, 08:29 Geoffrey Cleaves geoff at opticks.io> wrote: > From your description it sounds like a bug. I believe there's a setting > where you instruct KC to enforce permissions or not and if you don't select > enforce, the default is to grant permission. Make sure you've got the > correct. > > You'll need to open a bug report on Jira with clear steps to reproduce the > problem. > > On Thu, Dec 13, 2018, 01:26 Lamina, Marco marco.lamina at sap.com> wrote: > Hi, > I?m using the protection API to manage UMA policies for my Keycloak > resources. However, I get false-positive results when requesting > permissions for a resource via the token endpoint. > > Example: > I have a resource with ID ?dataset-42? and two scopes ?view? and ?delete?. > I create a UMA policy granting my user ?view? access to this resource. If I > now call the token endpoint (as suggested in [1]) to obtain permissions for > the ?delete? scope by setting: > > response_mode=permissions > permission=dataset-42#delete > > , I get the following (confusing) result: > > [{ > "scopes": ["view"], > "rsid": "dataset-42", > "rsname": "urn:atlas-api:resources:dataset:42" > }] > > When setting ?response_mode=decision?, I get: > > { > "result": true > } > > There is no policy that gives my user access to the ?delete? scope > anywhere, so shouldn?t I get a negative result here? > > Links: > [1] > https://www.keycloak.org/docs/latest/authorization_services/index.html#_service_obtaining_permissions > > Thanks, > Marco > > _______________________________________________ > 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 From bruno at abstractj.org Wed Jan 2 08:34:07 2019 From: bruno at abstractj.org (Bruno Oliveira) Date: Wed, 2 Jan 2019 11:34:07 -0200 Subject: [keycloak-user] kcinit status In-Reply-To: <1A3C52DFCD06494D8528644858247BF01C26A178@EX10MBOX03.pnnl.gov> References: <1A3C52DFCD06494D8528644858247BF01C26A178@EX10MBOX03.pnnl.gov> Message-ID: <20190102133407.GA22163@abstractj.org> Hi Kevin, did you file Jiras for the bugs you mentioned? If not please do, and also make sure to add all the details needed to reproduce the issue. On 2018-12-21, Fox, Kevin M wrote: > Not much has happened with kcinit in a long time and it has a few outstanding bugs in the way of working for us. What is the status of the project? > > Thanks, > Kevin > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user -- abstractj From sthorger at redhat.com Wed Jan 2 09:18:26 2019 From: sthorger at redhat.com (Stian Thorgersen) Date: Wed, 2 Jan 2019 15:18:26 +0100 Subject: [keycloak-user] kcinit status In-Reply-To: <20190102133407.GA22163@abstractj.org> References: <1A3C52DFCD06494D8528644858247BF01C26A178@EX10MBOX03.pnnl.gov> <20190102133407.GA22163@abstractj.org> Message-ID: kcinit is in a prototype stage and is not released or documented as it's not ready for use. From our priorities lists it's doubtful that much will happen with this tool this year. On Wed, 2 Jan 2019 at 14:41, Bruno Oliveira wrote: > Hi Kevin, did you file Jiras for the bugs you mentioned? If not please > do, and also make sure to add all the details needed to reproduce the > issue. > > > On 2018-12-21, Fox, Kevin M wrote: > > Not much has happened with kcinit in a long time and it has a few > outstanding bugs in the way of working for us. What is the status of the > project? > > > > Thanks, > > Kevin > > _______________________________________________ > > keycloak-user mailing list > > keycloak-user at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/keycloak-user > > -- > > abstractj > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user > From Kevin.Fox at pnnl.gov Wed Jan 2 12:19:00 2019 From: Kevin.Fox at pnnl.gov (Fox, Kevin M) Date: Wed, 2 Jan 2019 17:19:00 +0000 Subject: [keycloak-user] kcinit status In-Reply-To: References: <1A3C52DFCD06494D8528644858247BF01C26A178@EX10MBOX03.pnnl.gov> <20190102133407.GA22163@abstractj.org>, Message-ID: <1A3C52DFCD06494D8528644858247BF01C26EB64@EX10MBOX03.pnnl.gov> Yes I filed jira tickets. they have been sitting around for a while. kcinit does seem quite important if you want to use keycloak for kubernetes authentication and want to support the command line. It is troubling to hear it is not going to be a focus for a year. Maybe its because openshift would use it in a slightly different way then vanilla k8s would. But since keycloak is trying to become part of the cncf, that would be an important thing to support I think. I am trying to use keycloak with a vanilla kubernetes and support both the cli and the web ui securely. I might be willing to contribute to it too if that would help move things along. Its been unclear though that such contributions would be welcome? Thanks, Kevin ________________________________ From: Stian Thorgersen [sthorger at redhat.com] Sent: Wednesday, January 02, 2019 6:18 AM To: Bruno Oliveira Cc: Fox, Kevin M; keycloak-user at lists.jboss.org Subject: Re: [keycloak-user] kcinit status kcinit is in a prototype stage and is not released or documented as it's not ready for use. From our priorities lists it's doubtful that much will happen with this tool this year. On Wed, 2 Jan 2019 at 14:41, Bruno Oliveira > wrote: Hi Kevin, did you file Jiras for the bugs you mentioned? If not please do, and also make sure to add all the details needed to reproduce the issue. On 2018-12-21, Fox, Kevin M wrote: > Not much has happened with kcinit in a long time and it has a few outstanding bugs in the way of working for us. What is the status of the project? > > Thanks, > Kevin > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user -- abstractj _______________________________________________ keycloak-user mailing list keycloak-user at lists.jboss.org https://lists.jboss.org/mailman/listinfo/keycloak-user From uabhstest2 at gmail.com Wed Jan 2 12:20:48 2019 From: uabhstest2 at gmail.com (work test) Date: Wed, 2 Jan 2019 11:20:48 -0600 Subject: [keycloak-user] Keycloak with ADFS Message-ID: Hi folks, I set up my keycloak instance with ADFS using the article http://blog.keycloak.org/2017/03/how-to-setup-ms-ad-fs-30-as-brokered.html After configuring my confidential client application using oidc protocol, I get to the login page and login using my ADFS credentials, but after login, I get redirected back to the Keycloak login page and not to my application. I don't see any errors even using the Chrome saml tools. What am I missing? My goal is to have several applications using the single signon realm configured with ADFS and have Keycloak be the broker so that the applications only have to deal with Oauth2 + OIDC and not the saml. Thanks for your help. Hskc From marco.lamina at sap.com Wed Jan 2 15:39:25 2019 From: marco.lamina at sap.com (Lamina, Marco) Date: Wed, 2 Jan 2019 20:39:25 +0000 Subject: [keycloak-user] Incorrect UMA Policy Evaluation In-Reply-To: References: <29412C74-5B6C-46B4-9E5F-220653EBFB2E@sap.com> <13D64F2F-4665-41ED-92DA-A744FBB4C8A8@sap.com> <360F7E39-62E0-429B-A19A-A9432E69A274@sap.com> Message-ID: <6303B0CC-C753-4A82-8C7F-22DEA9E3B50F@sap.com> Awesome, thanks Pedro! From: Pedro Igor Silva Date: Wednesday, January 2, 2019 at 5:23 AM To: "Lamina, Marco" Cc: Geoffrey Cleaves , keycloak-user Subject: Re: [keycloak-user] Incorrect UMA Policy Evaluation Hi Marco, For user-managed resources and permissions, we are currently returning any permission granted regardless the scopes being requested. What is causing this unexpected response when using the "decision" permission mode. To align the behaviour when not using UMA resources/permissions I've changed the policy engine to only return the requested scopes, as you pointed out. Regarding docs, created https://issues.jboss.org/browse/KEYCLOAK-9186. Regards. Pedro Igor On Thu, Dec 13, 2018 at 5:20 PM Lamina, Marco > wrote: I?ve used regular policies / permissions at first, but found that the way they are evaluated showed inconsistencies. Unfortunately, neither the documentation nor the community were able to give an explanation as to how the policy evaluation actually works. I switched to using only UMA policies, hoping that this would simplify things. This approach seemed to work fine at first, but the results are just as confusing and unpredictable as everything I?ve tried before. The documentation does a good job at explaining how to use Keycloak?s authorization services, but the evaluation engine seems to be a magic black box. It would be great to have a piece of documentation that explains in more detail how the evaluation results I see can be traced back to the permissions that I create in Keycloak. From: Geoffrey Cleaves > Date: Thursday, December 13, 2018 at 10:29 AM To: "Lamina, Marco" > Cc: keycloak-user > Subject: Re: [keycloak-user] Incorrect UMA Policy Evaluation Perhaps it's a bug introduced in the release that came out a few days ago. Not that many people use it, and I get the impression that not many people use Uma policy evaluation. On Thu, Dec 13, 2018, 18:36 Lamina, Marco > wrote: Just to be 100% certain, I created a test resource with its own resource type and tried again. It shows the same behavior. Keycloak?s policy enforcement mode is set to ?enforcing?. I will create a ticket. However, if it ends up being a bug, wouldn?t that be a fairly substantial flaw in the policy evaluation engine that should be causing problems all over the place in Keycloak systems out there? I?m a bit puzzled. From: Geoffrey Cleaves >> Date: Wednesday, December 12, 2018 at 11:32 PM To: "Lamina, Marco" >> Cc: keycloak-user >> Subject: Re: [keycloak-user] Incorrect UMA Policy Evaluation Also, if you have a resource level permission which grants access, I think that includes all scopes, so look into that. On Thu, Dec 13, 2018, 08:29 Geoffrey Cleaves > wrote: From your description it sounds like a bug. I believe there's a setting where you instruct KC to enforce permissions or not and if you don't select enforce, the default is to grant permission. Make sure you've got the correct. You'll need to open a bug report on Jira with clear steps to reproduce the problem. On Thu, Dec 13, 2018, 01:26 Lamina, Marco > wrote: Hi, I?m using the protection API to manage UMA policies for my Keycloak resources. However, I get false-positive results when requesting permissions for a resource via the token endpoint. Example: I have a resource with ID ?dataset-42? and two scopes ?view? and ?delete?. I create a UMA policy granting my user ?view? access to this resource. If I now call the token endpoint (as suggested in [1]) to obtain permissions for the ?delete? scope by setting: response_mode=permissions permission=dataset-42#delete , I get the following (confusing) result: [{ "scopes": ["view"], "rsid": "dataset-42", "rsname": "urn:atlas-api:resources:dataset:42" }] When setting ?response_mode=decision?, I get: { "result": true } There is no policy that gives my user access to the ?delete? scope anywhere, so shouldn?t I get a negative result here? Links: [1] https://www.keycloak.org/docs/latest/authorization_services/index.html#_service_obtaining_permissions Thanks, Marco _______________________________________________ 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 From ntle at castortech.com Wed Jan 2 16:05:08 2019 From: ntle at castortech.com (Nhut Thai Le) Date: Wed, 2 Jan 2019 16:05:08 -0500 Subject: [keycloak-user] Keycloak Admin Client: Unrecognized field "access_token" Message-ID: Hello, I'm using keycloak admin-client 4.6.0.Final to manage keycloak server. I'm getting this error when trying to remove a session: javax.ws.rs.client.ResponseProcessingException: javax.ws.rs.ProcessingException: java.io.IOException: java.security.PrivilegedActionException: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "access_token" (class org.keycloak.representations.AccessTokenResponse), not marked as ignorable (10 known properties: "tokenType", "notBeforePolicy", "otherClaims", "token", "sessionState", "refreshExpiresIn", "scope", "expiresIn", "refreshToken", "idToken"]) at [Source: (org.jboss.resteasy.client.jaxrs.internal.ClientResponse$InputStreamWrapper); line: 1, column: 18] (through reference chain: org.keycloak.representations.AccessTokenResponse["access_token"]) Here is my code (similar to https://github.com/keycloak/keycloak/blob/master/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/AdminClientUtil.java ) SSLContext ssl = null; File trustore = new File("pathToKS.keystore"); ssl = getSSLContextWithTrustore(trustore, "ksPassword"); System.setProperty("javax.net.ssl.trustStore", trustore.getAbsolutePath()); ResteasyJackson2Provider jacksonProvider = null; jacksonProvider = new ResteasyJackson2Provider() {}; ObjectMapper objectMapper = new ObjectMapper(); jacksonProvider.setMapper(objectMapper); Keycloak connection = Keycloak.getInstance("https://kc.com:8543/auth", "master", "admin", "admin", "admin-cli", null, ssl, jacksonProvider); RealmResource realm = connection.realm(realmName); realm.deleteSession(kcSessionId); I did some search on google and mostly found that the issue is related to resteasy-jackson-provider being used instead of resteasy-jackson2-provider but as you can see from my code, i'm already using resteasy-jackson2-provider so i'm not sure what else could cause this. Here is the full stacktrace: javax.ws.rs.WebApplicationException: Cannot logout user wuth session cede2747-424c-405f-a4a2-c4d804ef5883 at com.castortech.util.keycloak.KeycloakAdminBroker.lambda$129(KeycloakAdminBroker.java:3729) at com.castortech.util.keycloak.KeycloakAdminBroker.ensureCL(KeycloakAdminBroker.java:3136) at com.castortech.util.keycloak.KeycloakAdminBroker.logout(KeycloakAdminBroker.java:3732) at com.castortech.iris.ba.webviewer.richlet.AppRichletHelper.service(AppRichletHelper.java:137) at com.castortech.iris.ba.webviewer.richlet.AppRichlet.service(AppRichlet.java:13) at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:514) at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:365) at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:205) at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:140) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at com.castortech.iris.ba.webviewer.internal.ZkLayoutServlet.lambda$1(ZkLayoutServlet.java:59) at com.castortech.util.threading.ThreadingUtils.runWithContextClassLoader(ThreadingUtils.java:72) at com.castortech.iris.ba.webviewer.internal.ZkLayoutServlet.service(ZkLayoutServlet.java:58) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:857) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1655) at com.castortech.iris.ba.webviewer.servletfilter.HeadersFilter.doFilter(HeadersFilter.java:67) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642) at com.castortech.iris.ba.web.filters.KeycloakSessionFilter.doFilter(KeycloakSessionFilter.java:78) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642) at org.keycloak.adapters.servlet.KeycloakOIDCFilter.doFilter(KeycloakOIDCFilter.java:206) at com.castortech.iris.ba.web.filters.AuthenticationFilterForWebViewer.doFilter(AuthenticationFilterForWebViewer.java:61) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1340) at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1242) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:503) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:411) at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:305) at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:159) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683) at java.lang.Thread.run(Unknown Source) Caused by: javax.ws.rs.client.ResponseProcessingException: javax.ws.rs.ProcessingException: java.io.IOException: java.security.PrivilegedActionException: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "access_token" (class org.keycloak.representations.AccessTokenResponse), not marked as ignorable (10 known properties: "tokenType", "notBeforePolicy", "otherClaims", "token", "sessionState", "refreshExpiresIn", "scope", "expiresIn", "refreshToken", "idToken"]) at [Source: (org.jboss.resteasy.client.jaxrs.internal.ClientResponse$InputStreamWrapper); line: 1, column: 18] (through reference chain: org.keycloak.representations.AccessTokenResponse["access_token"]) at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.extractResult(ClientInvocation.java:156) at org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.BodyEntityExtractor.extractEntity(BodyEntityExtractor.java:60) at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invokeSync(ClientInvoker.java:150) at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:112) at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(ClientProxy.java:76) at com.sun.proxy.$Proxy46.grantToken(Unknown Source) at org.keycloak.admin.client.token.TokenManager.grantToken(TokenManager.java:89) at org.keycloak.admin.client.token.TokenManager.getAccessToken(TokenManager.java:69) at org.keycloak.admin.client.token.TokenManager.getAccessTokenString(TokenManager.java:64) at org.keycloak.admin.client.resource.BearerAuthFilter.filter(BearerAuthFilter.java:52) at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.filterRequest(ClientInvocation.java:587) at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.invoke(ClientInvocation.java:436) at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invokeSync(ClientInvoker.java:148) at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:112) at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(ClientProxy.java:76) at com.sun.proxy.$Proxy51.deleteSession(Unknown Source) at com.castortech.util.keycloak.KeycloakAdminBroker.lambda$129(KeycloakAdminBroker.java:3724) ... 58 more Caused by: javax.ws.rs.ProcessingException: java.io.IOException: java.security.PrivilegedActionException: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "access_token" (class org.keycloak.representations.AccessTokenResponse), not marked as ignorable (10 known properties: "tokenType", "notBeforePolicy", "otherClaims", "token", "sessionState", "refreshExpiresIn", "scope", "expiresIn", "refreshToken", "idToken"]) at [Source: (org.jboss.resteasy.client.jaxrs.internal.ClientResponse$InputStreamWrapper); line: 1, column: 18] (through reference chain: org.keycloak.representations.AccessTokenResponse["access_token"]) at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:368) at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readEntity(ClientResponse.java:261) at org.jboss.resteasy.specimpl.BuiltResponse.readEntity(BuiltResponse.java:231) at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.extractResult(ClientInvocation.java:120) ... 74 more Caused by: java.io.IOException: java.security.PrivilegedActionException: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "access_token" (class org.keycloak.representations.AccessTokenResponse), not marked as ignorable (10 known properties: "tokenType", "notBeforePolicy", "otherClaims", "token", "sessionState", "refreshExpiresIn", "scope", "expiresIn", "refreshToken", "idToken"]) at [Source: (org.jboss.resteasy.client.jaxrs.internal.ClientResponse$InputStreamWrapper); line: 1, column: 18] (through reference chain: org.keycloak.representations.AccessTokenResponse["access_token"]) at org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider.readFrom(ResteasyJackson2Provider.java:145) at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.readFrom(AbstractReaderInterceptorContext.java:66) at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:56) at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:334) ... 77 more Caused by: java.security.PrivilegedActionException: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "access_token" (class org.keycloak.representations.AccessTokenResponse), not marked as ignorable (10 known properties: "tokenType", "notBeforePolicy", "otherClaims", "token", "sessionState", "refreshExpiresIn", "scope", "expiresIn", "refreshToken", "idToken"]) at [Source: (org.jboss.resteasy.client.jaxrs.internal.ClientResponse$InputStreamWrapper); line: 1, column: 18] (through reference chain: org.keycloak.representations.AccessTokenResponse["access_token"]) at java.security.AccessController.doPrivileged(Native Method) at org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider.readFrom(ResteasyJackson2Provider.java:137) ... 80 more Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "access_token" (class org.keycloak.representations.AccessTokenResponse), not marked as ignorable (10 known properties: "tokenType", "notBeforePolicy", "otherClaims", "token", "sessionState", "refreshExpiresIn", "scope", "expiresIn", "refreshToken", "idToken"]) at [Source: (org.jboss.resteasy.client.jaxrs.internal.ClientResponse$InputStreamWrapper); line: 1, column: 18] (through reference chain: org.keycloak.representations.AccessTokenResponse["access_token"]) at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61) at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:822) at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1152) at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1582) at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1560) at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:294) at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151) at com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:1574) at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:965) at org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider$1.run(ResteasyJackson2Provider.java:140) ... 82 more Hope to get some hint. Thai Le From keycloak-user at mattevans.email Wed Jan 2 19:26:12 2019 From: keycloak-user at mattevans.email (Matt Evans) Date: Thu, 3 Jan 2019 11:26:12 +1100 Subject: [keycloak-user] Version endpoint removal Message-ID: Hi I was wondering why the /auth/version endpoint was removed in 4.0.0? Thanks Matt From hariprasad.n at ramyamlab.com Thu Jan 3 01:53:10 2019 From: hariprasad.n at ramyamlab.com (Hariprasad N) Date: Thu, 3 Jan 2019 12:23:10 +0530 Subject: [keycloak-user] Authorization in Angular Message-ID: Hi All, I am using keycloak-angular to integrate our Angular App to keycloak. Authentication is working fine but authorization not working with angular. Authorization working fine with spring boot and normal java webapps. Please help to resolve authorization problem with angular. Regards Hari Prasad N -- Thanks & Regards, Hari Prasad N Senior Software Engineer ------------------------------------------------- Ramyam Intelligence Lab Pvt. Ltd., Part of Arvato 3rd & 5th Floors, Mithra Towers, 10/4, Kasturba Road, Bangalore ? 560001, Karnataka, India. Phone: +91 80 67269266 Mobile: +91 7022156319 E-Mail: *hariprasad.n at ramyamlab.co m* *www.ramyamlab.com* From hariprasad.n at ramyamlab.com Thu Jan 3 07:38:43 2019 From: hariprasad.n at ramyamlab.com (Hariprasad N) Date: Thu, 3 Jan 2019 18:08:43 +0530 Subject: [keycloak-user] Get Authorization Permissions with Bearer Token Message-ID: Hi All, I have a client with authorization enabled. I am able to get Bearer token. My requirement is how can i get all authorization permissions with Java or JS or Angular. Is there any endpoint to get authorization permissions with Bearer token. -- Thanks & Regards, Hari Prasad N Senior Software Engineer ------------------------------------------------- Ramyam Intelligence Lab Pvt. Ltd., Part of Arvato 3rd & 5th Floors, Mithra Towers, 10/4, Kasturba Road, Bangalore ? 560001, Karnataka, India. Phone: +91 80 67269266 Mobile: +91 7022156319 E-Mail: *hariprasad.n at ramyamlab.co m* *www.ramyamlab.com* From hariprasad.n at ramyamlab.com Thu Jan 3 07:43:38 2019 From: hariprasad.n at ramyamlab.com (Hariprasad N) Date: Thu, 3 Jan 2019 18:13:38 +0530 Subject: [keycloak-user] Realm Custom Attributes Message-ID: Hi All, Can we add realm level custom attributes. -- Thanks & Regards, Hari Prasad N Senior Software Engineer ------------------------------------------------- Ramyam Intelligence Lab Pvt. Ltd., Part of Arvato 3rd & 5th Floors, Mithra Towers, 10/4, Kasturba Road, Bangalore ? 560001, Karnataka, India. Phone: +91 80 67269266 Mobile: +91 7022156319 E-Mail: *hariprasad.n at ramyamlab.co m* *www.ramyamlab.com* From Chris.Brandhorst at topicus.nl Thu Jan 3 09:35:35 2019 From: Chris.Brandhorst at topicus.nl (Chris Brandhorst) Date: Thu, 3 Jan 2019 14:35:35 +0000 Subject: [keycloak-user] Java 11 (Docker container base) Message-ID: Sebastian, The link [1] only shows support on RHEL and Windows environments. Do you mean to say the 2023 date is also valid for OpenJDK running in the Docker-version of Keycloak, regardless of underlying architecture? [1] https://access.redhat.com/articles/1299013 Chris > >From the support perspective, Red Hat offers extended support till June > 2023 [1]. > > Our move towards JDK11 (LTS) relies heavily on Wildfly/EAP Team. I guess we > still have plenty of time to do the switch, so I wouldn't rush things too > much. > > BTW, why do you need JDK11, especially in the container? > > [1] https://access.redhat.com/articles/1299013 > >> On Tue, Oct 23, 2018 at 1:13 PM Pavel Micka wrote: >> >> Sorry, end of january (my fault): >> https://www.oracle.com/technetwork/java/eol-135779.html. Then Oracle Java >> and OpenJDK will most probably start to diverge, as OpenJDK will not have >> access to Oracle repos (afaik). So the speed of security fixes will depend >> on willigness of community to fix the upcomming issues. >> >> Pavel >> >> >> From: Meissa M'baye Sakho >> Sent: Tuesday, October 23, 2018 11:04 AM >> To: Pavel Micka >> Cc: keycloak-user >> Subject: Re: [keycloak-user] Java 11 (Docker container base) >> >> Hello, >> Pavel, where did you get the information that the official Java 8 support >> will cease at the end of december? >> https://access.redhat.com/articles/1299013 >> https://www.oracle.com/technetwork/java/javase/eol-135779.html >> Meissa >> >> Le lun. 22 oct. 2018 ? 16:33, Pavel Micka > Pavel.Micka at zoomint.com>> a ?crit : >> Hello everyone, >> >> What is the plan for Java 11 support? The point is that current versions >> of Docker containers are based on OpenJDK 8, but the official Java 8 >> support will cease at the end of December. Will Keycloak use Java 11 by >> that time or will it rely on updates provided by the community. >> >> This is important to us, as Keycloak is important part of our app security. >> >> Thanks, >> >> Pavel >> >> // I have found this ticket in Jira, but it does not provide too many >> details: https://issues.jboss.org/browse/KEYCLOAK-7811 >> _______________________________________________ >> 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 From sthorger at redhat.com Thu Jan 3 10:51:24 2019 From: sthorger at redhat.com (Stian Thorgersen) Date: Thu, 3 Jan 2019 16:51:24 +0100 Subject: [keycloak-user] Java 11 (Docker container base) In-Reply-To: References: Message-ID: Keycloak server is only tested and supported on JDK8 today, we are planning to move to JDK11 soon. That will probably be shortly after we upgrade to WildFly 15. I can't say exactly when, but it will be relatively soon. On Thu, 3 Jan 2019 at 15:38, Chris Brandhorst wrote: > Sebastian, > > The link [1] only shows support on RHEL and Windows environments. Do you > mean to say the 2023 date is also valid for OpenJDK running in the > Docker-version of Keycloak, regardless of underlying architecture? > > [1] https://access.redhat.com/articles/1299013 > > Chris > > > >From the support perspective, Red Hat offers extended support till June > > 2023 [1]. > > > > Our move towards JDK11 (LTS) relies heavily on Wildfly/EAP Team. I guess > we > > still have plenty of time to do the switch, so I wouldn't rush things too > > much. > > > > BTW, why do you need JDK11, especially in the container? > > > > [1] https://access.redhat.com/articles/1299013 > > > >> On Tue, Oct 23, 2018 at 1:13 PM Pavel Micka > wrote: > >> > >> Sorry, end of january (my fault): > >> https://www.oracle.com/technetwork/java/eol-135779.html. Then Oracle > Java > >> and OpenJDK will most probably start to diverge, as OpenJDK will not > have > >> access to Oracle repos (afaik). So the speed of security fixes will > depend > >> on willigness of community to fix the upcomming issues. > >> > >> Pavel > >> > >> > >> From: Meissa M'baye Sakho > >> Sent: Tuesday, October 23, 2018 11:04 AM > >> To: Pavel Micka > >> Cc: keycloak-user > >> Subject: Re: [keycloak-user] Java 11 (Docker container base) > >> > >> Hello, > >> Pavel, where did you get the information that the official Java 8 > support > >> will cease at the end of december? > >> https://access.redhat.com/articles/1299013 > >> https://www.oracle.com/technetwork/java/javase/eol-135779.html > >> Meissa > >> > >> Le lun. 22 oct. 2018 ? 16:33, Pavel Micka >> Pavel.Micka at zoomint.com>> a ?crit : > >> Hello everyone, > >> > >> What is the plan for Java 11 support? The point is that current versions > >> of Docker containers are based on OpenJDK 8, but the official Java 8 > >> support will cease at the end of December. Will Keycloak use Java 11 by > >> that time or will it rely on updates provided by the community. > >> > >> This is important to us, as Keycloak is important part of our app > security. > >> > >> Thanks, > >> > >> Pavel > >> > >> // I have found this ticket in Jira, but it does not provide too many > >> details: https://issues.jboss.org/browse/KEYCLOAK-7811 > >> _______________________________________________ > >> keycloak-user mailing list > >> keycloak-user at lists.jboss.org 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 > > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user From sthorger at redhat.com Thu Jan 3 10:57:58 2019 From: sthorger at redhat.com (Stian Thorgersen) Date: Thu, 3 Jan 2019 16:57:58 +0100 Subject: [keycloak-user] kcinit status In-Reply-To: <1A3C52DFCD06494D8528644858247BF01C26EB64@EX10MBOX03.pnnl.gov> References: <1A3C52DFCD06494D8528644858247BF01C26A178@EX10MBOX03.pnnl.gov> <20190102133407.GA22163@abstractj.org> <1A3C52DFCD06494D8528644858247BF01C26EB64@EX10MBOX03.pnnl.gov> Message-ID: It's not a priority due to it not being a useful tool, but rather other higher priority tasks. The engineer that developed the kcinit prototype has left the team and we are now in a situation where no one knows it well. Further, there are design issues in it that I'm not convinced about. For it to become a supported tool there are at least a few things that needs to be done: * Remove Java based testing from keycloak/keycloak and add testing to Go repo itself. As well as review test coverage * Review design and consider if anything needs to change - Storage of tokens - How its used by multiple clients. I'm far from keen on it using token exchange as it does today * Review and resolve outstanding bugs * Review code * Documentation Contributions would be more than welcome. Bug fixes including tests are obvious candidates, design/functionality changes should be discussed on the dev mailing list first ideally. On Wed, 2 Jan 2019 at 18:19, Fox, Kevin M wrote: > Yes I filed jira tickets. they have been sitting around for a while. > > kcinit does seem quite important if you want to use keycloak for > kubernetes authentication and want to support the command line. It is > troubling to hear it is not going to be a focus for a year. Maybe its > because openshift would use it in a slightly different way then vanilla k8s > would. But since keycloak is trying to become part of the cncf, that would > be an important thing to support I think. I am trying to use keycloak with > a vanilla kubernetes and support both the cli and the web ui securely. > > I might be willing to contribute to it too if that would help move things > along. Its been unclear though that such contributions would be welcome? > > Thanks, > Kevin > > ------------------------------ > *From:* Stian Thorgersen [sthorger at redhat.com] > *Sent:* Wednesday, January 02, 2019 6:18 AM > *To:* Bruno Oliveira > *Cc:* Fox, Kevin M; keycloak-user at lists.jboss.org > *Subject:* Re: [keycloak-user] kcinit status > > kcinit is in a prototype stage and is not released or documented as it's > not ready for use. From our priorities lists it's doubtful that much will > happen with this tool this year. > > On Wed, 2 Jan 2019 at 14:41, Bruno Oliveira wrote: > >> Hi Kevin, did you file Jiras for the bugs you mentioned? If not please >> do, and also make sure to add all the details needed to reproduce the >> issue. >> >> >> On 2018-12-21, Fox, Kevin M wrote: >> > Not much has happened with kcinit in a long time and it has a few >> outstanding bugs in the way of working for us. What is the status of the >> project? >> > >> > Thanks, >> > Kevin >> > _______________________________________________ >> > keycloak-user mailing list >> > keycloak-user at lists.jboss.org >> > https://lists.jboss.org/mailman/listinfo/keycloak-user >> >> -- >> >> abstractj >> _______________________________________________ >> keycloak-user mailing list >> keycloak-user at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/keycloak-user >> > From sthorger at redhat.com Thu Jan 3 10:58:26 2019 From: sthorger at redhat.com (Stian Thorgersen) Date: Thu, 3 Jan 2019 16:58:26 +0100 Subject: [keycloak-user] kcinit status In-Reply-To: References: <1A3C52DFCD06494D8528644858247BF01C26A178@EX10MBOX03.pnnl.gov> <20190102133407.GA22163@abstractj.org> <1A3C52DFCD06494D8528644858247BF01C26EB64@EX10MBOX03.pnnl.gov> Message-ID: On Thu, 3 Jan 2019 at 16:57, Stian Thorgersen wrote: > It's not a priority due to it not being a useful tool, but rather other > higher priority tasks. > ... not because it's not a useful tool... > > The engineer that developed the kcinit prototype has left the team and we > are now in a situation where no one knows it well. Further, there are > design issues in it that I'm not convinced about. > > For it to become a supported tool there are at least a few things that > needs to be done: > > * Remove Java based testing from keycloak/keycloak and add testing to Go > repo itself. As well as review test coverage > * Review design and consider if anything needs to change > - Storage of tokens > - How its used by multiple clients. I'm far from keen on it using token > exchange as it does today > * Review and resolve outstanding bugs > * Review code > * Documentation > > Contributions would be more than welcome. Bug fixes including tests are > obvious candidates, design/functionality changes should be discussed on the > dev mailing list first ideally. > > > On Wed, 2 Jan 2019 at 18:19, Fox, Kevin M wrote: > >> Yes I filed jira tickets. they have been sitting around for a while. >> >> kcinit does seem quite important if you want to use keycloak for >> kubernetes authentication and want to support the command line. It is >> troubling to hear it is not going to be a focus for a year. Maybe its >> because openshift would use it in a slightly different way then vanilla k8s >> would. But since keycloak is trying to become part of the cncf, that would >> be an important thing to support I think. I am trying to use keycloak with >> a vanilla kubernetes and support both the cli and the web ui securely. >> >> I might be willing to contribute to it too if that would help move things >> along. Its been unclear though that such contributions would be welcome? >> >> Thanks, >> Kevin >> >> ------------------------------ >> *From:* Stian Thorgersen [sthorger at redhat.com] >> *Sent:* Wednesday, January 02, 2019 6:18 AM >> *To:* Bruno Oliveira >> *Cc:* Fox, Kevin M; keycloak-user at lists.jboss.org >> *Subject:* Re: [keycloak-user] kcinit status >> >> kcinit is in a prototype stage and is not released or documented as it's >> not ready for use. From our priorities lists it's doubtful that much will >> happen with this tool this year. >> >> On Wed, 2 Jan 2019 at 14:41, Bruno Oliveira wrote: >> >>> Hi Kevin, did you file Jiras for the bugs you mentioned? If not please >>> do, and also make sure to add all the details needed to reproduce the >>> issue. >>> >>> >>> On 2018-12-21, Fox, Kevin M wrote: >>> > Not much has happened with kcinit in a long time and it has a few >>> outstanding bugs in the way of working for us. What is the status of the >>> project? >>> > >>> > Thanks, >>> > Kevin >>> > _______________________________________________ >>> > keycloak-user mailing list >>> > keycloak-user at lists.jboss.org >>> > https://lists.jboss.org/mailman/listinfo/keycloak-user >>> >>> -- >>> >>> abstractj >>> _______________________________________________ >>> keycloak-user mailing list >>> keycloak-user at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/keycloak-user >>> >> From sthorger at redhat.com Thu Jan 3 11:01:35 2019 From: sthorger at redhat.com (Stian Thorgersen) Date: Thu, 3 Jan 2019 17:01:35 +0100 Subject: [keycloak-user] Version endpoint removal In-Reply-To: References: Message-ID: It should never have been there in the first place. It is not good practice to make the version of a software public available. On Thu, 3 Jan 2019 at 01:30, Matt Evans wrote: > Hi > > I was wondering why the /auth/version endpoint was removed in 4.0.0? > > Thanks > > Matt > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user > From luca.stancapiano at vige.it Thu Jan 3 11:15:05 2019 From: luca.stancapiano at vige.it (Luca Stancapiano) Date: Thu, 3 Jan 2019 17:15:05 +0100 (CET) Subject: [keycloak-user] Filtered users according the logged role In-Reply-To: References: Message-ID: <1318146878.512808.1546532105901@pim.register.it> In a realm can I filter the list of users according to my role covered? I would like only a few users to come back from the search From or at myobligo.com Thu Jan 3 11:24:10 2019 From: or at myobligo.com (Or Harary) Date: Thu, 3 Jan 2019 18:24:10 +0200 Subject: [keycloak-user] Can't request resource permissions by resource name by service account client and not user Message-ID: Hey, I'm using version 4.8.1 and i'm trying to check resource permissions on another client with the token endpoint, by the resource name, with a client's access token, and i'm getting "Resource with id [{resourceId}] does not exist". I have a service account client "foobarservice". I want this service account client, to check his permissions on a "foobaresource" resource from another client "otherservice". myrealm -- "foobarservice" Service Account Client -- -- foobar resource (with always grant policy and permission) -- "otherservice" Service Account Client I did "client_credentials" login with the "foobarservice" and got an access_token. With that token, I tried: curl -X POST http://keyclok:8080/auth/realms/myrealm/protocol/openid-connect/token \ -H "Authorization: Bearer {foobarservice_access_token}" \ -H "Content-Type: application/x-www-form-urlencoded" \ --data "grant_type=urn:ietf:params:oauth:grant-type:uma-ticket&audience=otherservice&permission=foobaresource&response_mode=permissions" And got 400 bad request with the not found error. When i'm doing the same request with some user's token, it works well. I looked into the code (my knowledge of JAVA is very basic) and it seems to be because of this: https://github.com/keycloak/keycloak/blob/f4f68438870768ac6cc18012cfae278f9ac1e163/services/src/main/java/org/keycloak/authorization/authorization/AuthorizationTokenService.java#L421 Is this the expected behavior? or a bug? Because when I used version 3.4 it did work Thanks, Or From pulkitsrivastavajd at gmail.com Thu Jan 3 13:29:07 2019 From: pulkitsrivastavajd at gmail.com (Pulkit Srivastava) Date: Thu, 3 Jan 2019 23:59:07 +0530 Subject: [keycloak-user] Request parameter in idp url Message-ID: Need your help for some issue. I have configured an IDP in keycloak, i am sending a request parameter in single sign on url field in IDP as: url?ab=cd Issue i am facing is sometimes keycloak appends this parameter to the redirect url but sometimes it does not. Any idea as to why this is happening? Any help would be appreciated. Thanks in advance. Thanks, Pulkit From alex.chatziparaskewas at trapezegroup.com Fri Jan 4 01:22:44 2019 From: alex.chatziparaskewas at trapezegroup.com (Alex Chatziparaskewas) Date: Fri, 4 Jan 2019 06:22:44 +0000 Subject: [keycloak-user] How to update a 'remember me' session? Message-ID: <9177b8d05968423e9f5fc2daf72ac85c@VOL-SLO-EXCH3.vgnet.volgrp.com> Hi All, We are using the keycloak javascript adapter. In the same way as the token and refresh token can be updated gracefully in the background using its updateToken method, is there any means by which the same can be done to a 'remember me' session? Thanks & Regards, Alex From hariprasad.n at ramyamlab.com Fri Jan 4 01:30:55 2019 From: hariprasad.n at ramyamlab.com (Hariprasad N) Date: Fri, 4 Jan 2019 12:00:55 +0530 Subject: [keycloak-user] Authorization with javascript adapter Message-ID: Hi Alex Chatziparaskewas, *i know you are using javascript adapter for authentication(for login), can we use javascript adapter for authorization also like resource protection.* -- Thanks & Regards, Hari Prasad N Senior Software Engineer ------------------------------------------------- Ramyam Intelligence Lab Pvt. Ltd., Part of Arvato 3rd & 5th Floors, Mithra Towers, 10/4, Kasturba Road, Bangalore ? 560001, Karnataka, India. Phone: +91 80 67269266 Mobile: +91 7022156319 E-Mail: *hariprasad.n at ramyamlab.co m* *www.ramyamlab.com* From alex.chatziparaskewas at trapezegroup.com Fri Jan 4 01:48:09 2019 From: alex.chatziparaskewas at trapezegroup.com (Alex Chatziparaskewas) Date: Fri, 4 Jan 2019 06:48:09 +0000 Subject: [keycloak-user] Authorization with javascript adapter In-Reply-To: References: Message-ID: <32ae2da0c47f4774ba02153beea7baa9@VOL-SLO-EXCH3.vgnet.volgrp.com> Hi Hari, On the server side the resources are protected by a keycloak gatekeeper proxy instance, e.g. our server (at this time) is unaware of security aspects. On the client side the login process goes past keycloak?s login and registration pages, i.e. the javascript adapter initialises, attempts authentication (redirects to login page if unsuccessful) and then does a periodic updateToken. Thanks & Regards, Alex Hi Alex Chatziparaskewas, i know you are using javascript adapter for authentication(for login), can we use javascript adapter for authorization also like resource protection. -- Thanks & Regards, Hari Prasad N Senior Software Engineer ------------------------------------------------- Ramyam Intelligence Lab Pvt. Ltd., Part of Arvato 3rd & 5th Floors, Mithra Towers, 10/4, Kasturba Road, Bangalore ? 560001, Karnataka, India. Phone: +91 80 67269266 Mobile: +91 7022156319 E-Mail: hariprasad.n at ramyamlab.com www.ramyamlab.com From hariprasad.n at ramyamlab.com Fri Jan 4 02:06:01 2019 From: hariprasad.n at ramyamlab.com (Hariprasad N) Date: Fri, 4 Jan 2019 12:36:01 +0530 Subject: [keycloak-user] Authorization with javascript adapter In-Reply-To: <32ae2da0c47f4774ba02153beea7baa9@VOL-SLO-EXCH3.vgnet.volgrp.com> References: <32ae2da0c47f4774ba02153beea7baa9@VOL-SLO-EXCH3.vgnet.volgrp.com> Message-ID: Hi Alex Chatziparaskewas, Thanks for your reply. I am not asking about authentication part, in am asking about authorization part. *For example i want to enable access for a URI(mypoject/test-resource**) to users who have ROLE 'TEST' ,in the keycloak i can do that in Authorization tab* *of a myclient.* That means when a user is logged in he can access URI ' *mypoject/test-resource*' only if he has ROLE 'TEST' other wise will be given error saying access denied. This settings working fine with backend applications like java webapps/springboot apps, but not working with javascript/Angular apps. If you know how to make it work or have sample project let me know. On Fri, Jan 4, 2019 at 12:18 PM Alex Chatziparaskewas < alex.chatziparaskewas at trapezegroup.com> wrote: > Hi Hari, > > > > On the server side the resources are protected by a keycloak gatekeeper > proxy instance, e.g. our server (at this time) is unaware of security > aspects. On the client side the login process goes past keycloak?s login > and registration pages, i.e. the javascript adapter initialises, attempts > authentication (redirects to login page if unsuccessful) and then does a > periodic updateToken. > > > > Thanks & Regards, > > Alex > > > > > > > > Hi *Alex Chatziparaskewas,* > > > > *i know you are using javascript adapter for authentication(for login), > can we use javascript adapter for authorization also like resource > protection.* > > > > > > -- > > Thanks & Regards, > > > > Hari Prasad N > Senior Software Engineer > ------------------------------------------------- > Ramyam Intelligence Lab Pvt. Ltd., > Part of Arvato > 3rd & 5th Floors, Mithra Towers, 10/4, Kasturba Road, > Bangalore ? 560001, Karnataka, India. > > Phone: +91 80 67269266 > Mobile: +91 7022156319 > E-Mail: *hariprasad.n**@ramyamlab.co m* > > *www.ramyamlab.com* > -- Thanks & Regards, Hari Prasad N Senior Software Engineer ------------------------------------------------- Ramyam Intelligence Lab Pvt. Ltd., Part of Arvato 3rd & 5th Floors, Mithra Towers, 10/4, Kasturba Road, Bangalore ? 560001, Karnataka, India. Phone: +91 80 67269266 Mobile: +91 7022156319 E-Mail: *hariprasad.n at ramyamlab.co m* *www.ramyamlab.com* From alex.chatziparaskewas at trapezegroup.com Fri Jan 4 04:05:39 2019 From: alex.chatziparaskewas at trapezegroup.com (Alex Chatziparaskewas) Date: Fri, 4 Jan 2019 09:05:39 +0000 Subject: [keycloak-user] Authorization with javascript adapter In-Reply-To: References: <32ae2da0c47f4774ba02153beea7baa9@VOL-SLO-EXCH3.vgnet.volgrp.com> Message-ID: <1a141d08df0349e88fe21373043eaef1@VOL-SLO-EXCH3.vgnet.volgrp.com> Hi Hari, Nope, we are not using roles. Once a user is authenticated he is as well fully authorised. Anyhow, although we have not gone down that path yet, check the ?tokenParsed? attribute of the keycloak instance object (just log them for starters). It shows some information about access/resource roles associated with the current user. Question from my side: has this anything to do with my original question about updating the ?remember me? session? Thanks & Regards, Alex Hi Alex Chatziparaskewas, Thanks for your reply. I am not asking about authentication part, in am asking about authorization part. For example i want to enable access for a URI(mypoject/test-resource) to users who have ROLE 'TEST' ,in the keycloak i can do that in Authorization tab of a myclient. That means when a user is logged in he can access URI 'mypoject/test-resource' only if he has ROLE 'TEST' other wise will be given error saying access denied. This settings working fine with backend applications like java webapps/springboot apps, but not working with javascript/Angular apps. If you know how to make it work or have sample project let me know. On Fri, Jan 4, 2019 at 12:18 PM Alex Chatziparaskewas > wrote: Hi Hari, On the server side the resources are protected by a keycloak gatekeeper proxy instance, e.g. our server (at this time) is unaware of security aspects. On the client side the login process goes past keycloak?s login and registration pages, i.e. the javascript adapter initialises, attempts authentication (redirects to login page if unsuccessful) and then does a periodic updateToken. Thanks & Regards, Alex Hi Alex Chatziparaskewas, i know you are using javascript adapter for authentication(for login), can we use javascript adapter for authorization also like resource protection. -- Thanks & Regards, Hari Prasad N Senior Software Engineer ------------------------------------------------- Ramyam Intelligence Lab Pvt. Ltd., Part of Arvato 3rd & 5th Floors, Mithra Towers, 10/4, Kasturba Road, Bangalore ? 560001, Karnataka, India. Phone: +91 80 67269266 Mobile: +91 7022156319 E-Mail: hariprasad.n at ramyamlab.com www.ramyamlab.com -- Thanks & Regards, Hari Prasad N Senior Software Engineer ------------------------------------------------- Ramyam Intelligence Lab Pvt. Ltd., Part of Arvato 3rd & 5th Floors, Mithra Towers, 10/4, Kasturba Road, Bangalore ? 560001, Karnataka, India. Phone: +91 80 67269266 Mobile: +91 7022156319 E-Mail: hariprasad.n at ramyamlab.com www.ramyamlab.com From hariprasad.n at ramyamlab.com Fri Jan 4 04:15:16 2019 From: hariprasad.n at ramyamlab.com (Hariprasad N) Date: Fri, 4 Jan 2019 14:45:16 +0530 Subject: [keycloak-user] Authorization with javascript adapter In-Reply-To: <1a141d08df0349e88fe21373043eaef1@VOL-SLO-EXCH3.vgnet.volgrp.com> References: <32ae2da0c47f4774ba02153beea7baa9@VOL-SLO-EXCH3.vgnet.volgrp.com> <1a141d08df0349e88fe21373043eaef1@VOL-SLO-EXCH3.vgnet.volgrp.com> Message-ID: No, it is not related to remember me. When i saw you question I thought you already working on javascript adapter and can help me. On Fri, Jan 4, 2019 at 2:35 PM Alex Chatziparaskewas < alex.chatziparaskewas at trapezegroup.com> wrote: > Hi Hari, > > > > Nope, we are not using roles. Once a user is authenticated he is as well > fully authorised. Anyhow, although we have not gone down that path yet, > check the ?tokenParsed? attribute of the keycloak instance object (just log > them for starters). It shows some information about access/resource roles > associated with the current user. > > > > Question from my side: has this anything to do with my original question > about updating the ?remember me? session? > > Thanks & Regards, > > Alex > > > > > > > > Hi *Alex Chatziparaskewas,* > > > > *Thanks for your reply.* > > *I am not asking about authentication part, in am asking about > authorization part.* > > *For example i want to enable access for a URI(mypoject/test-resource) to > users who have ROLE 'TEST' ,in the keycloak i can do that in Authorization > tab* > > *of a myclient.* > > > > That means when a user is logged in he can access URI ' > *mypoject/test-resource*' only if he has ROLE 'TEST' other wise will be > given error saying access denied. > > > > This settings working fine with backend applications like java > webapps/springboot apps, but not working with javascript/Angular apps. If > you know how to make it work or have sample project let me know. > > > > > > On Fri, Jan 4, 2019 at 12:18 PM Alex Chatziparaskewas < > alex.chatziparaskewas at trapezegroup.com> wrote: > > Hi Hari, > > > > On the server side the resources are protected by a keycloak gatekeeper > proxy instance, e.g. our server (at this time) is unaware of security > aspects. On the client side the login process goes past keycloak?s login > and registration pages, i.e. the javascript adapter initialises, attempts > authentication (redirects to login page if unsuccessful) and then does a > periodic updateToken. > > > > Thanks & Regards, > > Alex > > > > > > > > Hi *Alex Chatziparaskewas,* > > > > *i know you are using javascript adapter for authentication(for login), > can we use javascript adapter for authorization also like resource > protection.* > > > > > > -- > > Thanks & Regards, > > > > Hari Prasad N > Senior Software Engineer > ------------------------------------------------- > Ramyam Intelligence Lab Pvt. Ltd., > Part of Arvato > 3rd & 5th Floors, Mithra Towers, 10/4, Kasturba Road, > Bangalore ? 560001, Karnataka, India. > > Phone: +91 80 67269266 > Mobile: +91 7022156319 > E-Mail: *hariprasad.n**@ramyamlab.co m* > > *www.ramyamlab.com* > > > > > -- > > Thanks & Regards, > > > > Hari Prasad N > Senior Software Engineer > ------------------------------------------------- > Ramyam Intelligence Lab Pvt. Ltd., > Part of Arvato > 3rd & 5th Floors, Mithra Towers, 10/4, Kasturba Road, > Bangalore ? 560001, Karnataka, India. > > Phone: +91 80 67269266 > Mobile: +91 7022156319 > E-Mail: *hariprasad.n**@ramyamlab.co m* > > *www.ramyamlab.com* > -- Thanks & Regards, Hari Prasad N Senior Software Engineer ------------------------------------------------- Ramyam Intelligence Lab Pvt. Ltd., Part of Arvato 3rd & 5th Floors, Mithra Towers, 10/4, Kasturba Road, Bangalore ? 560001, Karnataka, India. Phone: +91 80 67269266 Mobile: +91 7022156319 E-Mail: *hariprasad.n at ramyamlab.co m* *www.ramyamlab.com* From alex.chatziparaskewas at trapezegroup.com Fri Jan 4 04:23:37 2019 From: alex.chatziparaskewas at trapezegroup.com (Alex Chatziparaskewas) Date: Fri, 4 Jan 2019 09:23:37 +0000 Subject: [keycloak-user] Authorization with javascript adapter In-Reply-To: References: <32ae2da0c47f4774ba02153beea7baa9@VOL-SLO-EXCH3.vgnet.volgrp.com> <1a141d08df0349e88fe21373043eaef1@VOL-SLO-EXCH3.vgnet.volgrp.com> Message-ID: <72dddf9c25f74e75b5ca9e663de1c35b@VOL-SLO-EXCH3.vgnet.volgrp.com> Hi Hari, So, have a look into the ?tokenParsed? attribute and let me know if it helped you (we might need the same at some point in time). Thanks & Regards, Alex No, it is not related to remember me. When i saw you question I thought you already working on javascript adapter and can help me. On Fri, Jan 4, 2019 at 2:35 PM Alex Chatziparaskewas > wrote: Hi Hari, Nope, we are not using roles. Once a user is authenticated he is as well fully authorised. Anyhow, although we have not gone down that path yet, check the ?tokenParsed? attribute of the keycloak instance object (just log them for starters). It shows some information about access/resource roles associated with the current user. Question from my side: has this anything to do with my original question about updating the ?remember me? session? Thanks & Regards, Alex Hi Alex Chatziparaskewas, Thanks for your reply. I am not asking about authentication part, in am asking about authorization part. For example i want to enable access for a URI(mypoject/test-resource) to users who have ROLE 'TEST' ,in the keycloak i can do that in Authorization tab of a myclient. That means when a user is logged in he can access URI 'mypoject/test-resource' only if he has ROLE 'TEST' other wise will be given error saying access denied. This settings working fine with backend applications like java webapps/springboot apps, but not working with javascript/Angular apps. If you know how to make it work or have sample project let me know. On Fri, Jan 4, 2019 at 12:18 PM Alex Chatziparaskewas > wrote: Hi Hari, On the server side the resources are protected by a keycloak gatekeeper proxy instance, e.g. our server (at this time) is unaware of security aspects. On the client side the login process goes past keycloak?s login and registration pages, i.e. the javascript adapter initialises, attempts authentication (redirects to login page if unsuccessful) and then does a periodic updateToken. Thanks & Regards, Alex Hi Alex Chatziparaskewas, i know you are using javascript adapter for authentication(for login), can we use javascript adapter for authorization also like resource protection. -- Thanks & Regards, Hari Prasad N Senior Software Engineer ------------------------------------------------- Ramyam Intelligence Lab Pvt. Ltd., Part of Arvato 3rd & 5th Floors, Mithra Towers, 10/4, Kasturba Road, Bangalore ? 560001, Karnataka, India. Phone: +91 80 67269266 Mobile: +91 7022156319 E-Mail: hariprasad.n at ramyamlab.com www.ramyamlab.com -- Thanks & Regards, Hari Prasad N Senior Software Engineer ------------------------------------------------- Ramyam Intelligence Lab Pvt. Ltd., Part of Arvato 3rd & 5th Floors, Mithra Towers, 10/4, Kasturba Road, Bangalore ? 560001, Karnataka, India. Phone: +91 80 67269266 Mobile: +91 7022156319 E-Mail: hariprasad.n at ramyamlab.com www.ramyamlab.com -- Thanks & Regards, Hari Prasad N Senior Software Engineer ------------------------------------------------- Ramyam Intelligence Lab Pvt. Ltd., Part of Arvato 3rd & 5th Floors, Mithra Towers, 10/4, Kasturba Road, Bangalore ? 560001, Karnataka, India. Phone: +91 80 67269266 Mobile: +91 7022156319 E-Mail: hariprasad.n at ramyamlab.com www.ramyamlab.com From hariprasad.n at ramyamlab.com Fri Jan 4 05:04:19 2019 From: hariprasad.n at ramyamlab.com (Hariprasad N) Date: Fri, 4 Jan 2019 15:34:19 +0530 Subject: [keycloak-user] Authorization with javascript adapter In-Reply-To: <72dddf9c25f74e75b5ca9e663de1c35b@VOL-SLO-EXCH3.vgnet.volgrp.com> References: <32ae2da0c47f4774ba02153beea7baa9@VOL-SLO-EXCH3.vgnet.volgrp.com> <1a141d08df0349e88fe21373043eaef1@VOL-SLO-EXCH3.vgnet.volgrp.com> <72dddf9c25f74e75b5ca9e663de1c35b@VOL-SLO-EXCH3.vgnet.volgrp.com> Message-ID: tokenParsed can help upto some extent, but in keycloak autorization we can create different kind of policies like Role,Javascript, Client, Time, User, Aggregated, Group. A policy is a condition if it evaluates to true access allowed. If we implement this conditions at client side it requires lot of efforts and these conditions are hard coded, if i want to change the condition again i need to do code change and deploy again. but in keycloak I can go to admin console and change the rule, so whenever token is refreshed new condition can be applied. On Fri, Jan 4, 2019 at 2:53 PM Alex Chatziparaskewas < alex.chatziparaskewas at trapezegroup.com> wrote: > Hi Hari, > > > > So, have a look into the ?tokenParsed? attribute and let me know if it > helped you (we might need the same at some point in time). > > > > Thanks & Regards, > > Alex > > > > > > > > No, it is not related to remember me. > > When i saw you question I thought you already working on javascript > adapter and can help me. > > > > On Fri, Jan 4, 2019 at 2:35 PM Alex Chatziparaskewas < > alex.chatziparaskewas at trapezegroup.com> wrote: > > Hi Hari, > > > > Nope, we are not using roles. Once a user is authenticated he is as well > fully authorised. Anyhow, although we have not gone down that path yet, > check the ?tokenParsed? attribute of the keycloak instance object (just log > them for starters). It shows some information about access/resource roles > associated with the current user. > > > > Question from my side: has this anything to do with my original question > about updating the ?remember me? session? > > Thanks & Regards, > > Alex > > > > > > > > Hi *Alex Chatziparaskewas,* > > > > *Thanks for your reply.* > > *I am not asking about authentication part, in am asking about > authorization part.* > > *For example i want to enable access for a URI(mypoject/test-resource) to > users who have ROLE 'TEST' ,in the keycloak i can do that in Authorization > tab* > > *of a myclient.* > > > > That means when a user is logged in he can access URI ' > *mypoject/test-resource*' only if he has ROLE 'TEST' other wise will be > given error saying access denied. > > > > This settings working fine with backend applications like java > webapps/springboot apps, but not working with javascript/Angular apps. If > you know how to make it work or have sample project let me know. > > > > > > On Fri, Jan 4, 2019 at 12:18 PM Alex Chatziparaskewas < > alex.chatziparaskewas at trapezegroup.com> wrote: > > Hi Hari, > > > > On the server side the resources are protected by a keycloak gatekeeper > proxy instance, e.g. our server (at this time) is unaware of security > aspects. On the client side the login process goes past keycloak?s login > and registration pages, i.e. the javascript adapter initialises, attempts > authentication (redirects to login page if unsuccessful) and then does a > periodic updateToken. > > > > Thanks & Regards, > > Alex > > > > > > > > Hi *Alex Chatziparaskewas,* > > > > *i know you are using javascript adapter for authentication(for login), > can we use javascript adapter for authorization also like resource > protection.* > > > > > > -- > > Thanks & Regards, > > > > Hari Prasad N > Senior Software Engineer > ------------------------------------------------- > Ramyam Intelligence Lab Pvt. Ltd., > Part of Arvato > 3rd & 5th Floors, Mithra Towers, 10/4, Kasturba Road, > Bangalore ? 560001, Karnataka, India. > > Phone: +91 80 67269266 > Mobile: +91 7022156319 > E-Mail: *hariprasad.n**@ramyamlab.co m* > > *www.ramyamlab.com* > > > > > -- > > Thanks & Regards, > > > > Hari Prasad N > Senior Software Engineer > ------------------------------------------------- > Ramyam Intelligence Lab Pvt. Ltd., > Part of Arvato > 3rd & 5th Floors, Mithra Towers, 10/4, Kasturba Road, > Bangalore ? 560001, Karnataka, India. > > Phone: +91 80 67269266 > Mobile: +91 7022156319 > E-Mail: *hariprasad.n**@ramyamlab.co m* > > *www.ramyamlab.com* > > > > > -- > > Thanks & Regards, > > > > Hari Prasad N > Senior Software Engineer > ------------------------------------------------- > Ramyam Intelligence Lab Pvt. Ltd., > Part of Arvato > 3rd & 5th Floors, Mithra Towers, 10/4, Kasturba Road, > Bangalore ? 560001, Karnataka, India. > > Phone: +91 80 67269266 > Mobile: +91 7022156319 > E-Mail: *hariprasad.n**@ramyamlab.co m* > > *www.ramyamlab.com* > -- Thanks & Regards, Hari Prasad N Senior Software Engineer ------------------------------------------------- Ramyam Intelligence Lab Pvt. Ltd., Part of Arvato 3rd & 5th Floors, Mithra Towers, 10/4, Kasturba Road, Bangalore ? 560001, Karnataka, India. Phone: +91 80 67269266 Mobile: +91 7022156319 E-Mail: *hariprasad.n at ramyamlab.co m* *www.ramyamlab.com* From sthorger at redhat.com Fri Jan 4 05:55:05 2019 From: sthorger at redhat.com (Stian Thorgersen) Date: Fri, 4 Jan 2019 11:55:05 +0100 Subject: [keycloak-user] How to update a 'remember me' session? In-Reply-To: <9177b8d05968423e9f5fc2daf72ac85c@VOL-SLO-EXCH3.vgnet.volgrp.com> References: <9177b8d05968423e9f5fc2daf72ac85c@VOL-SLO-EXCH3.vgnet.volgrp.com> Message-ID: I wouldn't recommend on having a background keep alive using the update token. Rather, just rely on the user performing actions to keep the session alive and configure the SSO idle timeout accordingly to your needs. With regards to remember me I don't understand your question as there is no difference here. Remember me only sets a persisted cookie so session survives a browser restart as well as recently we've introduce options to have different SSO idle and max for remember me sessions. On Fri, 4 Jan 2019 at 07:24, Alex Chatziparaskewas < alex.chatziparaskewas at trapezegroup.com> wrote: > Hi All, > > We are using the keycloak javascript adapter. In the same way as the token > and refresh token can be updated gracefully in the background using its > updateToken method, is there any means by which the same can be done to a > 'remember me' session? > > Thanks & Regards, > Alex > > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user > From totheocean0402 at gmail.com Fri Jan 4 06:49:16 2019 From: totheocean0402 at gmail.com (Andreas Lau) Date: Fri, 4 Jan 2019 12:49:16 +0100 Subject: [keycloak-user] Realm.toRepresentation results in com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException In-Reply-To: References: Message-ID: Hey me again, since nobody seams to be able to help me, I thought, maybe it's due to the fact I didn't explain well enough what I try to do? So I try to clarify a bit more in deep what I like achieve. I'm using the keycloak client API to update some parts of the realm. To do this I followed the test https://github.com/keycloak/keycloak/blob/master/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/realm/RealmTest.java There is a simple example "public void renameRealmTest()" that retrieves a realm, transforms it to its representation and finally renames and updates it. This describes the work flow I try to follow. But doing this I results in the mentioned exception "UnrecognizedPropertyException" from jackson. At this point I ask for help because I think the test will be executed before shipping keycloak by the way I'm using the 4.5 version. So can you please help me to find the error or give me some hints that help me to understand why the exception appears? Thanks Am Do., 27. Dez. 2018, 12:40 hat Andreas Lau geschrieben: > Sorry for bouncing this up again. But I'm a bit stuck Ed on the problem. > Can anyone help me out? Is this the right list for this? > > Thanks > > Am Mi., 19. Dez. 2018, 18:04 hat Frank Franz > geschrieben: > >> Hello, >> I'm using the java admin client to create a realm and some other setting. >> In this process I like to update the realm (set authentication bindings for >> registration flow and credential flow) therefore I from my actual knowledge >> have to transfer the realm to the realm representation. >> >> Doing this calling realm.toRepresentation() results in the following >> error: >> javax.ws.rs.client.ResponseProcessingException: javax.ws.rs. >> ProcessingException: com.fasterxml.jackson.databind.exc. >> UnrecognizedPropertyException: Unrecognized field " >> offlineSessionMaxLifespanEnabled" (class org.keycloak.representations.idm >> .RealmRepresentation), not marked as ignorable (101 known properties: " >> directGrantFlow", "otpPolicyDigits", "identityProviderMappers", " >> revokeRefreshToken", "identityProviders", "userFederationMappers", " >> rememberMe", "duplicateEmailsAllowed", "dockerAuthenticationFlow", " >> otpSupportedApplications", "adminEventsDetailsEnabled", "registrationFlow", >> "editUsernameAllowed", "clients", "users", "emailTheme", "realm", " >> actionTokenGeneratedByAdminLifespan", "authenticatorConfig", >> "components", "certificate", "updateProfileOnInitialSocialLogin", " >> otpPolicyType", "accessCodeLifespanUserAction", "protocolMappers", "id", >> "accountTheme", "maxDeltaTimeSeconds", "enabledEventTypes", "verifyEmail", >> "applications", "waitIncrementSeconds", "eventsListeners", " >> eventsExpiration", "defaultDefaultClientScopes", " >> defaultOptionalClientScopes", "passwordPolicy", "clientTemplates", " >> registrationAllowed", "userManagedAccessAllowed", "notBefore", " >> otpPolicyAlgorithm", "actionTokenGeneratedByUserLifespan", " >> permanentLockout", "socialProviders", "otpPolicyInitialCounter" >> [truncated]]) >> >> Can you pleas give me a hint how to resolve this? >> Thanks in advance. >> Andreas >> > From alex.chatziparaskewas at trapezegroup.com Fri Jan 4 07:06:41 2019 From: alex.chatziparaskewas at trapezegroup.com (Alex Chatziparaskewas) Date: Fri, 4 Jan 2019 12:06:41 +0000 Subject: [keycloak-user] How to update a 'remember me' session? In-Reply-To: References: <9177b8d05968423e9f5fc2daf72ac85c@VOL-SLO-EXCH3.vgnet.volgrp.com> Message-ID: Hi Stian, Thanks for your reply. It is already spawning some now thoughts. I will try to explain the underlying problem a bit more. Unfortunately, this is a single page web app, which additionally is mostly ?watched? or simply ?looked at? most of the time (can be hours). Of course the idle timeouts (still defaults) could be increased, but somehow it felt strange putting the idle time to something like a day or two (or more). Additionally, the web app opens a websocket to the backend (standard Javascript web socket). Opening the websocket works fine as long as the tokens are valid, however, once the tokens are invalid opening the websocket fails due to security (which in itself is good!). Finally, the web app runs on mobile devices. Switching the app context (in particular on IOS) for even a second triggers a reload of the application (bad enough), but also triggers re-authentication, which without the ?remember me? functionality always goes past the login page. What a user expects: as long as the web app is running the login page should not be shown; if a network problem occurs (they are running around with their mobile devices) the app has to recover (i.e. re-establish the websocket without the login page); if a user quickly changes the app context the app should basically continue (at least without the login page). One possible solution I think: increase the idle timeouts for the sessions (normal and remember me) to some very high value (days; which we have tried to avoid so far). Initially, we tried to use the Keycloak gatekeeper?s ?enable-refresh-tokens? feature to get the token and refresh token updated on the fly with each request (that is our understanding of this feature), however, it did not work. Tokens were never updated (maybe we were doing something wrong or there is a bug; this is another open issue on our side to be followed up). To avoid increasing the idle times to something very long, we are for moment periodically using the updateToken method to explicitly update the tokens, but even then, funny as it is, we have to rewrite the kc-access and kc-state cookies (used by the keycloak gatekeeper) ourselves (not nice as well). Anyhow, in the same way as we found means to programmatically extend the ?lifetime? of the token/updateToken we were thinking on how to programmatically extend the lifetime of the remember me session. Thanks & Regards, Alex From: Stian Thorgersen [mailto:sthorger at redhat.com] Sent: 04 January 2019 11:55 To: Alex Chatziparaskewas Cc: keycloak-user at lists.jboss.org Subject: Re: [keycloak-user] How to update a 'remember me' session? I wouldn't recommend on having a background keep alive using the update token. Rather, just rely on the user performing actions to keep the session alive and configure the SSO idle timeout accordingly to your needs. With regards to remember me I don't understand your question as there is no difference here. Remember me only sets a persisted cookie so session survives a browser restart as well as recently we've introduce options to have different SSO idle and max for remember me sessions. On Fri, 4 Jan 2019 at 07:24, Alex Chatziparaskewas > wrote: Hi All, We are using the keycloak javascript adapter. In the same way as the token and refresh token can be updated gracefully in the background using its updateToken method, is there any means by which the same can be done to a 'remember me' session? Thanks & Regards, Alex _______________________________________________ keycloak-user mailing list keycloak-user at lists.jboss.org https://lists.jboss.org/mailman/listinfo/keycloak-user From dt at acutus.pro Fri Jan 4 09:25:38 2019 From: dt at acutus.pro (Dmitry Telegin) Date: Fri, 04 Jan 2019 17:25:38 +0300 Subject: [keycloak-user] Fwd: Multi-tiered Permissions In-Reply-To: References: Message-ID: <1546611938.3690.3.camel@acutus.pro> Hi Warren, Have you ever thought of implementing stores on the Keycloak side? Off the top of my head, I can suggest implementing them?either as (hierarchical) groups, or using custom JPA entity [1]. It is not clear if you already have a database with stores or only planning to create and populate it. In the former case you will need to set up proper synchronization of store data to Keycloak; in the latter case the need for an external DB will be eliminated. In both cases you will have to implement Admin Console GUI additions [2] to manage user-store-scope associations. The benefits of this approach: - improved manageability - you manage everything in one place, i.e. Keycloak Admin Console; - performance - this will eliminate the need to perform calls to an external system per each incoming HTTP request, which might have significant performance impact. Keycloak will already have all the necessary info to evaluate policies. You can take a look at BeerCloak [3], a complete all-in-one example that contains custom JPA entity, Admin Console customizations and the necessary wiring. I'm already thinking about adding an example authorization policy that would involve custom JPA entities. To Pedro: I'd also much appreciate your opinion on this approach, so please let me know what you think. [1] https://www.keycloak.org/docs/latest/server_development/index.html#_extensions_jpa [2] https://www.keycloak.org/docs/latest/server_development/index.html#_themes [3] https://github.com/dteleguin/beercloak Dmitry Telegin CTO, Acutus s.r.o. Keycloak Consulting and Training Pod lipami street 339/52, 130 00 Prague 3, Czech Republic +42 (022) 888-30-71 E-mail: info at acutus.pro On Fri, 2018-12-28 at 19:01 -0500, Warren, Scott wrote: > Yeah, I made my original example very simple as I was trying to point out > the multi-tiered permission issue rather than getting bogged down in the > myriad of scopes. Users can have 1-to-many scopes across several stores. > It's not as simple as "if primary store grant this scope set, else grant > that scope set". Life would be a lot easier if it was :) > It sounds like a CIP service accessing an external DB is the 'correct' > answer for this scenario. I see no other clean way to tie > users->stores->scopes. > Thanks for your help! > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user From speechkey at gmail.com Fri Jan 4 09:37:50 2019 From: speechkey at gmail.com (Artem Grebenkin) Date: Fri, 4 Jan 2019 15:37:50 +0100 Subject: [keycloak-user] Run keycloak at root "/" context, not "/auth" Message-ID: Hi folks, is it possible to run keycloak at root "/" context, not "/auth" Kind regards Artem From dt at acutus.pro Fri Jan 4 09:40:51 2019 From: dt at acutus.pro (Dmitry Telegin) Date: Fri, 04 Jan 2019 17:40:51 +0300 Subject: [keycloak-user] Realm.toRepresentation results in com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException In-Reply-To: References: Message-ID: <1546612851.3690.5.camel@acutus.pro> Hello Andreas, Could it be that you're using older (pre-4.1.0) Java admin client against newer Keycloak? The field "offlineSessionMaxLifespanEnabled" has been introduced in Keycloak 4.1.0. Please also try the same with kcadm.sh: bin/kcadm.sh get realms/myrealm > myrealm.json (edit myrealm.json) bin/kcadm.sh update realms/myrealm -f myrealm.json Does that work? Cheers, Dmitry Telegin CTO, Acutus s.r.o. Keycloak Consulting and Training Pod lipami street 339/52, 130 00 Prague 3, Czech Republic +42 (022) 888-30-71 E-mail: info at acutus.pro On Fri, 2019-01-04 at 12:49 +0100, Andreas Lau wrote: > Hey me again, since nobody seams to be able to help me, I thought, maybe > it's due to the fact I didn't explain well enough what I try to do? > So I try to clarify a bit more in deep what I like achieve. > I'm using the keycloak client API to update some parts of the realm. To do > this I followed the test > https://github.com/keycloak/keycloak/blob/master/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/realm/RealmTest.java > > There is a simple example "public void renameRealmTest()"??that retrieves a > realm, transforms it to its representation and finally renames and updates > it.??This describes the work flow I try to follow. But doing this I results > in the mentioned exception "UnrecognizedPropertyException" from jackson. > > At this point I ask for help because I think the test will be executed > before shipping keycloak by the way I'm using the 4.5 version. > > So can you please help me to find the error or give me some hints that help > me to understand why the exception appears? > > Thanks > > Am Do., 27. Dez. 2018, 12:40 hat Andreas Lau > geschrieben: > > > Sorry for bouncing this up again. But I'm a bit stuck Ed on the problem. > > Can anyone help me out? Is this the right list for this? > > > > Thanks > > > > Am Mi., 19. Dez. 2018, 18:04 hat Frank Franz > > geschrieben: > > > > > Hello, > > > I'm using the java admin client to create a realm and some other setting. > > > In this process I like to update the realm (set authentication bindings for > > > registration flow and credential flow) therefore I from my actual knowledge > > > have to transfer the realm to the realm representation. > > > > > > Doing this calling realm.toRepresentation() results in the following > > > error: > > > javax.ws.rs.client.ResponseProcessingException: javax.ws.rs. > > > ProcessingException: com.fasterxml.jackson.databind.exc. > > > UnrecognizedPropertyException: Unrecognized field " > > > offlineSessionMaxLifespanEnabled" (class org.keycloak.representations.idm > > > .RealmRepresentation), not marked as ignorable (101 known properties: " > > > directGrantFlow", "otpPolicyDigits", "identityProviderMappers", " > > > revokeRefreshToken", "identityProviders", "userFederationMappers", " > > > rememberMe", "duplicateEmailsAllowed", "dockerAuthenticationFlow", " > > > otpSupportedApplications", "adminEventsDetailsEnabled", "registrationFlow", > > > "editUsernameAllowed", "clients", "users", "emailTheme", "realm", " > > > actionTokenGeneratedByAdminLifespan", "authenticatorConfig", > > > "components", "certificate", "updateProfileOnInitialSocialLogin", " > > > otpPolicyType", "accessCodeLifespanUserAction", "protocolMappers", "id", > > > "accountTheme", "maxDeltaTimeSeconds", "enabledEventTypes", "verifyEmail", > > > "applications", "waitIncrementSeconds", "eventsListeners", " > > > eventsExpiration", "defaultDefaultClientScopes", " > > > defaultOptionalClientScopes", "passwordPolicy", "clientTemplates", " > > > registrationAllowed", "userManagedAccessAllowed", "notBefore", " > > > otpPolicyAlgorithm", "actionTokenGeneratedByUserLifespan", " > > > permanentLockout", "socialProviders", "otpPolicyInitialCounter" > > > [truncated]]) > > > > > > Can you pleas give me a hint how to resolve this? > > > Thanks in advance. > > > Andreas > > > > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user From psilva at redhat.com Fri Jan 4 09:48:56 2019 From: psilva at redhat.com (Pedro Igor Silva) Date: Fri, 4 Jan 2019 12:48:56 -0200 Subject: [keycloak-user] Fwd: Multi-tiered Permissions In-Reply-To: <1546611938.3690.3.camel@acutus.pro> References: <1546611938.3690.3.camel@acutus.pro> Message-ID: On Fri, Jan 4, 2019 at 12:25 PM Dmitry Telegin
wrote: > Hi Warren, > > Have you ever thought of implementing stores on the Keycloak side? > > Off the top of my head, I can suggest implementing them either as > (hierarchical) groups, or using custom JPA entity [1]. > > It is not clear if you already have a database with stores or only > planning to create and populate it. In the former case you will need to set > up proper synchronization of store data to Keycloak; in the latter case the > need for an external DB will be eliminated. > In both cases you will have to implement Admin Console GUI additions [2] > to manage user-store-scope associations. > > The benefits of this approach: > - improved manageability - you manage everything in one place, i.e. > Keycloak Admin Console; > - performance - this will eliminate the need to perform calls to an > external system per each incoming HTTP request, which might have > significant performance impact. Keycloak will already have all the > necessary info to evaluate policies. > > You can take a look at BeerCloak [3], a complete all-in-one example that > contains custom JPA entity, Admin Console customizations and the necessary > wiring. I'm already thinking about adding an example authorization policy > that would involve custom JPA entities. > > To Pedro: I'd also much appreciate your opinion on this approach, so > please let me know what you think. > That would be nice and maybe could help us with an RFE still open around a "Resource SPI". Depending on what you are planning, your proposal could even be much more powerful as it would imply access to claims not only specific to resources but anything available from your database. > > [1] > https://www.keycloak.org/docs/latest/server_development/index.html#_extensions_jpa > [2] > https://www.keycloak.org/docs/latest/server_development/index.html#_themes > [3] https://github.com/dteleguin/beercloak > > Dmitry Telegin > CTO, Acutus s.r.o. > Keycloak Consulting and Training > > Pod lipami street 339/52, 130 00 Prague 3, Czech Republic > +42 (022) 888-30-71 > E-mail: info at acutus.pro > > On Fri, 2018-12-28 at 19:01 -0500, Warren, Scott wrote: > > Yeah, I made my original example very simple as I was trying to point out > > the multi-tiered permission issue rather than getting bogged down in the > > myriad of scopes. Users can have 1-to-many scopes across several stores. > > It's not as simple as "if primary store grant this scope set, else grant > > that scope set". Life would be a lot easier if it was :) > > It sounds like a CIP service accessing an external DB is the 'correct' > > answer for this scenario. I see no other clean way to tie > > users->stores->scopes. > > Thanks for your help! > > _______________________________________________ > > keycloak-user mailing list > > keycloak-user at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/keycloak-user > From dt at acutus.pro Fri Jan 4 10:08:43 2019 From: dt at acutus.pro (Dmitry Telegin) Date: Fri, 04 Jan 2019 18:08:43 +0300 Subject: [keycloak-user] Fwd: Multi-tiered Permissions In-Reply-To: References: <1546611938.3690.3.camel@acutus.pro> Message-ID: <1546614523.3690.7.camel@acutus.pro> Hi Pedro, thanks for your input, Is this issue related to the "Resource SPI" you've?mentioned? https://issues.jboss.org/browse/KEYCLOAK-4905 Dmitry On Fri, 2019-01-04 at 12:48 -0200, Pedro Igor Silva wrote: > > > On Fri, Jan 4, 2019 at 12:25 PM Dmitry Telegin
wrote: > > Hi Warren, > > > > Have you ever thought of implementing stores on the Keycloak side? > > > > Off the top of my head, I can suggest implementing them?either as (hierarchical) groups, or using custom JPA entity [1]. > > > > It is not clear if you already have a database with stores or only planning to create and populate it. In the former case you will need to set up proper synchronization of store data to Keycloak; in the latter case the need for an external DB will be eliminated. > > In both cases you will have to implement Admin Console GUI additions [2] to manage user-store-scope associations. > > > > The benefits of this approach: > > - improved manageability - you manage everything in one place, i.e. Keycloak Admin Console; > > - performance - this will eliminate the need to perform calls to an external system per each incoming HTTP request, which might have significant performance impact. Keycloak will already have all the necessary info to evaluate policies. > > > > You can take a look at BeerCloak [3], a complete all-in-one example that contains custom JPA entity, Admin Console customizations and the necessary wiring. I'm already thinking about adding an example authorization policy that would involve custom JPA entities. > > > > To Pedro: I'd also much appreciate your opinion on this approach, so please let me know what you think. > > That would be nice and maybe could help us with an RFE still open around a "Resource SPI". Depending on what you are planning, your proposal could even be much more powerful as it would imply access to claims not only specific to resources but anything available from your database. > ? > > [1] https://www.keycloak.org/docs/latest/server_development/index.html#_extensions_jpa > > [2] https://www.keycloak.org/docs/latest/server_development/index.html#_themes > > [3] https://github.com/dteleguin/beercloak > > > > Dmitry Telegin > > CTO, Acutus s.r.o. > > Keycloak Consulting and Training > > > > Pod lipami street 339/52, 130 00 Prague 3, Czech Republic > > +42 (022) 888-30-71 > > E-mail: info at acutus.pro > > > > On Fri, 2018-12-28 at 19:01 -0500, Warren, Scott wrote: > > > Yeah, I made my original example very simple as I was trying to point out > > > the multi-tiered permission issue rather than getting bogged down in the > > > myriad of scopes. Users can have 1-to-many scopes across several stores. > > > It's not as simple as "if primary store grant this scope set, else grant > > > that scope set". Life would be a lot easier if it was :) > > > It sounds like a CIP service accessing an external DB is the 'correct' > > > answer for this scenario. I see no other clean way to tie > > > users->stores->scopes. > > > Thanks for your help! > > > _______________________________________________ > > > keycloak-user mailing list > > > keycloak-user at lists.jboss.org > > > https://lists.jboss.org/mailman/listinfo/keycloak-user > > From dt at acutus.pro Fri Jan 4 10:21:43 2019 From: dt at acutus.pro (Dmitry Telegin) Date: Fri, 04 Jan 2019 18:21:43 +0300 Subject: [keycloak-user] Run keycloak at root "/" context, not "/auth" In-Reply-To: References: Message-ID: <1546615303.3690.9.camel@acutus.pro> Hello Artem, Changing context path to a non-empty value, i.e. "/foobar", is fully supported via standalone.xml (look for tag under Keycloak subsystem). However, setting it to "/" results in failure to load theme resources. I'm afraid that's not possible at the moment without the changes to Keycloak codebase (may Keycloak devs correct me if I'm wrong). Regards, Dmitry Telegin CTO, Acutus s.r.o. Keycloak Consulting and Training Pod lipami street 339/52, 130 00 Prague 3, Czech Republic +42 (022) 888-30-71 E-mail: info at acutus.pro On Fri, 2019-01-04 at 15:37 +0100, Artem Grebenkin wrote: > Hi folks, > > is it possible to run keycloak at root "/" context, not "/auth" > > Kind regards > Artem > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user From dt at acutus.pro Fri Jan 4 10:28:01 2019 From: dt at acutus.pro (Dmitry Telegin) Date: Fri, 04 Jan 2019 18:28:01 +0300 Subject: [keycloak-user] Realm Custom Attributes In-Reply-To: References: Message-ID: <1546615681.3690.11.camel@acutus.pro> Hello Hariprasad, Keycloak already supports custom realm attributes, it's only that they are not reflected in the GUI. However, you can access them via RealmModel::{get|set}Attribute() methods, or via the REALM_ATTRIBUTE database table. Good luck, Dmitry Telegin CTO, Acutus s.r.o. Keycloak Consulting and Training Pod lipami street 339/52, 130 00 Prague 3, Czech Republic +42 (022) 888-30-71 E-mail: info at acutus.pro On Thu, 2019-01-03 at 18:13 +0530, Hariprasad N wrote: > Hi All, > > Can we add realm level custom attributes. > From swarren at sumglobal.com Fri Jan 4 10:28:26 2019 From: swarren at sumglobal.com (Warren, Scott) Date: Fri, 4 Jan 2019 10:28:26 -0500 Subject: [keycloak-user] Fwd: Multi-tiered Permissions In-Reply-To: <1546611938.3690.3.camel@acutus.pro> References: <1546611938.3690.3.camel@acutus.pro> Message-ID: Hi Dmitry, I really like that idea. Thanks for the suggestion. I'll give it a try. Thanks, Scott On Fri, Jan 4, 2019 at 9:25 AM Dmitry Telegin
wrote: > Hi Warren, > > Have you ever thought of implementing stores on the Keycloak side? > > Off the top of my head, I can suggest implementing them either as > (hierarchical) groups, or using custom JPA entity [1]. > > It is not clear if you already have a database with stores or only > planning to create and populate it. In the former case you will need to set > up proper synchronization of store data to Keycloak; in the latter case the > need for an external DB will be eliminated. > In both cases you will have to implement Admin Console GUI additions [2] > to manage user-store-scope associations. > > The benefits of this approach: > - improved manageability - you manage everything in one place, i.e. > Keycloak Admin Console; > - performance - this will eliminate the need to perform calls to an > external system per each incoming HTTP request, which might have > significant performance impact. Keycloak will already have all the > necessary info to evaluate policies. > > You can take a look at BeerCloak [3], a complete all-in-one example that > contains custom JPA entity, Admin Console customizations and the necessary > wiring. I'm already thinking about adding an example authorization policy > that would involve custom JPA entities. > > To Pedro: I'd also much appreciate your opinion on this approach, so > please let me know what you think. > > [1] > https://www.keycloak.org/docs/latest/server_development/index.html#_extensions_jpa > [2] > https://www.keycloak.org/docs/latest/server_development/index.html#_themes > [3] https://github.com/dteleguin/beercloak > > Dmitry Telegin > CTO, Acutus s.r.o. > Keycloak Consulting and Training > > Pod lipami street 339/52, 130 00 Prague 3, Czech Republic > +42 (022) 888-30-71 > E-mail: info at acutus.pro > > On Fri, 2018-12-28 at 19:01 -0500, Warren, Scott wrote: > > Yeah, I made my original example very simple as I was trying to point out > > the multi-tiered permission issue rather than getting bogged down in the > > myriad of scopes. Users can have 1-to-many scopes across several stores. > > It's not as simple as "if primary store grant this scope set, else grant > > that scope set". Life would be a lot easier if it was :) > > It sounds like a CIP service accessing an external DB is the 'correct' > > answer for this scenario. I see no other clean way to tie > > users->stores->scopes. > > Thanks for your help! > > _______________________________________________ > > keycloak-user mailing list > > keycloak-user at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/keycloak-user > -- Scott G. Warren SUM Global Technology swarren at sumglobal.com 678.469.3455 From psilva at redhat.com Fri Jan 4 10:46:25 2019 From: psilva at redhat.com (Pedro Igor Silva) Date: Fri, 4 Jan 2019 13:46:25 -0200 Subject: [keycloak-user] Fwd: Multi-tiered Permissions In-Reply-To: <1546614523.3690.7.camel@acutus.pro> References: <1546611938.3690.3.camel@acutus.pro> <1546614523.3690.7.camel@acutus.pro> Message-ID: Yeah, it is. On Fri, Jan 4, 2019 at 1:08 PM Dmitry Telegin
wrote: > Hi Pedro, thanks for your input, > > Is this issue related to the "Resource SPI" you've mentioned? > https://issues.jboss.org/browse/KEYCLOAK-4905 > > Dmitry > > On Fri, 2019-01-04 at 12:48 -0200, Pedro Igor Silva wrote: > > > > > On Fri, Jan 4, 2019 at 12:25 PM Dmitry Telegin
wrote: > > > Hi Warren, > > > > > > Have you ever thought of implementing stores on the Keycloak side? > > > > > > Off the top of my head, I can suggest implementing them either as > (hierarchical) groups, or using custom JPA entity [1]. > > > > > > It is not clear if you already have a database with stores or only > planning to create and populate it. In the former case you will need to set > up proper synchronization of store data to Keycloak; in the latter case the > need for an external DB will be eliminated. > > > In both cases you will have to implement Admin Console GUI additions > [2] to manage user-store-scope associations. > > > > > > The benefits of this approach: > > > - improved manageability - you manage everything in one place, i.e. > Keycloak Admin Console; > > > - performance - this will eliminate the need to perform calls to an > external system per each incoming HTTP request, which might have > significant performance impact. Keycloak will already have all the > necessary info to evaluate policies. > > > > > > You can take a look at BeerCloak [3], a complete all-in-one example > that contains custom JPA entity, Admin Console customizations and the > necessary wiring. I'm already thinking about adding an example > authorization policy that would involve custom JPA entities. > > > > > > To Pedro: I'd also much appreciate your opinion on this approach, so > please let me know what you think. > > > > That would be nice and maybe could help us with an RFE still open around > a "Resource SPI". Depending on what you are planning, your proposal could > even be much more powerful as it would imply access to claims not only > specific to resources but anything available from your database. > > > > > [1] > https://www.keycloak.org/docs/latest/server_development/index.html#_extensions_jpa > > > [2] > https://www.keycloak.org/docs/latest/server_development/index.html#_themes > > > [3] https://github.com/dteleguin/beercloak > > > > > > Dmitry Telegin > > > CTO, Acutus s.r.o. > > > Keycloak Consulting and Training > > > > > > Pod lipami street 339/52, 130 00 Prague 3, Czech Republic > > > +42 (022) 888-30-71 > > > E-mail: info at acutus.pro > > > > > > On Fri, 2018-12-28 at 19:01 -0500, Warren, Scott wrote: > > > > Yeah, I made my original example very simple as I was trying to > point out > > > > the multi-tiered permission issue rather than getting bogged down in > the > > > > myriad of scopes. Users can have 1-to-many scopes across several > stores. > > > > It's not as simple as "if primary store grant this scope set, else > grant > > > > that scope set". Life would be a lot easier if it was :) > > > > It sounds like a CIP service accessing an external DB is the > 'correct' > > > > answer for this scenario. I see no other clean way to tie > > > > users->stores->scopes. > > > > Thanks for your help! > > > > _______________________________________________ > > > > keycloak-user mailing list > > > > keycloak-user at lists.jboss.org > > > > https://lists.jboss.org/mailman/listinfo/keycloak-user > > > > From dt at acutus.pro Fri Jan 4 10:49:59 2019 From: dt at acutus.pro (Dmitry Telegin) Date: Fri, 04 Jan 2019 18:49:59 +0300 Subject: [keycloak-user] Registration page and comboboxes In-Reply-To: <2137152622.449907.1546081736355@pim.register.it> References: <2137152622.449907.1546081736355@pim.register.it> Message-ID: <1546616999.3690.13.camel@acutus.pro> Hello Luca, What you're talking about is 100% feasible, but will require some coding. You will need to implement the following: - custom JPA entity [1] to store combobox values; - custom REST resource [2] to enable management via Admin Console + provide the list to the registration page; - Admin Console additions [3] to implement the management GUI; - customized registration page (via custom login theme). I'd also suggest that you take a look at BeerCloak [4], an all-in-one example where all of the above is implemented, except for the last item. I'm planning to do it it maybe in the second half of January. As I see it, the registration page will feature a drop-down with beers for a user to choose a favorite from. [1] https://www.keycloak.org/docs/latest/server_development/index.html#_extensions_jpa [2] https://www.keycloak.org/docs/latest/server_development/index.html#_extensions_rest [3] https://www.keycloak.org/docs/latest/server_development/index.html#_themes [4] https://github.com/dteleguin/beercloak Cheers, Dmitry Telegin CTO, Acutus s.r.o. Keycloak Consulting and Training Pod lipami street 339/52, 130 00 Prague 3, Czech Republic +42 (022) 888-30-71 E-mail: info at acutus.pro On Sat, 2018-12-29 at 12:08 +0100, Luca Stancapiano wrote: > I have a registration page in a Keycloak theme where the user has to choose from a list from a combobox. This list is dynamic, meaning it could be changed by an administrator at any time. What is the best way to manage this list with Keycloak? Can I use the administrative console to update this data? If you are on which component? > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user From or at myobligo.com Fri Jan 4 11:09:20 2019 From: or at myobligo.com (Or Harary) Date: Fri, 4 Jan 2019 18:09:20 +0200 Subject: [keycloak-user] Conflicting scopes in permissions always gets deny, maybe this should be configurable? Message-ID: Hey, Let's say I want to allow creating custom roles with custom permission on scopes (to allow access to multiple resource types and actions). So per role, I wanted to create a matching permission with the allowed scopes (resource-type-foo-create/resource-type-bar-create/etc..) and policies accordingly (role/client/user/group). So if I have: Role A Allowed: foo-create, foo-read, bar-read Role B Allowed: foo-read, bar-read Because they have conflicting scopes, foo-read always gets denied. So as I see, it can't be done this way. Maybe there should be a Decision Strategy to permissions evaluation like in a single permission with policies? Thanks, Or From hariprasad.n at ramyamlab.com Sat Jan 5 01:35:13 2019 From: hariprasad.n at ramyamlab.com (Hariprasad N) Date: Sat, 5 Jan 2019 12:05:13 +0530 Subject: [keycloak-user] Realm Custom Attributes In-Reply-To: <1546615681.3690.11.camel@acutus.pro> References: <1546615681.3690.11.camel@acutus.pro> Message-ID: Hi Dmitry Telegin, Thanks for reply. I want to save some custom attributes against each realm in REALM_ATTRIBUTE table. I have added one custom attribute by modifying realm-detail.html refer attached screenshot yellow hi-lighted one. for that custom attribute I given id 'displayNameTest' but when I save getting response code from server 400 (Bad request) with error msg '*Unrecognized field "displayNameTest" (class org.keycloak.representations.idm.RealmRepresentation), not marked as ignorable**' *. I think some where you are validating the filednames/id. As a developer i know about REALM_ATTRIBUTE table but our clients don't know, they want to add some custom fields in admin console itself. I we add new Tab(like General, Login, Keys ) say 'Attributes' it would be better. Please help me in this. Regards Hari Prasad N On Fri, Jan 4, 2019 at 8:58 PM Dmitry Telegin
wrote: > Hello Hariprasad, > > Keycloak already supports custom realm attributes, it's only that they are > not reflected in the GUI. However, you can access them via > RealmModel::{get|set}Attribute() methods, or via the REALM_ATTRIBUTE > database table. > > Good luck, > Dmitry Telegin > CTO, Acutus s.r.o. > Keycloak Consulting and Training > > Pod lipami street 339/52, 130 00 Prague 3, Czech Republic > +42 (022) 888-30-71 > E-mail: info at acutus.pro > > On Thu, 2019-01-03 at 18:13 +0530, Hariprasad N wrote: > > Hi All, > > > > Can we add realm level custom attributes. > > > -- Thanks & Regards, Hari Prasad N Senior Software Engineer ------------------------------------------------- Ramyam Intelligence Lab Pvt. Ltd., Part of Arvato 3rd & 5th Floors, Mithra Towers, 10/4, Kasturba Road, Bangalore ? 560001, Karnataka, India. Phone: +91 80 67269266 Mobile: +91 7022156319 E-Mail: *hariprasad.n at ramyamlab.co m* *www.ramyamlab.com* -------------- next part -------------- A non-text attachment was scrubbed... Name: image.PNG Type: image/png Size: 51162 bytes Desc: not available Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20190105/ac34bb7d/attachment-0001.png From tom at spicule.co.uk Sat Jan 5 06:26:33 2019 From: tom at spicule.co.uk (Tom Barber) Date: Sat, 5 Jan 2019 03:26:33 -0800 Subject: [keycloak-user] Mapping in additional user roles Message-ID: Hi folks, This may have a simple answer in which case I apologise. I?ve been tasked with fronting some web apps with Keycloak connected via SAML to AD FS as the ID provider. I found this http://blog.keycloak.org/2017/03/how-to-setup-ms-ad-fs-30-as-brokered.html so planned to do similar. The next issue I face is that the AD FS service is hosted by a different entity and we don?t have the ability to change yet we need to map roles in. What extension points are there available to us in Keycloak that allows a user to login but then have us assign roles by looking them up in a *different* AD server and pulling their roles from there? Thanks Tom -- Spicule Limited is registered in England & Wales. Company Number: 09954122. Registered office: First Floor, Telecom House, 125-135 Preston Road, Brighton, England, BN1 6AF. VAT No. 251478891. All engagements are subject to Spicule Terms and Conditions of Business. This email and its contents are intended solely for the individual to whom it is addressed and may contain information that is confidential, privileged or otherwise protected from disclosure, distributing or copying. Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Spicule Limited. The company accepts no liability for any damage caused by any virus transmitted by this email. If you have received this message in error, please notify us immediately by reply email before deleting it from your system. Service of legal notice cannot be effected on Spicule Limited by email. From tom at spicule.co.uk Sat Jan 5 06:38:50 2019 From: tom at spicule.co.uk (Tom Barber) Date: Sat, 5 Jan 2019 03:38:50 -0800 Subject: [keycloak-user] Mapping in additional user roles In-Reply-To: References: Message-ID: Actually, Would creating a script mapper, doing an LDAP lookup on the other AD server and processing the response into the roles work? IE can you extend the users roles from within a script mapper? Thanks Tom On 5 January 2019 at 11:26:33, Tom Barber (tom at spicule.co.uk) wrote: Hi folks, This may have a simple answer in which case I apologise. I?ve been tasked with fronting some web apps with Keycloak connected via SAML to AD FS as the ID provider. I found this http://blog.keycloak.org/2017/03/how-to-setup-ms-ad-fs-30-as-brokered.html so planned to do similar. The next issue I face is that the AD FS service is hosted by a different entity and we don?t have the ability to change yet we need to map roles in. What extension points are there available to us in Keycloak that allows a user to login but then have us assign roles by looking them up in a *different* AD server and pulling their roles from there? Thanks Tom -- Spicule Limited is registered in England & Wales. Company Number: 09954122. Registered office: First Floor, Telecom House, 125-135 Preston Road, Brighton, England, BN1 6AF. VAT No. 251478891. All engagements are subject to Spicule Terms and Conditions of Business. This email and its contents are intended solely for the individual to whom it is addressed and may contain information that is confidential, privileged or otherwise protected from disclosure, distributing or copying. Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Spicule Limited. The company accepts no liability for any damage caused by any virus transmitted by this email. If you have received this message in error, please notify us immediately by reply email before deleting it from your system. Service of legal notice cannot be effected on Spicule Limited by email. From sursma at yahoo.com Sat Jan 5 08:26:30 2019 From: sursma at yahoo.com (Suresh Mali) Date: Sat, 5 Jan 2019 13:26:30 +0000 (UTC) Subject: [keycloak-user] getting resource owner and loggedin (identity) user attributes in evaluation context References: <540021160.6603690.1546694790823.ref@mail.yahoo.com> Message-ID: <540021160.6603690.1546694790823@mail.yahoo.com> Each user has one or more resource e.g. 'account' Each user is assigned one or more? agents.? (agent is different user in the system with role agent) I have added them in user attributes?e.g?let us say? there is user_a? ?who has account resource there are users with agent roles? say? 'agent_a', 'agent_b', 'agent_c' In user_a? is attribute? I have added attribute allowed_agents =? [ 'agent_a' ,'agent_b'] in agent_a & agent_b? have attibutes? allowed_users =? ['user_a']?Now in policy evaluation? ?I want to ensure when agent_a & agent_b? try to access resource owned by user_a? they are allowed while agent_c is not allowed how do I access resource owners? attributes? and? or? identity ownes attributes I want to write a evaluation like?something like this? is it possible to get?$permission.resource.owner.attributes["allowed_agent"]to return ['agent_a','agent_b']or?$identity.attributes['allowed_users']??to return ['user_a']? ?so that I can evaluate the match something like beowrule "Authorize Resource Owner"? ? ? dialect "mvel"? ? ? when? ? ? ? ?$evaluation : Evaluation(? ? ? ? ? ? ?$identity: context.identity,? ? ? ? ? ? ?$permission: permission,? ? ? ? ? ? ?$permission.resource.owner.attribute['allowed_agents'].indexOf($identity.id) ? ? ? ?)? ? ? then? ? ? ? ? $evaluation.grant();? end? From dt at acutus.pro Sat Jan 5 10:28:21 2019 From: dt at acutus.pro (Dmitry Telegin) Date: Sat, 05 Jan 2019 18:28:21 +0300 Subject: [keycloak-user] getting resource owner and loggedin (identity) user attributes in evaluation context In-Reply-To: <540021160.6603690.1546694790823@mail.yahoo.com> References: <540021160.6603690.1546694790823.ref@mail.yahoo.com> <540021160.6603690.1546694790823@mail.yahoo.com> Message-ID: <1546702101.6385.1.camel@acutus.pro> Hello Suresh, I've experimented a bit with JavaScript policy, I hope with Drools things will be similar. You can obtain a user's custom attributes using the following expression: var attrs = $evaluation.realm.getUserAttributes(id); where id is either $evaluation.context.identity.id (the user being authorized) or $evaluation.permission.resource.owner (UMA resource owner). Hope this helps, Dmitry Telegin CTO, Acutus s.r.o. Keycloak Consulting and Training Pod lipami street 339/52, 130 00 Prague 3, Czech Republic +42 (022) 888-30-71 E-mail: info at acutus.pro On Sat, 2019-01-05 at 13:26 +0000, Suresh Mali wrote: > Each user has one or more resource e.g. 'account' > Each user is assigned one or more? agents.? (agent is different user in the system with role agent) > I have added them in user attributes?e.g?let us say? there is user_a? ?who has account resource > there are users with agent roles? say? 'agent_a', 'agent_b', 'agent_c' > In user_a? is attribute? I have added attribute > allowed_agents =? [ 'agent_a' ,'agent_b'] > in agent_a & agent_b? have attibutes? > allowed_users =? ['user_a']?Now in policy evaluation? ?I want to ensure when agent_a & agent_b? try to access resource owned by user_a? they are allowed while agent_c is not allowed > how do I access resource owners? attributes? and? or? identity ownes attributes > I want to write a evaluation like?something like this? > is it possible to get?$permission.resource.owner.attributes["allowed_agent"]to return ['agent_a','agent_b']or?$identity.attributes['allowed_users']??to return ['user_a']? ?so that I can evaluate the match > something like beowrule "Authorize Resource Owner"? > ? ? dialect "mvel"? > ? ? when? > ? ? ? ?$evaluation : Evaluation(? > ? ? ? ? ? ?$identity: context.identity,? > ? ? ? ? ? ?$permission: permission,? > ? ? ? ? ? ?$permission.resource.owner.attribute['allowed_agents'].indexOf($identity.id) > ? ? ? ?)? > ? ? then? > ? ? ? ? $evaluation.grant();? > end? > > > > > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user From or at myobligo.com Sun Jan 6 08:12:39 2019 From: or at myobligo.com (Or Harary) Date: Sun, 6 Jan 2019 15:12:39 +0200 Subject: [keycloak-user] Can't request resource permissions by resource name by service account client and not user In-Reply-To: References: Message-ID: Please help anyone? Here is another example: I have 2 clients - "ClientA" and "ClientB". Both of them are confidential resource servers. "ClientA" has "ResourceA", which is owned by "ClientA", and it has a pemission to grant access to everyone. (script - $evaluation.grant()) I'm getting a bearer token for "ClientB" using client_credentials, and then i'm trying to check if "ClientB" has permissions to access "ResourceA" in "ClientA" like this: curl -X POST http://keycloak:8080/auth/realms/myrealm/protocol/openid-connect/token \ -H "Authorization: Bearer {access_token}" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "grant_type=urn:ietf:params:oauth:grant-type:uma-ticket&audience=ClientA&permission=ResourceA&response_mode=permissions" This gives me a resource not found error. But, if I search by the ID or the resource, in the "permission" param, like this: "permission={RESOURCE_UUID}", it does work. Shouldn't it be possible check by the name, if the check by id works? On Thu, Jan 3, 2019 at 6:24 PM Or Harary wrote: > Hey, > > I'm using version 4.8.1 and i'm trying to check resource permissions on > another client with the token endpoint, by the resource name, with a > client's access token, and i'm getting "Resource with id [{resourceId}] > does not exist". > > I have a service account client "foobarservice". I want this service > account client, to check his permissions on a "foobaresource" resource from > another client "otherservice". > > myrealm > -- "foobarservice" Service Account Client > -- -- foobar resource (with always grant policy and permission) > -- "otherservice" Service Account Client > > I did "client_credentials" login with the "foobarservice" and got an > access_token. With that token, I tried: > > curl -X POST > http://keyclok:8080/auth/realms/myrealm/protocol/openid-connect/token \ > -H "Authorization: Bearer {foobarservice_access_token}" \ > -H "Content-Type: application/x-www-form-urlencoded" \ > --data > "grant_type=urn:ietf:params:oauth:grant-type:uma-ticket&audience=otherservice&permission=foobaresource&response_mode=permissions" > > And got 400 bad request with the not found error. > > When i'm doing the same request with some user's token, it works well. > > I looked into the code (my knowledge of JAVA is very basic) and it seems > to be because of this: > > https://github.com/keycloak/keycloak/blob/f4f68438870768ac6cc18012cfae278f9ac1e163/services/src/main/java/org/keycloak/authorization/authorization/AuthorizationTokenService.java#L421 > > Is this the expected behavior? or a bug? Because when I used version 3.4 > it did work > > Thanks, > Or > From codelkirby at gmail.com Sun Jan 6 18:15:35 2019 From: codelkirby at gmail.com (Cono D'Elia) Date: Sun, 6 Jan 2019 18:15:35 -0500 Subject: [keycloak-user] No Default theme - Null Pointer Exception Message-ID: Hi All: My use case was to automatically direct the user to a custom theme depending on the device they are using e.g: native mobile vs other. The theme selector will make a decision based on User Agent and direct the end-user accordingly. I created a theme selector based on the source code snippets provided from https://www.keycloak.org/docs/latest/server_development/index.html#_providers. I basically did a copy and paste. I was able to deploy the theme and it appeared in the Provider's tab in the Admin console. I copied the base theme as 'my-theme'. When I restart the Keycloak server it fails to start throwing an NPE indicating that there is No Default theme. I was wondering if I needed any other code or configuration that is not stated in that particular section to get this going? I couldn't find a working sample online, so if I can be directed to one that would be great. Thanks a bunch! Chuck. From Leigh.Kennedy at qlik.com Sun Jan 6 21:59:32 2019 From: Leigh.Kennedy at qlik.com (Leigh Kennedy) Date: Mon, 7 Jan 2019 02:59:32 +0000 Subject: [keycloak-user] keycloak helm chart SSL configuration Message-ID: Hi, I have been using keycloak for a while via the helm chart. IT has been working find using http. However I am trying to get it to use a certificate. I have struggled to find any clear documentation on how to do this. This is what I have at the moment (you can see commented out a few things I have tried. keycloak: username: test password: xxx service: nodePort: 32666 type: NodePort persistence: deployPostgres: false dbVendor: postgres dbName: keycloak dbHost: qmi-minikube.local.net dbPort: 5432 dbUser: test dbPassword: xxx #extraEnv: | # - name: PROXY_ADDRESS_FORWARDING # value: "true" ingress: enabled: true # annotations: #kubernetes.io/ingress.global-static-ip-name: "keycloak-static-ip" # kubernetes.io/ingress.allow-http: "false" # ingress.kubernetes.io/ssl-redirect: "true" path: /auth hosts: - keycloak.elastic.example tls: - hosts: - keycloak.elastic.example secretName: elastic-example-tls Can anyone see what I am doing wrong here? I know my certificate is ok as I use it in another nginx ingress config (not running while this one is) and It works fine. Thanks. Leigh Kennedy From gperier at gmail.com Mon Jan 7 03:12:13 2019 From: gperier at gmail.com (Gwenael Perier) Date: Mon, 7 Jan 2019 09:12:13 +0100 Subject: [keycloak-user] [Api][Configuration]Create user from API rest : 401 Unauthorized Message-ID: Hi everybody, I tried to create a user from the rest API : I've got my token from my client : curl -X POST " https://mykeycloak.io/auth/realms/myrealkm/protocol/openid-connect/token" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "client_secret=xxxxxxxxxxxxxx" \ -d 'grant_type=client_credentials' \ -d 'client_id=myclient-openid' and i tried to create an user : curl -X POST 'https://mykeycloak.io/auth/admin/realms/site5.bayardev.com/users' -H 'Authorization: Bearer MYACCESSTOKEN" -H 'Content-Type: application/json' -d '{"username":"cjbarker5","enabled":true,"emailVerified":false,"firstName":"CJ","lastName":"Barker","credentials":{"type":"password","value":"newPas1*","temporary":false}}' -v And i get only : HTTP/1.1 401 Unauthorized I tried to configure my client with roles (manage-users) Full Scope is Allowed. I don't know what to do for add the possibility to my client to add user in keycloak. Thanks for any advice. From slaskawi at redhat.com Mon Jan 7 03:22:22 2019 From: slaskawi at redhat.com (Sebastian Laskawiec) Date: Mon, 7 Jan 2019 09:22:22 +0100 Subject: [keycloak-user] Java 11 (Docker container base) In-Reply-To: References: Message-ID: It depends what do you mean by saying "underlying architecture". I assume, you are interested in a situation when you run a Keycloak container on Mac or Windows and you're not referring to the CPU architecture for example. If my understanding is correct, yes, everything should work till 2023 (but as Stian said, it is very likely we will move to JDK11 faster than that). Here's another link that might explain this thing a little bit: https://developers.redhat.com/blog/2018/09/24/the-future-of-java-and-openjdk-updates-without-oracle-support/ On Thu, Jan 3, 2019 at 3:40 PM Chris Brandhorst wrote: > Sebastian, > > The link [1] only shows support on RHEL and Windows environments. Do you > mean to say the 2023 date is also valid for OpenJDK running in the > Docker-version of Keycloak, regardless of underlying architecture? > > [1] https://access.redhat.com/articles/1299013 > > Chris > > > >From the support perspective, Red Hat offers extended support till June > > 2023 [1]. > > > > Our move towards JDK11 (LTS) relies heavily on Wildfly/EAP Team. I guess > we > > still have plenty of time to do the switch, so I wouldn't rush things too > > much. > > > > BTW, why do you need JDK11, especially in the container? > > > > [1] https://access.redhat.com/articles/1299013 > > > >> On Tue, Oct 23, 2018 at 1:13 PM Pavel Micka > wrote: > >> > >> Sorry, end of january (my fault): > >> https://www.oracle.com/technetwork/java/eol-135779.html. Then Oracle > Java > >> and OpenJDK will most probably start to diverge, as OpenJDK will not > have > >> access to Oracle repos (afaik). So the speed of security fixes will > depend > >> on willigness of community to fix the upcomming issues. > >> > >> Pavel > >> > >> > >> From: Meissa M'baye Sakho > >> Sent: Tuesday, October 23, 2018 11:04 AM > >> To: Pavel Micka > >> Cc: keycloak-user > >> Subject: Re: [keycloak-user] Java 11 (Docker container base) > >> > >> Hello, > >> Pavel, where did you get the information that the official Java 8 > support > >> will cease at the end of december? > >> https://access.redhat.com/articles/1299013 > >> https://www.oracle.com/technetwork/java/javase/eol-135779.html > >> Meissa > >> > >> Le lun. 22 oct. 2018 ? 16:33, Pavel Micka >> Pavel.Micka at zoomint.com>> a ?crit : > >> Hello everyone, > >> > >> What is the plan for Java 11 support? The point is that current versions > >> of Docker containers are based on OpenJDK 8, but the official Java 8 > >> support will cease at the end of December. Will Keycloak use Java 11 by > >> that time or will it rely on updates provided by the community. > >> > >> This is important to us, as Keycloak is important part of our app > security. > >> > >> Thanks, > >> > >> Pavel > >> > >> // I have found this ticket in Jira, but it does not provide too many > >> details: https://issues.jboss.org/browse/KEYCLOAK-7811 > >> _______________________________________________ > >> keycloak-user mailing list > >> keycloak-user at lists.jboss.org 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 > > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user From hariprasad.n at ramyamlab.com Mon Jan 7 07:03:14 2019 From: hariprasad.n at ramyamlab.com (Hariprasad N) Date: Mon, 7 Jan 2019 17:33:14 +0530 Subject: [keycloak-user] Common Client among multiple Realm Message-ID: Hi All, Can I have common client among multiple realms. As per our product requirement we have to maintain multiple Tenants hence multiple Realms, each Realm should have client with id 'enliven-ui' and same client configuration. The problem with this approach is when ever there is change in client config. examples: 1. Root URL is changed, 2. Redirect URL changed, 3. In Authorization I want to add new Resource/Policy/Permission/Scope. Then I have to go admin console, then go to each individual realm and select client 'enliven-ui' do the require changes or using admin REST API do changes in each Realm programatically. Instead of this can I have common client. -- Thanks & Regards, Hari Prasad N Senior Software Engineer ------------------------------------------------- Ramyam Intelligence Lab Pvt. Ltd., Part of Arvato 3rd & 5th Floors, Mithra Towers, 10/4, Kasturba Road, Bangalore ? 560001, Karnataka, India. Phone: +91 80 67269266 Mobile: +91 7022156319 E-Mail: *hariprasad.n at ramyamlab.co m* *www.ramyamlab.com* From slaskawi at redhat.com Mon Jan 7 09:13:45 2019 From: slaskawi at redhat.com (Sebastian Laskawiec) Date: Mon, 7 Jan 2019 15:13:45 +0100 Subject: [keycloak-user] Using Self Signed Certificate for SSL with Keycloak as authenticator In-Reply-To: References: Message-ID: I'm not sure about your setup but oftentimes, it's the other way around. A client browser (or an application) initiates a connection to Keycloak (in order to obtain or verify a token). This kind of setup requires setting up a Keycloak instance with a keystore. This two links should show you how to configure it [1]. [1] https://docs.jboss.org/author/display/WFLY10/Admin+Guide#AdminGuide-EnableSSL [2] https://www.keycloak.org/docs/latest/server_admin/index.html#_ssl_modes On Wed, Dec 19, 2018 at 10:11 AM Kunal Kumar wrote: > Hi all, > > I'd like to know if Keycloak is able to be connected to my test web app, > which is currently running on a self signed certificate instead of an > officially signed one? > > Regards, > Kunal Kumar > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user > From gperier at gmail.com Mon Jan 7 09:37:24 2019 From: gperier at gmail.com (Gwenael Perier) Date: Mon, 7 Jan 2019 15:37:24 +0100 Subject: [keycloak-user] [Api][Configuration]Create user from API rest : 401 Unauthorized In-Reply-To: References: Message-ID: Hi, I try the basics tutorial and multiple configuration from : https://github.com/v-ladynev/keycloak-nodejs-example. I can login into my clients with client_credentials without problems or login into the admin account with admin-cli client but after i always have a 401 Unauthorized. I tried to list (realms / users) , to create users , etc ..... It's how i intented to do it : #!/bin/bash ## there are these needed properties: export KEYCLOAK_ADMIN_USERNAME=admin export KEYCLOAK_PASSWORD=password ## get admin TKN echo "* Request for Admin authorization" export TKN=$(curl -k -X POST 'https://my.keycloak.io/auth/realms/master/protocol/openid-connect/token' \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "username=$KEYCLOAK_ADMIN_USERNAME" \ -d "password=$KEYCLOAK_PASSWORD" \ -d 'grant_type=password' -d 'client_id=admin-cli' | jq -r '.access_token') echo $TKN; realms=`curl -v https://my.keycloak.io/auth/admin/realms/ -H "Content-Type: application/json" -H "Authorization: Bearer $TKN" | jq -r ".[].realm"` echo "* List Realms" echo $realms ## create user - it won't take the password and IDP's into account #curl -v -k -X POST 'https://my.keycloak.io/auth/admin/realms/master/users' \ #-H "Accept: application/json" \ #-H "Content-Type:application/json" \ #-H "Authorization: Bearer $TKN_CLIENT" -d '{"username" : "test", "enabled": true, "email" : "test at test.com", "firstName": "John", "lastName": "Doe", "realmRoles": [ "offline_access" ] }' | jq . ## get user ID by username #userId=$(curl -k -H "Authorization: Bearer $TKN" 'https://my.keycloak.io/auth/admin/realms/master/users' | jq -r '.[] | select(.username=="admin") | .id') thanks in advance for your advice. On Mon, 7 Jan 2019 at 09:12, Gwenael Perier wrote: > Hi everybody, > > I tried to create a user from the rest API : > I've got my token from my client : > > curl -X POST " > https://mykeycloak.io/auth/realms/myrealkm/protocol/openid-connect/token" > \ > -H "Content-Type: application/x-www-form-urlencoded" \ > -d "client_secret=xxxxxxxxxxxxxx" \ > -d 'grant_type=client_credentials' \ > -d 'client_id=myclient-openid' > > and i tried to create an user : > > curl -X POST > 'https://mykeycloak.io/auth/admin/realms/site5.bayardev.com/users' -H > 'Authorization: Bearer MYACCESSTOKEN" -H 'Content-Type: application/json' > -d > '{"username":"cjbarker5","enabled":true,"emailVerified":false,"firstName":"CJ","lastName":"Barker","credentials":{"type":"password","value":"newPas1*","temporary":false}}' > -v > > And i get only : HTTP/1.1 401 Unauthorized > > I tried to configure my client with roles (manage-users) Full Scope is > Allowed. > > I don't know what to do for add the possibility to my client to add user > in keycloak. > > Thanks for any advice. > > From sursma at yahoo.com Mon Jan 7 15:11:05 2019 From: sursma at yahoo.com (Suresh Mali) Date: Mon, 7 Jan 2019 20:11:05 +0000 (UTC) Subject: [keycloak-user] rest api to get resource permission evalauted References: <1061957605.7583728.1546891865904.ref@mail.yahoo.com> Message-ID: <1061957605.7583728.1546891865904@mail.yahoo.com> I have created resources via api? for a users?{kc-host}:{kc-port}/auth/realms/{realm}/authz/protection/resource_set/ I have created policy which decides based on the relation between the resource owner and identity user like thisvar identity_user = $evaluation.context.identity.id;var resource_owner = $evaluation.permission.resource.getOwner(); var identity_user_attrs = $evaluation.realm.getUserAttributes(resource_owner) ;var allowed_agents = identity_user_attrs.allowed_agents ;if ( resource_owner == identity_user ){? ? $evaluation.grant();? ??}else if (allowed_agents !== null && allowed_agents[0].indexOf(identity_user) > -1 ) {? ? $evaluation.grant();} else {? ? $evaluation.deny();} I am able to evaluate the permission for various users & (agent users) on keycloak admin console in realm->client->autherization->evaluation tab It is evaluating properly How can I get same permission/ deny from a rest api so that I can call from my client on behalf of identity user with identity users access token as autherization (or other method or autherization) either simple permitted/deny or ?"permissions": [? ? ? {? ? ? ? "scopes": [? ? ? ? ? "read"? ? ? ? ],? ? ? ? "rsid": "e1617f7c-dffe-42c9-b91f-476e8a810c4a",? ? ? ? "rsname": "kyc1"? ? ? }? ? ] kind of output is required I tried {kc-host}:{kc-port}/auth/realms/{realm}//authz/protection/permission I get opaque permission ticket, how can I decode this? thank you Suresh From uo67113 at gmail.com Tue Jan 8 03:35:32 2019 From: uo67113 at gmail.com (=?UTF-8?Q?Luis_Rodr=C3=ADguez_Fern=C3=A1ndez?=) Date: Tue, 8 Jan 2019 09:35:32 +0100 Subject: [keycloak-user] SSL connection to Keycloak Server In-Reply-To: References: Message-ID: Hello Kunal, It looks like you have to update the "Valid Redirect URIs" field in your client application, see [1]. Hope it helps, Luis [1] https://www.keycloak.org/docs/latest/server_admin/index.html#_clients El mi?., 2 ene. 2019 a las 11:28, Kunal Kumar () escribi?: > Hi Luis, > > I am trying to configure SSL for Keycloak. I have already followed all the > steps, configurations in standalone.xml, and also creating and authorizing > the necessary certificates as well. But when connecting to my web app, it > has this particular error as in the attached file > > Are you familiar with this error? > > Regards, > Kunal > -- "Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better." - Samuel Beckett From nikola.malenic at netsetglobal.rs Tue Jan 8 04:07:36 2019 From: nikola.malenic at netsetglobal.rs (Nikola Malenic) Date: Tue, 8 Jan 2019 10:07:36 +0100 Subject: [keycloak-user] Authorization of action in application (client of KC) In-Reply-To: <1545398995.2097.10.camel@acutus.pro> References: <01e201d4987c$b8cd83b0$2a688b10$@netsetglobal.rs> <1545398364.2097.8.camel@acutus.pro> <1545398995.2097.10.camel@acutus.pro> Message-ID: <007301d4a731$98fc88b0$caf59a10$@netsetglobal.rs> Thank you very much, Dmitry. It seems that there is no any progress on this still so I'll probably have to implement something myself. Maybe I should start by defining custom endpoint where users would be redirected to enter the OTP, not leveraging authentication SPI at all, what do you think? Best regards, Nikola -----Original Message----- From: Dmitry Telegin [mailto:dt at acutus.pro] Sent: Friday, December 21, 2018 2:30 PM To: Nikola Malenic ; keycloak-user at lists.jboss.org Subject: Re: [keycloak-user] Authorization of action in application (client of KC) Sorry, forgot the link: https://www.keycloak.org/docs/latest/server_development/index.html#_action_token_spi Dmitry On Fri, 2018-12-21 at 16:19 +0300, Dmitry Telegin wrote: > Hello Nikola, > > On Thu, 2018-12-20 at 16:57 +0100, Nikola Malenic wrote: > > I have an use case where I have to authorize an action in my > > application taken by the user. Here is how it should go: > > > > The user is logged in at KC and using my application. Now, my > > application would need to authorize one user action by sending the > > user to KC, where he would enter his OTP, and then, my application > > would get some kind of proof that user authorized the action (I > > don't know what should that be, yet). > > Seems like what you want is "step-up authentication". It's been on the > list since 2014, but AFAIK still no progress to the moment: > https://issues.jboss.org/browse/KEYCLOAK-847 > https://issues.jboss.org/browse/KEYCLOAK-4182 > http://lists.jboss.org/pipermail/keycloak-dev/2017-April/009245.html > > I'm also adding Thomas Darimont to CC: as probably no one knows this > topic better than he does. > > > Do you have any idea how this could be achieved using KC? I guess > > action SPI would somehow be used. > > If you're talking about Action Token SPI [1], I'm afraid this is not > much relevant here. Action tokens are issued by Keycloak and allow > users to perform special actions like password reset. OTOH, your case > is about conditionally executing a part of authentication flow on the > client's request. > > Cheers, > Dmitry Telegin > CTO, Acutus s.r.o. > Keycloak Consulting and Training > > Pod lipami street 339/52, 130 00 Prague 3, Czech Republic > +42 (022) 888-30-71 > E-mail: info at acutus.pro > > > > > > > > > Thank you in advance, > > > > Nikola > > > > > > > > _______________________________________________ > > 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 From craig at baseventure.com Tue Jan 8 09:27:34 2019 From: craig at baseventure.com (Craig Setera) Date: Tue, 8 Jan 2019 08:27:34 -0600 Subject: [keycloak-user] Change target after password change? Message-ID: Our current application uses PWM for password management tasks. We use their activation flow to set a password and also the forgotten password flow to change the password. In each of those cases, it is possible to specify the page to redirect to once the flow has been completed. This is used by us to redirect them back to our application. Is there anything similar for Keycloak? Right now, it seems like all of these flows end up in the account management interface. Thanks, Craig ================================= *Craig Setera* *Chief Technology Officer* From Christian.Sandmeier at vivai.de Tue Jan 8 11:57:20 2019 From: Christian.Sandmeier at vivai.de (Christian Sandmeier) Date: Tue, 8 Jan 2019 16:57:20 +0000 Subject: [keycloak-user] UMA Share Resource with a User via AuthZ Client Message-ID: <409BDDA6-73AD-4D11-800E-E994D0FCD122@vivai.de> Hi All, first of all Thanks for the great work. I have been using Keycloak in a Project for a couple of Months now and really like it. I started to try out the UMA 2.0 Flow because it would be very nice to be able to share a resource with other Users. Given the following 4 Steps, i don't understand why the Permissions are not in the RPT token // Code for Steps 1 and 2 taken from here // https://github.com/keycloak/keycloak/blob/master/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/authz/UserManagedPermissionServiceTest.java // Code for Steps 3 and 4 taken from here // https://www.keycloak.org/docs/latest/authorization_services/index.html#obtaining-user-entitlements 1) Creating a Resource "Resource A" with Owner "demo" ResourceRepresentation resource = new ResourceRepresentation(); resource.setName("Resource A"); resource.setOwnerManagedAccess(true); resource.setOwner("demo"); resource.addScope("Scope A"); resource = getAuthzClient().protection().resource().create(resource); 2) Creating the User Permission for User "test" UmaPermissionRepresentation newPermission = new UmaPermissionRepresentation(); newPermission.setName("User-Managed Permission"); newPermission.setDescription("User is allowed to access"); newPermission.addScope("Scope A"); newPermission.addUser("test"); ProtectionResource protection = getAuthzClient().protection("demo", "demo"); UmaPermissionRepresentation permission = protection.policy(resource.getId()).create(newPermission); 3) get a RPT for the User "test" for all Resources AuthzClient authzClient = AuthzClient.create(); AuthorizationRequest request = new AuthorizationRequest(); AuthorizationResponse response = authzClient.authorization("test", "test").authorize(request); String rpt = response.getToken(); 4) Listing the Permissions TokenIntrospectionResponse requestingPartyToken = authzClient.protection().introspectRequestingPartyToken(rpt); System.out.println("Token status is: " + requestingPartyToken.getActive()); System.out.println("Permissions granted by the server: "); for (Permission granted : requestingPartyToken.getPermissions()) { System.out.println(granted); } The Resource and Permission are saved correctly, i can correctly read them via the AuthZ Client but now i would assume that the Permission is in the RPT of the User "test". Is this Assumption maybe already incorrect and i got a bit lost? Or is there probably a problem in my Code because the Permission should be listed there? Btw. if i skip Step 2) and instead share the the Resource with the User in the "Keycloak -> My Account-> My Resources" Page, it works. But not with the UmaPermissionRepresentation. Thank you in Advance Best regards, Christian Sandmeier From lahari.guntha at tcs.com Wed Jan 9 01:00:09 2019 From: lahari.guntha at tcs.com (Lahari Guntha) Date: Wed, 9 Jan 2019 06:00:09 +0000 Subject: [keycloak-user] Keycloak with volume Mount Message-ID: <63a5369243dc4e4eae1f41ba0c1422cd@tcs.com> Hi All, I have launched keycloak as a container in a Virtual Machine. I have created Realms and configured clients to have SSO enabled for them. For some reason I got to restart the Docker in the VM in which I have this keycloak container. When I restarted docker service all the Configuration that was made earlier like the clients that I have configured are lost. Can we make it persistent? Can we have any mount point so that we can save the data onto host and then bring up the container with the mount point? Thanks and Regards, Lahari G =====-----=====-----===== Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you From jernej.porenta at 3fs.si Wed Jan 9 03:53:20 2019 From: jernej.porenta at 3fs.si (Jernej Porenta) Date: Wed, 9 Jan 2019 09:53:20 +0100 Subject: [keycloak-user] Keycloak with volume Mount In-Reply-To: <63a5369243dc4e4eae1f41ba0c1422cd@tcs.com> References: <63a5369243dc4e4eae1f41ba0c1422cd@tcs.com> Message-ID: <784BE309-8B17-4B83-8F53-2C92353CD679@3fs.si> Hey, you should use one of the persistent database options, but if you insist on using h2: https://github.com/jhipster/generator-jhipster/issues/7157#issuecomment-367813386 br, Jernej > On 9 Jan 2019, at 07:00, Lahari Guntha wrote: > > Hi All, > > > I have launched keycloak as a container in a Virtual Machine. I have created Realms and configured clients to have SSO enabled for them. > > For some reason I got to restart the Docker in the VM in which I have this keycloak container. When I restarted docker service all the Configuration that was made earlier like the clients that I have configured are lost. > > Can we make it persistent? Can we have any mount point so that we can save the data onto host and then bring up the container with the mount point? > > > Thanks and Regards, > > Lahari G > =====-----=====-----===== > Notice: The information contained in this e-mail > message and/or attachments to it may contain > confidential or privileged information. If you are > not the intended recipient, any dissemination, use, > review, distribution, printing or copying of the > information contained in this e-mail message > and/or attachments to it are strictly prohibited. If > you have received this communication in error, > please notify us by reply e-mail or telephone and > immediately and permanently delete the message > and any attachments. Thank you > > > _______________________________________________ > keycloak-user mailing list > keycloak-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/keycloak-user -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3802 bytes Desc: not available Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20190109/e3fc822f/attachment-0001.bin From androidkernelhacker at gmail.com Wed Jan 9 08:05:33 2019 From: androidkernelhacker at gmail.com (Olga Bon) Date: Wed, 9 Jan 2019 15:05:33 +0200 Subject: [keycloak-user] Refreshing ID token and sliding session Message-ID: I am studying Keycloak and related protocols OpenID & OAuth2. Everything is clear except one thing, how to maintain the sliding session for a logged in user. Maybe I misunderstand something. 1. Authorization Flow first of all redirects a user to the keycloak login page, after successful login the user is redirected to the redirect url with the authorization code. 2. Using this authorization code, a server side application connects to the keycloak server and exchanges the code for the Access token (also including client id, secret, etc) and ID token. 3. Access token is used by the server side application itself in order to retrieve details from the keycloak server, like user additional info, public key, etc. So the Access token is used by applications only. 4. The server side applications set a cookie with the received ID token. Now user can access protected resources. All in all we have 1. Access token stored on the server side and used only by applications or services to retrieve additional info from Keycloak. 2. Refresh token stored on the server side and used only by application or services to get new Access token 3. ID token stored in the user's cookies and used to access protected resources of the system. My question is, how can the ID token be refreshed. Consider the following case, a user is logged in and doing some actions in the system, but suddenly toke got expired. How this case should be handled? I have implemented my own flow called the Sliding session, so the token gets refreshed if any request is made, however I don't know how to handle this case with Keycloak. I would be grateful for any help regarding the matter. From sursma at yahoo.com Wed Jan 9 12:19:42 2019 From: sursma at yahoo.com (Suresh Mali) Date: Wed, 9 Jan 2019 17:19:42 +0000 (UTC) Subject: [keycloak-user] entitlement api & Authorization API Endpoint not working (as documented) References: <2040604231.8824957.1547054382305.ref@mail.yahoo.com> Message-ID: <2040604231.8824957.1547054382305@mail.yahoo.com> Hi? I am trying to trying to get available permissions for a user I tried? autherization end point? as per the document?? ? curl -X POST -H "Authorization: Bearer ${AAT}" -d '{ "ticket" : ${PERMISSION_TICKET} }' "http://localhost:8080/auth/realms/moneysmart/authz/user_mgt" I get error?HTTP/1.1 404 Not Found where $AAT below is users access token, moneysmart is realm and user_mgt is client_id? $PERMISSION ticket obtained from??http://localhost:8080/auth/realms/moneysmart/authz/protection/permission Not permission ticket api works, I tried entitilement API? curl -X GET \ -H "Authorization: Bearer ${access_token}" \ "http://localhost:8080/auth/realms/moneysmart/authz/entitlement/user_mgt" This also gives error HTTP/1.1 404 Not Found Is there something else missing in setup or something else? -Suresh From testoauth55 at gmail.com Wed Jan 9 22:34:48 2019 From: testoauth55 at gmail.com (Bruce Wings) Date: Thu, 10 Jan 2019 09:04:48 +0530 Subject: [keycloak-user] Authorization : Scope cannot be added to multiple permission In-Reply-To: References: Message-ID: Has anyone else faced this issue? Can someone form keycloak team confirm the behavior? There is also a JIRA for the same: https://issues.jboss.org/browse/KEYCLOAK-9176 On Wed, Dec 12, 2018 at 3:50 PM Bruce Wings wrote: > (The configuration discussed below is done under the Authorization tab) > > I have created Authorization Scope. When I create 2 scope based > permissions : *Perm1 and Perm2 *and add this scope to both, *no error is > shown and scope is successfully added.* > > But when I look at the scopes at my client end, I see that only 1 > permission has that scope. (scope gets reflected in whichever permission is > added at the end. It gets disappeared from previous permission). Is this > the intended behavior? > > The way I checked the scopes is by intercepting request and obtaining > permission list in my Java client. > > *KeycloakSecurityContext keycloakSecurityContext = > (KeycloakSecurityContext) > request.getAttribute(KeycloakSecurityContext.class.getName());* > *AuthorizationContext authzContext = > keycloakSecurityContext.getAuthorizationContext();* > *List permList = (authzContext==null) ? null : > authzContext.getPermissions();* > *for(Permission perm : permList) {* > * Set scopeList = perm.getScopes();* > * // other stuff* > *}* > From fluffymarkz at gmail.com Wed Jan 9 23:36:06 2019 From: fluffymarkz at gmail.com (Fluffy Mark Garces) Date: Thu, 10 Jan 2019 12:36:06 +0800 Subject: [keycloak-user] (no subject) Message-ID: I would like to have a confirmation and consultant for the usage of keycloak platform, I am new to this field and I havd been assigned to provide an SSO solution for our project, after a bunch of research, I decided to go to this platform hoping to solve the wanted feature: + goal: provide SSO solution to various SPs and/or IDPs (like our app can be plugged in any existing IDP with multiple SP) + our application: "App A" would like to be an SP only? and can be proved to integrate to other IDPs or SPs. + protocol to be used: SAML I just want to know if this can be done with this platform.. any advice or recommendations can be helpful, I would also like if possible to consult to some of you guys privately, I hope. Please help, I am just new to this and need people like you to guide me, Thanks in advance From massimo.redaelli at celsiuspro.com Thu Jan 10 10:08:07 2019 From: massimo.redaelli at celsiuspro.com (Massimo Redaelli) Date: Thu, 10 Jan 2019 15:08:07 +0000 Subject: [keycloak-user] keycloak-js: token in cookie Message-ID: <1547132867410.90427@celsiuspro.com> I read here: http://lists.jboss.org/pipermail/keycloak-user/2014-December/001389.html that (if I understood correctly) at the time the javascript adapter didn't support returning the token in a cookie rather than in the response body. Is that still the case? I'm writing a SPA and I'm faced with the problem of where to store the token. Most tutorials just put it in local storage, or in a variable in memory, but I read around that it's very susceptible to XSS attacks, while using a secure, httponly cookie is much safer. What would you recommend? Thanks M. From gareth.western+listman at gmail.com Thu Jan 10 12:10:16 2019 From: gareth.western+listman at gmail.com (Gareth Western) Date: Thu, 10 Jan 2019 18:10:16 +0100 Subject: [keycloak-user] Disable HTTP2 in Keycloak 4.6 container? In-Reply-To: References: Message-ID: Just to confirm: disabling http2 in the standalone xml did fix the issue for us. We were also able to do this with a running instance using the jboss cli. Thanks to Dmitry T. for the help! On Wed, 19 Dec 2018, 14:02 Gareth Western It looks like the wildfly server used for the Keycloak 4.6.0.Final image > is configured to use HTTP2. Is there an easy way to disable this? I think > it might be the cause of some strange behaviour in Chrome, similar to as > described here: https://issues.jboss.org/browse/KEYCLOAK-2656. > > The related 'test http2' issue is pending for the Keycloak 5.x release, so > i assume Keycloak 4.x does not officially support HTTP2, is that correct? > > Kind regards, > Gareth > From tom at spicule.co.uk Thu Jan 10 19:12:30 2019 From: tom at spicule.co.uk (Tom Barber) Date: Thu, 10 Jan 2019 18:12:30 -0600 Subject: [keycloak-user] Cross client authentication Message-ID: Hi folks Trying to solve a question for one of my web developers. We have 2 apps one which authenticates against Keycloak using SAML and then a GUI that uses OIDC. When a user logs into the GUI it then performs a rest call to the SAML based client app. This causes a 401 currently, but as soon as I visit the SAML app and Keycloak logs in then the rest calls work. What aren?t we passing or config am I missing? Thanks Tom -- Spicule Limited is registered in England & Wales. Company Number: 09954122. Registered office: First Floor, Telecom House, 125-135 Preston Road, Brighton, England, BN1 6AF. VAT No. 251478891. All engagements are subject to Spicule Terms and Conditions of Business. This email and its contents are intended solely for the individual to whom it is addressed and may contain information that is confidential, privileged or otherwise protected from disclosure, distributing or copying. Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Spicule Limited. The company accepts no liability for any damage caused by any virus transmitted by this email. If you have received this message in error, please notify us immediately by reply email before deleting it from your system. Service of legal notice cannot be effected on Spicule Limited by email. From tom at spicule.co.uk Thu Jan 10 19:33:35 2019 From: tom at spicule.co.uk (Tom Barber) Date: Fri, 11 Jan 2019 01:33:35 +0100 Subject: [keycloak-user] Cross client authentication In-Reply-To: References: Message-ID: Scrap that! Filter misconfiguration. On 11 January 2019 at 00:12:30, Tom Barber (tom at spicule.co.uk) wrote: Hi folks Trying to solve a question for one of my web developers. We have 2 apps one which authenticates against Keycloak using SAML and then a GUI that uses OIDC. When a user logs into the GUI it then performs a rest call to the SAML based client app. This causes a 401 currently, but as soon as I visit the SAML app and Keycloak logs in then the rest calls work. What aren?t we passing or config am I missing? Thanks Tom -- Spicule Limited is registered in England & Wales. Company Number: 09954122. Registered office: First Floor, Telecom House, 125-135 Preston Road, Brighton, England, BN1 6AF. VAT No. 251478891. All engagements are subject to Spicule Terms and Conditions of Business. This email and its contents are intended solely for the individual to whom it is addressed and may contain information that is confidential, privileged or otherwise protected from disclosure, distributing or copying. Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Spicule Limited. The company accepts no liability for any damage caused by any virus transmitted by this email. If you have received this message in error, please notify us immediately by reply email before deleting it from your system. Service of legal notice cannot be effected on Spicule Limited by email. From nikola.malenic at netsetglobal.rs Fri Jan 11 04:58:05 2019 From: nikola.malenic at netsetglobal.rs (Nikola Malenic) Date: Fri, 11 Jan 2019 10:58:05 +0100 Subject: [keycloak-user] Dynamically assign roles to user for single session Message-ID: <007901d4a994$25d113a0$71733ae0$@netsetglobal.rs> I have implemented different authenticators which users can choose when they login. Now, I would like to assign various roles to the user based on authentication method user has chosen. Those roles would be assigned to the user only in current session. Is this possible to achieve? I used a mapper to put user's decision on authentication method in the tokens, but how to map this property (field) to the specific role/roles? Best regards, Nikola From uo67113 at gmail.com Fri Jan 11 05:06:50 2019 From: uo67113 at gmail.com (=?UTF-8?Q?Luis_Rodr=C3=ADguez_Fern=C3=A1ndez?=) Date: Fri, 11 Jan 2019 11:06:50 +0100 Subject: [keycloak-user] Cross client authentication In-Reply-To: References: Message-ID: Hello Tom, Once you visit the SAML app the an user session is created in the app and a JSESSIONID cookie is store in your browser, that's why it works. You have different ways of workaround this: 1. You can embed the gui component that makes the request to the SAML app into an