You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by GitBox <gi...@apache.org> on 2019/10/30 12:02:03 UTC

[GitHub] [cxf] amarkevich commented on issue #592: [CXF-8140]:setAccessible(true) before reflection method java.security…

amarkevich commented on issue #592: [CXF-8140]:setAccessible(true) before reflection method java.security…
URL: https://github.com/apache/cxf/pull/592#issuecomment-547868209
 
 
   Test passed even with existing impl:
   ```
       @Test
       public void testCheckGroup() {
           final String role = "role";
           Subject s = new Subject();
           Principal p = new SimplePrincipal(role);
           TestGroupPrincipal g = new TestGroupPrincipal("groupName", p);
           s.getPrincipals().add(g);
           LoginSecurityContext context = new DefaultSecurityContext(g, s);
           assertTrue(context.isUserInRole(role));
       }
   
       @SuppressWarnings("serial")
       private class TestGroupPrincipal extends SimpleGroup {
           TestGroupPrincipal(String groupName, Principal member) {
               super(groupName, member);
           }
           @Override
           public Enumeration<? extends Principal> members() {
               return super.members();
           }
       }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services