Package org.jboss.metadata

Examples of org.jboss.metadata.SecurityIdentityMetaData


         ApplicationMetaData applicationMetaData = beanMetaData.getApplicationMetaData();
         AssemblyDescriptorMetaData assemblyDescriptor = applicationMetaData.getAssemblyDescriptor();
         securityRoles = assemblyDescriptor.getSecurityRoles();
         deploymentRoles = assemblyDescriptor.getPrincipalVersusRolesMap();

         SecurityIdentityMetaData secMetaData = beanMetaData.getSecurityIdentityMetaData();
         if (secMetaData != null && secMetaData.getUseCallerIdentity() == false)
         {
            String roleName = secMetaData.getRunAsRoleName();
            String principalName = secMetaData.getRunAsPrincipalName();

            //Special Case: if RunAsPrincipal is not configured, then we use unauthenticatedIdentity
            if (principalName == null)
               principalName = applicationMetaData.getUnauthenticatedPrincipal();

            // the run-as principal might have extra roles mapped in the assembly-descriptor
            Set extraRoleNames = assemblyDescriptor.getSecurityRoleNamesByPrincipal(principalName);
            runAsIdentity = new RunAsIdentity(roleName, principalName, extraRoleNames);
         }

         if (secMetaData != null && secMetaData.getUseCallerIdentity())
            this.isUseCallerIdentity = true;

         securityManager = container.getSecurityManager();
         realmMapping = container.getRealmMapping();
         //authorizationManager = container.getAuthorizationManager();
View Full Code Here


         ApplicationMetaData applicationMetaData = beanMetaData.getApplicationMetaData();
         AssemblyDescriptorMetaData assemblyDescriptor = applicationMetaData.getAssemblyDescriptor();
         securityRoles = assemblyDescriptor.getSecurityRoles();
         deploymentRoles = assemblyDescriptor.getPrincipalVersusRolesMap();

         SecurityIdentityMetaData secMetaData = beanMetaData.getSecurityIdentityMetaData();
         if (secMetaData != null && secMetaData.getUseCallerIdentity() == false)
         {
            String roleName = secMetaData.getRunAsRoleName();
            String principalName = secMetaData.getRunAsPrincipalName();

            //Special Case: if RunAsPrincipal is not configured, then we use unauthenticatedIdentity
            if (principalName == null)
               principalName = applicationMetaData.getUnauthenticatedPrincipal();

            // the run-as principal might have extra roles mapped in the assembly-descriptor
            Set extraRoleNames = assemblyDescriptor.getSecurityRoleNamesByPrincipal(principalName);
            runAsIdentity = new RunAsIdentity(roleName, principalName, extraRoleNames);
         }

         if (secMetaData != null && secMetaData.getUseCallerIdentity())
            this.isUseCallerIdentity = true;

         securityManager = container.getSecurityManager();
         realmMapping = container.getRealmMapping();
         //authorizationManager = container.getAuthorizationManager();
