Package org.jwall.web.audit.io

Examples of org.jwall.web.audit.io.AuditEventReader


        if( ! sources.containsKey(file) ){

            try {

                boolean tail = "true".equals( p.getProperty( RFICollector.PROPERTY_TAIL ) );
                AuditEventReader reader = AuditFormat.createReader( file , tail );
                AuditEventDispatcher evtSource = new AuditEventDispatcher( reader );
                sources.put( file, evtSource );
               
            } catch (Exception e) {
                throw new RemoteException( e.getMessage() );
View Full Code Here


 
  @Before
  public void setUp() throws Exception {
        URL url = AuditEventVariableMatchTest.class.getResource( "/test-audit.log" );
        log.info( "Test-events: " + url );
        AuditEventReader reader = AuditFormat.createReader( url.getFile(), false );
        event = reader.readNext();
  }
View Full Code Here

    @Before
    public void setUp() throws Exception
    {
        URL url = AuditEventVariableMatchTest.class.getResource( "/test-audit.log" );
        log.info( "Test-events: " + url );
        AuditEventReader reader = AuditFormat.createReader( url.getFile(), false );
        event = reader.readNext();
    }
View Full Code Here

       
        try {
           
            URL url = AuditEventVariableMatchTest.class.getResource( "/rule-data-audit.log" );
            log.info( "Test-events: " + url );
            AuditEventReader reader = AuditFormat.createReader( url.getFile(), false );
            event = reader.readNext();
           
            boolean matches = filter.matches( event );
            Assert.assertTrue( matches );
           
        } catch (Exception e) {
View Full Code Here

  @Test
  public void test() {

    try {
      URL url = ScoreBugTest.class.getResource("/score-bug-audit.log");
      AuditEventReader reader = new ModSecurity2AuditReader(
          url.openStream());

      AuditEvent evt = reader.readNext();

      PersistentCollectionExtractor coll = new PersistentCollectionExtractor();
      Map<String, String> scores = coll.extractScores(evt);
      for (String key : scores.keySet()) {
        log.info("Score for '{}' = {}", key, scores.get(key));
View Full Code Here

    File resourceDir = new File("src/test/resources");
    File auditLog = new File(resourceDir.getAbsolutePath() + File.separator
        + "test-audit.log");
    log.info("Reading audit-event from file '" + auditLog.getAbsolutePath()
        + "'");
    AuditEventReader reader = AuditFormat.createReader(
        auditLog.getAbsolutePath(), false);
    event = reader.readNext();
  }
View Full Code Here

    public static void setUpBeforeClass() throws Exception
    {
      File resourceDir = new File( "src/test/resources" );
      File auditLog = new File( resourceDir.getAbsolutePath() + File.separator + "test-audit.log" );
      log.info( "Reading audit-event from file '" + auditLog.getAbsolutePath() + "'" );
      AuditEventReader reader = AuditFormat.createReader( auditLog.getAbsolutePath(), false );
      event = reader.readNext();
    }
View Full Code Here

    public static void setUpBeforeClass() throws Exception
    {
      File resourceDir = new File( "src/test/resources" );
      File auditLog = new File( resourceDir.getAbsolutePath() + File.separator + "test-audit.log" );
      log.info( "Reading audit-event from file '" + auditLog.getAbsolutePath() + "'" );
      AuditEventReader reader = AuditFormat.createReader( auditLog.getAbsolutePath(), false );
      event = reader.readNext();
    }
View Full Code Here

    File resourceDir = new File("src/test/resources");
    File auditLog = new File(resourceDir.getAbsolutePath() + File.separator
        + "audit-event-severity-0.log");
    log.info("Reading audit-event from file '" + auditLog.getAbsolutePath()
        + "'");
    AuditEventReader reader = AuditFormat.createReader(
        auditLog.getAbsolutePath(), false);
    event = reader.readNext();
  }
View Full Code Here

    try {
      URL url = AuditEventDatabaseMock.class
          .getResource("/sink-audit.log.gz");
      log.info("Creating DatabaseMock from URL {}", url);
      InputStream in = new GZIPInputStream(url.openStream());
      AuditEventReader reader = new ModSecurity2AuditReader(in);
      AuditEvent e = reader.readNext();
      while (e != null) {
        events.add(e);
        variables.addAll(e.getVariables());
        e = reader.readNext();
      }
    } catch (Exception ex) {
      ex.printStackTrace();
    }
    log.info("DatabaseMock has {} events", events.size());
View Full Code Here

TOP

Related Classes of org.jwall.web.audit.io.AuditEventReader

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.