/* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.picketlink.trust.jbossws.handler; import java.io.InputStream; import java.security.Principal; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import javax.security.auth.Subject; import javax.servlet.ServletContext; import javax.xml.namespace.QName; import javax.xml.soap.SOAPBody; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; import org.jboss.security.AuthorizationManager; import org.jboss.security.SecurityConstants; import org.jboss.security.SecurityContext; import org.jboss.security.SecurityContextAssociation; import org.jboss.security.SimplePrincipal; import org.jboss.security.callbacks.SecurityContextCallbackHandler; import org.jboss.wsf.spi.invocation.SecurityAdaptor; import org.picketlink.identity.federation.core.exceptions.ProcessingException; import org.picketlink.trust.jbossws.util.JBossWSNativeStackUtil; import org.picketlink.trust.jbossws.util.JBossWSSERoleExtractor; import org.w3c.dom.Node; /** * An authorization handler for the POJO Web services Based on the Authorize Operation on the JBossWS Native stack * * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a> * @author Anil.Saldhana@redhat.com * @since Apr 11, 2011 */ public class WSAuthorizationHandler extends AbstractWSAuthorizationHandler { protected AuthorizationManager getAuthorizationManager(MessageContext msgContext) { return (AuthorizationManager) lookupJNDI("java:comp/env/security/authorizationMgr"); } }