[keycloak-user] KC 3.4.3 Final: Remove group from policy always failed with NPE

Nhut Thai Le ntle at castortech.com
Tue May 8 12:33:26 EDT 2018


I opened the ticket:

https://issues.jboss.org/browse/KEYCLOAK-7322

Thai

On Tue, May 8, 2018 at 11:56 AM, Pedro Igor Silva <psilva at redhat.com> wrote:

> Hi,
>
> Could you open a JIRA and attach the stacktrace, please ? Once you do
> that, I'll check what is happening.
>
> Regards.
> Pedro Igor
>
> On Tue, May 8, 2018 at 10:46 AM, Nhut Thai Le <ntle at castortech.com> wrote:
>
>> Hello,
>>
>> I'm using the admin-client to remove a group from group policy but it
>> always fail with NPE. Here is my code:
>>
>> GroupRepresentation group =
>> realm.groups().group(groupUuid).toRepresentation();
>> String policyUuid = groupPolicies.get(0).getId();
>> GroupPolicyResource polRes =
>> client.authorization().policies().group().findById(policyUuid);
>> GroupPolicyRepresentation policy = polRes.toRepresentation();
>> policy.removeGroup(group.getPath()); //TODO: not sure why it always fail
>> here with NPE
>> polRes.update(policy);
>>
>> I'm using the test suite as guideline:
>> https://github.com/pedroigor/keycloak/blob/1e1de85685bb5d5f1
>> 80f510630cd7133f8a35375/testsuite/integration-arquillian/tests/base/src/
>> test/java/org/keycloak/testsuite/admin/client/
>> authorization/GroupPolicyManagementTest.java
>>
>> Hope to get some help here.
>>
>> Thai
>> _______________________________________________
>> keycloak-user mailing list
>> keycloak-user at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>>
>
>


-- 
Castor Technologies Inc
460 rue St-Catherine St Ouest, Suite 613
Montréal, Québec H3B-1A7
(514) 360-7208 o
(514) 798-2044 f
ntle at castortech.com
www.castortech.com

CONFIDENTIALITY NOTICE: The information contained in this e-mail is
confidential and may be proprietary information intended only for the use
of the individual or entity to whom it is addressed. If the reader of this
message is not the intended recipient, you are hereby notified that any
viewing, dissemination, distribution, disclosure, copy or use of the
information contained in this e-mail message is strictly prohibited. If you
have received and/or are viewing this e-mail in error, please immediately
notify the sender by reply e-mail, and delete it from your system without
reading, forwarding, copying or saving in any manner. Thank you.
AVIS DE CONFIDENTIALITE: L’information contenue dans ce message est
confidentiel, peut être protégé par le secret professionnel et est réservé
à l'usage exclusif du destinataire. Toute autre personne est par les
présentes avisée qu'il lui est strictement interdit de diffuser, distribuer
ou reproduire ce message. Si vous avez reçu cette communication par erreur,
veuillez la détruire immédiatement et en aviser l'expéditeur. Merci.


More information about the keycloak-user mailing list