View Full Code Here

      {
         BeanMetaData beanMetaData = container.getBeanMetaData();
         ApplicationMetaData application = beanMetaData.getApplicationMetaData();
         AssemblyDescriptorMetaData assemblyDescriptor = application.getAssemblyDescriptor();

         SecurityIdentityMetaData secMetaData = beanMetaData.getSecurityIdentityMetaData();
         if (secMetaData != null && secMetaData.getUseCallerIdentity() == false)
         {
            String roleName = secMetaData.getRunAsRoleName();
            String principalName = secMetaData.getRunAsPrincipalName();
            if( principalName == null )
               principalName = application.getUnauthenticatedPrincipal();
            // the run-as principal might have extra roles mapped in the assembly-descriptor
            Set extraRoleNames = assemblyDescriptor.getSecurityRoleNamesByPrincipal(principalName);
            runAsIdentity = new RunAsIdentity(roleName, principalName, extraRoleNames);
View Full Code Here

         Invocation inv = new Invocation(timedObjectId.getInstancePk(), method, new Object[]{timer}, null, null, null);
         inv.setValue(InvocationKey.INVOKER_PROXY_BINDING, null, PayloadKey.AS_IS);
         inv.setType(InvocationType.LOCAL);
        
         BeanMetaData bmd = container.getBeanMetaData();
         SecurityIdentityMetaData ejbTimeoutIdentity = bmd.isEntity() ? null : bmd.getEjbTimeoutIdentity();
         if( ejbTimeoutIdentity != null && ejbTimeoutIdentity.getUseCallerIdentity() == false )
         {
            ApplicationMetaData applicationMetaData = bmd.getApplicationMetaData();
            AssemblyDescriptorMetaData assemblyDescriptor = applicationMetaData.getAssemblyDescriptor();
            String roleName = ejbTimeoutIdentity.getRunAsRoleName();
            String principalName = ejbTimeoutIdentity.getRunAsPrincipalName();
            // the run-as principal might have extra roles mapped in the assembly-descriptor
            Set extraRoleNames = assemblyDescriptor.getSecurityRoleNamesByPrincipal(principalName);
            RunAs runAsIdentity = new RunAsIdentity(roleName, principalName, extraRoleNames);
            SecurityActions.pushRunAsIdentity(runAsIdentity);
            pushedRunAs = true;
View Full Code Here

/* 86 */       Invocation inv = new Invocation(this.timedObjectId.getInstancePk(), this.method, new Object[] { timer }, null, null, null);
/* 87 */       inv.setValue(InvocationKey.INVOKER_PROXY_BINDING, null, PayloadKey.AS_IS);
/* 88 */       inv.setType(InvocationType.LOCAL);
/*    */
/* 90 */       BeanMetaData bmd = this.container.getBeanMetaData();
/* 91 */       SecurityIdentityMetaData ejbTimeoutIdentity = bmd.isEntity() ? null : bmd.getEjbTimeoutIdentity();
/* 92 */       if ((ejbTimeoutIdentity != null) && (!ejbTimeoutIdentity.getUseCallerIdentity()))
/*    */       {
/* 94 */         ApplicationMetaData applicationMetaData = bmd.getApplicationMetaData();
/* 95 */         AssemblyDescriptorMetaData assemblyDescriptor = applicationMetaData.getAssemblyDescriptor();
/* 96 */         String roleName = ejbTimeoutIdentity.getRunAsRoleName();
/* 97 */         String principalName = ejbTimeoutIdentity.getRunAsPrincipalName();
/*    */
/* 99 */         Set extraRoleNames = assemblyDescriptor.getSecurityRoleNamesByPrincipal(principalName);
/* 100 */         RunAs runAsIdentity = new RunAsIdentity(roleName, principalName, extraRoleNames);
/* 101 */         SecurityActions.pushRunAsIdentity(runAsIdentity);
/* 102 */         this.pushedRunAs = true;
View Full Code Here

/*     */     {
/*  68 */       BeanMetaData beanMetaData = container.getBeanMetaData();
/*  69 */       ApplicationMetaData application = beanMetaData.getApplicationMetaData();
/*  70 */       AssemblyDescriptorMetaData assemblyDescriptor = application.getAssemblyDescriptor();
/*     */
/*  72 */       SecurityIdentityMetaData secMetaData = beanMetaData.getSecurityIdentityMetaData();
/*  73 */       if ((secMetaData != null) && (!secMetaData.getUseCallerIdentity()))
/*     */       {
/*  75 */         String roleName = secMetaData.getRunAsRoleName();
/*  76 */         String principalName = secMetaData.getRunAsPrincipalName();
/*  77 */         if (principalName == null) {
/*  78 */           principalName = application.getUnauthenticatedPrincipal();
/*     */         }
/*  80 */         Set extraRoleNames = assemblyDescriptor.getSecurityRoleNamesByPrincipal(principalName);
/*  81 */         this.runAsIdentity = new RunAsIdentity(roleName, principalName, extraRoleNames);
View Full Code Here

/* 129 */       ApplicationMetaData applicationMetaData = beanMetaData.getApplicationMetaData();
/* 130 */       AssemblyDescriptorMetaData assemblyDescriptor = applicationMetaData.getAssemblyDescriptor();
/* 131 */       this.securityRoles = assemblyDescriptor.getSecurityRoles();
/* 132 */       this.deploymentRoles = assemblyDescriptor.getPrincipalVersusRolesMap();
/*     */
/* 134 */       SecurityIdentityMetaData secMetaData = beanMetaData.getSecurityIdentityMetaData();
/* 135 */       if ((secMetaData != null) && (!secMetaData.getUseCallerIdentity()))
/*     */       {
/* 137 */         String roleName = secMetaData.getRunAsRoleName();
/* 138 */         String principalName = secMetaData.getRunAsPrincipalName();
/*     */
/* 141 */         if (principalName == null) {
/* 142 */           principalName = applicationMetaData.getUnauthenticatedPrincipal();
/*     */         }
/*     */
/* 145 */         Set extraRoleNames = assemblyDescriptor.getSecurityRoleNamesByPrincipal(principalName);
/* 146 */         this.runAsIdentity = new RunAsIdentity(roleName, principalName, extraRoleNames);
/*     */       }
/*     */
/* 149 */       if ((secMetaData != null) && (secMetaData.getUseCallerIdentity())) {
/* 150 */         this.isUseCallerIdentity = true;
/*     */       }
/* 152 */       this.securityManager = container.getSecurityManager();
/* 153 */       this.realmMapping = container.getRealmMapping();
/*     */       try
View Full Code Here

TOP

Related Classes of org.jboss.metadata.SecurityIdentityMetaData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.