Skip to content
Permalink
Browse files
FC-286 - To Apache Log4j 2
  • Loading branch information
shawnmckinney committed Jul 1, 2021
1 parent 4bc3989 commit 41899dcda9aad40994ee8b145279dce9b2fa40ec
Showing 17 changed files with 184 additions and 168 deletions.
82 pom.xml
@@ -104,18 +104,16 @@
<java.version>1.8</java.version>
<!-- Dependencies version -->
<fortress.realm.version>2.0.6</fortress.realm.version>
<cxf.version>3.3.6</cxf.version>
<cxf.version>3.4.4</cxf.version>
<httpclient.version>3.1</httpclient.version>
<java.version>1.8</java.version>
<javadoc.version>2.9.1</javadoc.version>
<junit.version>4.12</junit.version>
<log4j.version>1.2.17</log4j.version>
<junit.version>4.13.2</junit.version>
<version.log4j>2.14.1</version.log4j>
<servlet-api.version>2.5.0</servlet-api.version>
<slf4j.log4j12.version>1.7.21</slf4j.log4j12.version>
<jackson-jaxrs.version>2.10.1</jackson-jaxrs.version>
<version.jaxb.core>2.3.0.1</version.jaxb.core>
<version.jaxb.impl>2.3.2</version.jaxb.impl>

<!-- Other properties -->
<base.dir>.</base.dir>
<src.java.dir>${base.dir}/src/main/java</src.java.dir>
@@ -143,34 +141,34 @@
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<version>${jackson-jaxrs.version}</version>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<version>${jackson-jaxrs.version}</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.2.6.RELEASE</version>
<version>5.3.8</version>
</dependency>

<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>5.3.2.RELEASE</version>
<version>5.5.1</version>
</dependency>

<!-- Logging Dependencies -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${version.log4j}</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.log4j12.version}</version>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${version.log4j}</version>
</dependency>

<!-- Test Dependencies -->
@@ -246,6 +244,17 @@
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<configuration>
<licenses>
<!-- TODO (low prio): Remove this simple workaround when Apache Rat 0.14 has been released. -->
<!-- See also: https://issues.apache.org/jira/browse/RAT-212 -->
<!-- and https://issues.apache.org/jira/browse/LEGAL-265 -->
<license implementation="org.apache.rat.analysis.license.ApacheSoftwareLicense20">
<notes>Also allow the license url to be https.</notes>
<patterns>
<pattern>https://www.apache.org/licenses/LICENSE-2.0</pattern>
</patterns>
</license>
</licenses>
<excludeSubProjects>false</excludeSubProjects>
<excludes>
<!-- MAVEN_DEFAULT_EXCLUDES -->
@@ -397,7 +406,6 @@
<sysproperty key="tenant" value="${tenant}" />
<arg value="-buildfile" />
<arg file="./${load.file}" />
<!-- <arg file="./src/main/resources/FortressRestServerPolicy.xml" />-->
</java>
</target>
</configuration>
@@ -434,23 +442,23 @@
<!-- OWASP Dependency Vulnerability Scanner Profile -->
<profiles>

<profile>
<id>owasp</id>
<build>
<plugins>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<profile>
<id>owasp</id>
<build>
<plugins>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -19,7 +19,8 @@
*/
package org.apache.directory.fortress.rest;

import org.apache.log4j.Logger;
import org.slf4j.Logger;

import org.apache.directory.fortress.core.GlobalErrIds;
import org.apache.directory.fortress.core.SecurityException;
import org.apache.directory.fortress.core.model.FortResponse;
@@ -23,11 +23,9 @@
import org.apache.directory.fortress.core.AccessMgrFactory;
import org.apache.directory.fortress.core.GlobalErrIds;
import org.apache.directory.fortress.core.SecurityException;
import org.apache.directory.fortress.core.ant.RoleConstraintAnt;
import org.apache.directory.fortress.core.model.*;
import org.apache.log4j.Logger;

import java.util.ArrayList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
import java.util.Set;

@@ -39,8 +37,8 @@
class AccessMgrImpl extends AbstractMgrImpl
{
/** A logger for this class */
private static final Logger LOG = Logger.getLogger( AccessMgrImpl.class.getName() );
private static final Logger LOG = LoggerFactory.getLogger( AccessMgrImpl.class.getName() );

/** A flag for trusted sessions */
private static final boolean TRUSTED = true;

@@ -381,4 +379,4 @@ private FortResponse createSession( FortRequest request, boolean trusted )

return response;
}
}
}

0 comments on commit 41899dc

Please sign in to comment.