Package org.jboss.security.audit

Examples of org.jboss.security.audit.AuditManager


        return securityMgrMap;
    }

    /** {@inheritDoc} */
    public AuditManager getAuditManager(String securityDomain) {
        AuditManager am = null;
        try {
            am = auditMgrMap.get(securityDomain);
            if (am == null) {
                am = (AuditManager) lookUpJNDI(securityDomain + "/auditMgr");
                auditMgrMap.put(securityDomain, am);
View Full Code Here


        }
        if (authenticated == true) {
            subjectInfo.setAuthenticatedSubject(subject);
        }

        AuditManager auditManager = context.getAuditManager();
        if (auditManager != null) {
            audit(authenticated ? AuditLevel.SUCCESS : AuditLevel.FAILURE, auditManager, auditPrincipal);
        }

        return authenticated;
View Full Code Here

    * @return the {@code AuditManager} that records security events according to the specified policy, or {@code null}
    *         if no {@code AuditManager} is available.
    */
   public AuditManager getAuditManager()
   {
      AuditManager manager = null;
      if (this.securityManagement != null)
         manager = this.securityManagement.getAuditManager(this.name);
      return manager;
   }
View Full Code Here

      String lookupURL = null;
      if (securityDomain.startsWith(baseContext))
         lookupURL = securityDomain + auditMgrURL;
      else
         lookupURL = baseContext + "/" + securityDomain + auditMgrURL;
      AuditManager am = null;
      try
      {
         InitialContext ic = new InitialContext();
         am = (AuditManager) ic.lookup(lookupURL);
      }
View Full Code Here

        return securityMgrMap;
    }

    /** {@inheritDoc} */
    public AuditManager getAuditManager(String securityDomain) {
        AuditManager am = null;
        try {
            am = auditMgrMap.get(securityDomain);
            if (am == null) {
                am = (AuditManager) lookUpJNDI(securityDomain + "/auditMgr");
                auditMgrMap.put(securityDomain, am);
View Full Code Here

      String lookupURL = null;
      if(securityDomain.startsWith(baseContext))
         lookupURL = securityDomain + auditMgrURL;
      else
         lookupURL = baseContext + "/" + securityDomain + auditMgrURL;
      AuditManager am = null;
      try
      {
         InitialContext ic = new InitialContext();
         am = (AuditManager)ic.lookup(lookupURL);
      }
View Full Code Here

      assertNotNull("Invalid null MappingManager found", mappingManager);
      assertEquals("Invalid MappingManager implementation found", MockMappingManager.class, mappingManager.getClass());
      assertEquals("TestPolicy1", mappingManager.getSecurityDomain());

      // check the audit manager injection.
      AuditManager auditManager = testBean.getAuditManager();
      assertNotNull("Invalid null AuditManager found", auditManager);
      assertEquals("Invalid AuditManager implementation found", MockAuditManager.class, auditManager.getClass());
      assertEquals("TestPolicy1", auditManager.getSecurityDomain());

      // check the identity-trust injection.
      IdentityTrustManager trustManager = testBean.getIdentityTrustManager();
      assertNotNull("Invalid null IdentityTrustManager found", trustManager);
      assertEquals("Invalid IdentityTrustManager implementation found", MockIdentityTrustManager.class, trustManager
View Full Code Here

    * thread local for the audit event.
    */
   public void testAuditConfiguration() throws Exception
   {
      SecurityContext sc = SecurityContextFactory.createSecurityContext("test");
      AuditManager am = sc.getAuditManager();
      AuditEvent ae = new AuditEvent(AuditLevel.ERROR);
      am.audit(ae);
     
      //Now check that the Audit Event has been placed on the thread local
      //by our TestAuditProvider
      AuditEvent aev = (AuditEvent) AuditTestAssociation.auditEventLocal.get();
      assertEquals("Audit events are the same", ae, aev);
View Full Code Here

        return securityMgrMap;
    }

    /** {@inheritDoc} */
    public AuditManager getAuditManager(String securityDomain) {
        AuditManager am = null;
        try {
            am = auditMgrMap.get(securityDomain);
            if (am == null) {
                am = (AuditManager) lookUpJNDI(securityDomain + "/auditMgr");
                auditMgrMap.put(securityDomain, am);
View Full Code Here

/*  89 */   private ConcurrentHashMap<String, AuditManager> auditMgrMap = new ConcurrentHashMap();
/*  90 */   private ConcurrentHashMap<String, IdentityTrustManager> idmMgrMap = new ConcurrentHashMap();
/*     */
/*     */   public AuditManager getAuditManager(String securityDomain)
/*     */   {
/*  98 */     AuditManager auditManager = null;
/*     */     try
/*     */     {
/* 101 */       if (this.enableAudit)
/*     */       {
/* 103 */         auditManager = (AuditManager)this.auditMgrMap.get(securityDomain);
View Full Code Here

TOP

Related Classes of org.jboss.security.audit.AuditManager

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.