Repository: logging-log4j-audit Updated Branches: refs/heads/master 9f16663ff -> 540d9e579
More documentation fixes Project: http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/commit/540d9e57 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/tree/540d9e57 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/diff/540d9e57 Branch: refs/heads/master Commit: 540d9e579f35219b1df79309d3f59736af34cded Parents: 9f16663 Author: Ralph Goers <rgo...@apache.org> Authored: Sun Feb 11 17:12:22 2018 -0700 Committer: Ralph Goers <rgo...@apache.org> Committed: Sun Feb 11 17:12:22 2018 -0700 ---------------------------------------------------------------------- checkstyle-header.txt | 16 ++ checkstyle-import-control.xml | 37 +++ checkstyle-suppressions.xml | 25 ++ checkstyle.xml | 254 +++++++++++++++++++ findbugs-exclude-filter.xml | 31 +++ log4j-audit/log4j-audit-api/src/site/site.xml | 18 ++ .../src/site/markdown/index.md | 44 +++- .../log4j-audit-maven-plugin/src/site/site.xml | 18 ++ .../log4j-audit-war/src/site/markdown/index.md | 8 +- log4j-audit/log4j-audit-war/src/site/site.xml | 18 ++ .../log4j/catalog/api/EventAttribute.java | 5 +- .../src/site/markdown/index.md | 4 +- .../log4j-catalog-api/src/site/site.xml | 18 ++ .../log4j/catalog/git/dao/GitCatalogData.java | 48 ---- .../src/site/markdown/index.md | 4 +- .../log4j-catalog-git/src/site/site.xml | 18 ++ .../catalog/jpa/config/HibernateConfig.java | 64 +++++ .../catalog/jpa/config/HibernatgeConfig.java | 64 ----- .../src/site/markdown/index.md | 12 +- .../log4j-catalog-jpa/src/site/site.xml | 18 ++ .../jpa/config/ApplicationConfiguration.java | 2 +- .../src/site/markdown/index.md | 4 +- .../log4j-catalog-war/src/site/site.xml | 18 ++ pom.xml | 72 +++++- src/site/markdown/catalog.md.vm | 44 ++-- src/site/markdown/index.md.vm | 51 +++- src/site/markdown/javadoc.md | 29 +-- src/site/markdown/requestContext.md.vm | 212 +++++++--------- src/site/resources/images/request-context.png | Bin 0 -> 48597 bytes src/site/site.xml | 13 +- 30 files changed, 852 insertions(+), 317 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/checkstyle-header.txt ---------------------------------------------------------------------- diff --git a/checkstyle-header.txt b/checkstyle-header.txt new file mode 100644 index 0000000..4f33236 --- /dev/null +++ b/checkstyle-header.txt @@ -0,0 +1,16 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache license, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the license for the specific language governing permissions and + * limitations under the license. + */ http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/checkstyle-import-control.xml ---------------------------------------------------------------------- diff --git a/checkstyle-import-control.xml b/checkstyle-import-control.xml new file mode 100644 index 0000000..f080f50 --- /dev/null +++ b/checkstyle-import-control.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE import-control PUBLIC + "-//Puppy Crawl//DTD Import Control 1.1//EN" + "http://www.puppycrawl.com/dtds/import_control_1_1.dtd"> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<import-control pkg="org"> + <!-- Allow all by default --> + <allow pkg="java" /> + <allow pkg="javax" /> + <allow pkg="org" /> + <allow pkg="com" /> + <allow pkg="net" /> + <allow pkg="ch" /> + <allow pkg="junit" /> + <allow pkg="contribs" /> + + <!-- Disallow sun.* imports as they are not guaranteed to be the same across all JVMs --> + <disallow pkg="sun" /> + +</import-control> http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/checkstyle-suppressions.xml ---------------------------------------------------------------------- diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml new file mode 100644 index 0000000..fd1ad78 --- /dev/null +++ b/checkstyle-suppressions.xml @@ -0,0 +1,25 @@ +<?xml version="1.0"?> + +<!DOCTYPE suppressions PUBLIC + "-//Puppy Crawl//DTD Suppressions 1.0//EN" + "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd"> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<suppressions> +</suppressions> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/checkstyle.xml ---------------------------------------------------------------------- diff --git a/checkstyle.xml b/checkstyle.xml new file mode 100644 index 0000000..80ad14d --- /dev/null +++ b/checkstyle.xml @@ -0,0 +1,254 @@ +<!DOCTYPE module PUBLIC + "-//Puppy Crawl//DTD Check Configuration 1.1//EN" + "http://www.puppycrawl.com/dtds/configuration_1_1.dtd"> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<!-- Checkstyle configuration that checks the commons-configuration coding conventions --> + +<module name="Checker"> + <property name="localeLanguage" value="en"/> + + <!-- Checks that a package.html file exists for each package. --> + <!-- See http://checkstyle.sourceforge.net/config_javadoc.html --> + <module name="JavadocPackage"/> + + <!-- Checks whether files end with a new line. --> + <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile --> + <module name="NewlineAtEndOfFile"> + <property name="lineSeparator" value="lf"/> + </module> + + <!-- Checks that property files contain the same keys. --> + <!-- See http://checkstyle.sf.net/config_misc.html#Translation --> + <module name="Translation"/> + + <!-- Checks for Headers --> + <!-- See http://checkstyle.sourceforge.net/config_header.html#Header --> + <module name="Header"> + <property name="headerFile" value="${licensedir}"/> + <property name="fileExtensions" value="java"/> + <!--<property name="ignoreLines" value="2"/> --> + </module> + + <!-- Checks for Tab characters --> + <!-- See http://checkstyle.sourceforge.net/config_whitespace.html#FileTabCharacter --> + <module name="FileTabCharacter"> + <property name="fileExtensions" value="java"/> + </module> + + <!-- Checks for white space at the end of the line --> + <!-- See http://checkstyle.sourceforge.net/config_regexp.html --> + <!-- Updated to ignore whitespace following '*' in javadoc comments --> + <!-- http://stackoverflow.com/questions/9100059/checkstyle-trailing-spaces-regexp-issue --> + <module name="RegexpSingleline"> + <property name="format" value="(?<!\A[ \t]*\*?)[ \t]$"/> + <property name="message" value="Line has trailing spaces."/> + <property name="fileExtensions" value="java"/> + </module> + + <!-- Exceptions --> + <!--<module name="SuppressionFilter"> + <property name="file" value="conf/checkstyle-suppressions.xml"/> + </module> --> + <!-- + <module name="SuppressionCommentFilter"> + <property name="offCommentFormat" value="Check\:OFF\: ([\w\|]+)"/> + <property name="onCommentFormat" value="Check\:ON\: ([\w\|]+)"/> + <property name="checkFormat" value="$1"/> + </module> + --> + <module name="SuppressionCommentFilter" /> + <module name="SuppressWithNearbyCommentFilter"/> + + <module name="TreeWalker"> + + <property name="cacheFile" value="${checkstyle.cache.file}"/> + + <!-- Ensure that CHECKSTYLE:OFF comments are available to the filter: --> + <module name="FileContentsHolder"/> + + <!-- Checks for Javadoc comments. --> + <!-- See http://checkstyle.sf.net/config_javadoc.html --> + <module name="JavadocMethod"> + <property name="scope" value="public"/> + <property name="allowUndeclaredRTE" value="true"/> + <property name="allowMissingJavadoc" value="true"/> + </module> + <module name="JavadocType"> + <!-- <property name="authorFormat" value="null"/> --> + <!-- It is unfortunate to have to do this but checkstyle doesn't allow custom tags --> + <property name="allowUnknownTags" value="true"/> + </module> + <module name="JavadocVariable"> + <property name="scope" value="protected"/> + </module> + <module name="JavadocStyle"> + <property name="scope" value="public"/> + <!-- the checkHtml check is disabled as it generates incorrect errors --> + <property name="checkHtml" value="false"/> + </module> + + + <!-- Checks for Naming Conventions. --> + <!-- See http://checkstyle.sf.net/config_naming.html --> + <module name="ConstantName"> + <property name="format" value="^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$|^capabilities$|^log$"/> + </module> + <module name="LocalFinalVariableName"/> + <module name="LocalVariableName"/> + <module name="MemberName"/> + <module name="MethodName"/> + <module name="PackageName"/> + <module name="ParameterName"/> + <module name="StaticVariableName"/> + <module name="TypeName"/> + + <!-- Following interprets the header file as regular expressions. --> + <!-- <module name="RegexpHeader"/> --> + + + <!-- Checks for imports --> + <!-- See http://checkstyle.sf.net/config_import.html --> + <module name="AvoidStarImport"> + <property name="allowStaticMemberImports" value="true"/> + </module> + <module name="IllegalImport"/><!-- defaults to sun.* packages --> + <module name="RedundantImport"/> + <module name="UnusedImports"/> + <module name="ImportControl"> + <property name="severity" value="error"/> + <property name="file" value="checkstyle-import-control.xml"/> + </module> + <module name="ImportOrder"> + <!-- Imports must be separated (by one newline) into the following groups: + java and javax + org + com + all others + Imports within a group must be sorted alphabetically (lexicographically) + All static imports come below all other imports --> + <property name="groups" value="/^javax?\./,org,com"/> + <property name="ordered" value="true"/> + <property name="caseSensitive" value="true"/> + <property name="separated" value="true"/> + <property name="option" value="bottom"/> + </module> + + + <!-- Checks for Size Violations. --> + <!-- See http://checkstyle.sf.net/config_sizes.html --> + <!--<module name="FileLength"/>--> + <module name="LineLength"> + <property name="max" value="120"/> + <!-- Ignore import statements --> + <property name="ignorePattern" value="^import\s.*$"/> + </module> + <module name="MethodLength"/> + <module name="ParameterNumber"> + <property name="max" value="15"/> + </module> + + + <!-- Checks for whitespace --> + <!-- See http://checkstyle.sf.net/config_whitespace.html --> + <module name="EmptyForIteratorPad"/> + <module name="NoWhitespaceAfter"/> + <module name="NoWhitespaceBefore"/> + <module name="OperatorWrap"> + <property name="tokens" value="ASSIGN"/> + <property name="option" value="eol"/> + </module> + <module name="ParenPad"/> + <module name="WhitespaceAfter"/> + <module name="WhitespaceAround"/> + <module name="GenericWhitespace"/> + + + <!-- Modifier Checks --> + <!-- See http://checkstyle.sf.net/config_modifiers.html --> + <module name="ModifierOrder"/> + <module name="RedundantModifier"/> + + + <!-- Checks for blocks. You know, those {}'s --> + <!-- See http://checkstyle.sf.net/config_blocks.html --> + <module name="AvoidNestedBlocks"> + <property name="allowInSwitchCase" value="true"/> + </module> + <!-- Require empty catch blocks to have at least a comment --> + <module name="EmptyBlock"> + <property name="option" value="text"/> + <property name="tokens" value="LITERAL_CATCH"/> + </module> + <module name="LeftCurly"> + <property name="option" value="eol"/> + </module> + <module name="NeedBraces"/> + <module name="RightCurly"> + <property name="option" value="same"/> + </module> + + + <!-- Checks for common coding problems --> + <!-- See http://checkstyle.sf.net/config_coding.html --> + <module name="CovariantEquals"/> + <module name="EqualsHashCode"/> + <module name="IllegalInstantiation"/> + <!-- <module name="InnerAssignment"/> --> + <module name="MagicNumber"> + <property name="ignoreNumbers" value="-1,0,1,2,3,4,5,6,7"/> + </module> + <module name="SimplifyBooleanExpression"/> + <module name="SimplifyBooleanReturn"/> + <module name="StringLiteralEquality"/> + <module name="SuperClone"/> + <module name="SuperFinalize"/> + <module name="DeclarationOrder"/> + <!-- <module name="ExplicitInitialization"/> --> + <module name="DefaultComesLast"/> + <module name="FallThrough"/> + <module name="MultipleVariableDeclarations"/> + <!-- <module name="UnnecessaryParentheses"/> --> + + <!-- Checks for class design --> + <!-- See http://checkstyle.sf.net/config_design.html --> + <module name="FinalClass"/> + <module name="HideUtilityClassConstructor"/> + <module name="InterfaceIsType"/> + <module name="VisibilityModifier"> + <property name="protectedAllowed" value="true"/> + </module> + + + <!-- Miscellaneous other checks. --> + <!-- See http://checkstyle.sf.net/config_misc.html --> + <module name="ArrayTypeStyle"/> + <module name="TodoComment"> + <property name="severity" value="info"/> + </module> + <module name="UpperEll"/> + + <module name="HiddenField"> + <property name="ignoreConstructorParameter" value="true"/> + <property name="ignoreSetter" value="true"/> + </module> + + </module> + +</module> http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/findbugs-exclude-filter.xml ---------------------------------------------------------------------- diff --git a/findbugs-exclude-filter.xml b/findbugs-exclude-filter.xml new file mode 100644 index 0000000..e8df7e4 --- /dev/null +++ b/findbugs-exclude-filter.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<!-- ===================================================================== --> +<!-- $Id: findbugs-exclude-filter.xml 773234 2009-05-09 15:27:59Z rgoers $ --> +<!-- ===================================================================== --> +<FindBugsFilter> + <!-- Enable only high priority warnings --> + <Match> + <Priority value="2"/> + </Match> + + <Match> + <Priority value="3"/> + </Match> +</FindBugsFilter> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/log4j-audit/log4j-audit-api/src/site/site.xml ---------------------------------------------------------------------- diff --git a/log4j-audit/log4j-audit-api/src/site/site.xml b/log4j-audit/log4j-audit-api/src/site/site.xml index f95bff0..c8dbaca 100644 --- a/log4j-audit/log4j-audit-api/src/site/site.xml +++ b/log4j-audit/log4j-audit-api/src/site/site.xml @@ -31,5 +31,23 @@ <!-- Component-specific reports --> <menu ref="reports"/> + <menu name="Project Information" img="icon-info-sign"> + <item name="Dependencies" href="/dependencies.html" /> + <item name="Dependency Convergence" href="/dependency-convergence.html" /> + <item name="Dependency Management" href="/dependency-management.html" /> + <item name="Project Team" href="/team-list.html" /> + <item name="Mailing Lists" href="/mail-lists.html" /> + <item name="Issue Tracking" href="/issue-tracking.html" /> + <item name="Project License" href="/license.html" /> + <item name="Source Repository" href="/source-repository.html" /> + <item name="Project Summary" href="/project-summary.html" /> + </menu> + + <menu name="Project Reports" img="icon-cog"> + <item name="Changes Report" href="/changes-report.html" /> + <item name="JIRA Report" href="/jira-report.html" /> + <item name="RAT Report" href="/rat-report.html" /> + </menu> + </body> </project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/log4j-audit/log4j-audit-maven-plugin/src/site/markdown/index.md ---------------------------------------------------------------------- diff --git a/log4j-audit/log4j-audit-maven-plugin/src/site/markdown/index.md b/log4j-audit/log4j-audit-maven-plugin/src/site/markdown/index.md index f060c06..841fc8b 100644 --- a/log4j-audit/log4j-audit-maven-plugin/src/site/markdown/index.md +++ b/log4j-audit/log4j-audit-maven-plugin/src/site/markdown/index.md @@ -16,9 +16,49 @@ limitations under the License. --> -# Log4j Audit API +# Log4j Audit Maven Plugin -The Log4j Audit API provides the event interfaces that applications should use when logging audit events. +The Log4j Audit Maven Plugin generates Java Interfaces from the JSON catalog. Attributes that may be +configured in this plugin include + +<table> +<tr><th>Name</th><th>Type</th><th>Since</th><th>Required</th><th>Description</th><th>Default Value</th></tr> +<tr><td>catalogReaderClassName</td><td>String</td><td>-</td><td>false</td><td>CatalogReader used to read the +JSON catalog</td><td>org.apache.logging.log4j.catalog.api.dao.FileCatalogReader</td></tr> +<tr><td>catalogReaderAttributes</td><td>Map</td><td>-</td><td>false</td><td>Parameters to pass to the CatalogReader</td> +<td></td></tr> +<tr><td>packageName</td><td>String</td><td>-</td><td>true</td><td>The package name to use for the generated Interfaces</td> +<td></td></tr> +<tr><td>outputDir</td><td>File</td><td>-</td><td>false</td><td>The root directory where the generated Interfaces should +be created</td><td>${project.build.directory}/generated-sources/log4j-audit</td></tr> +<tr><td>maxKeyLength</td><td>int</td><td>-</td><td>false</td><td>The maximum length of attribute and event names.</td> +<td>32 - the maximum allowed to be compliant with RFC 5424</td></tr> +<tr><td>enterpriseId</td><td>int</td><td>-</td><td>false</td><td>The IANA enterprise id for RFC 5424 events</td> +<td>18060</td></tr> +</table> + +Below is a sample configuration. + +``` + <plugin> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-audit-maven-plugin</artifactId> + <version>${log4j-audit.version}</version> + <executions> + <execution> + <id>generate</id> + <phase>generate-sources</phase> + <goals> + <goal>generate</goal> + </goals> + <configuration> + <packageName>org.apache.logging.log4j.audit.event</packageName> + <enterpriseId>18060</enterpriseId> + </configuration> + </execution> + </executions> + </plugin> +``` ## Requirements http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/log4j-audit/log4j-audit-maven-plugin/src/site/site.xml ---------------------------------------------------------------------- diff --git a/log4j-audit/log4j-audit-maven-plugin/src/site/site.xml b/log4j-audit/log4j-audit-maven-plugin/src/site/site.xml index 204a449..7299b1a 100644 --- a/log4j-audit/log4j-audit-maven-plugin/src/site/site.xml +++ b/log4j-audit/log4j-audit-maven-plugin/src/site/site.xml @@ -31,5 +31,23 @@ <!-- Component-specific reports --> <menu ref="reports"/> + <menu name="Project Information" img="icon-info-sign"> + <item name="Dependencies" href="/dependencies.html" /> + <item name="Dependency Convergence" href="/dependency-convergence.html" /> + <item name="Dependency Management" href="/dependency-management.html" /> + <item name="Project Team" href="/team-list.html" /> + <item name="Mailing Lists" href="/mail-lists.html" /> + <item name="Issue Tracking" href="/issue-tracking.html" /> + <item name="Project License" href="/license.html" /> + <item name="Source Repository" href="/source-repository.html" /> + <item name="Project Summary" href="/project-summary.html" /> + </menu> + + <menu name="Project Reports" img="icon-cog"> + <item name="Changes Report" href="/changes-report.html" /> + <item name="JIRA Report" href="/jira-report.html" /> + <item name="RAT Report" href="/rat-report.html" /> + </menu> + </body> </project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/log4j-audit/log4j-audit-war/src/site/markdown/index.md ---------------------------------------------------------------------- diff --git a/log4j-audit/log4j-audit-war/src/site/markdown/index.md b/log4j-audit/log4j-audit-war/src/site/markdown/index.md index f060c06..bd02fa2 100644 --- a/log4j-audit/log4j-audit-war/src/site/markdown/index.md +++ b/log4j-audit/log4j-audit-war/src/site/markdown/index.md @@ -16,9 +16,13 @@ limitations under the License. --> -# Log4j Audit API +# Log4j Audit Service -The Log4j Audit API provides the event interfaces that applications should use when logging audit events. +The Log4j Audit Service WAR that allows remote applications to perform audit logging and to manage dynamic +catalog entries. The generated war requires customization as shown in the +[sample project](https://github.com/apache/logging-log4j-audit-sample/tree/master/audit-service-war). Once +that war is deployed navigating to http://localhost:8081/AuditService/swagger-ui.html in a web browser +will show the REST endpoints that may be accessed. ## Requirements http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/log4j-audit/log4j-audit-war/src/site/site.xml ---------------------------------------------------------------------- diff --git a/log4j-audit/log4j-audit-war/src/site/site.xml b/log4j-audit/log4j-audit-war/src/site/site.xml index 281e71f..21cac4b 100644 --- a/log4j-audit/log4j-audit-war/src/site/site.xml +++ b/log4j-audit/log4j-audit-war/src/site/site.xml @@ -31,5 +31,23 @@ <!-- Component-specific reports --> <menu ref="reports"/> + <menu name="Project Information" img="icon-info-sign"> + <item name="Dependencies" href="/dependencies.html" /> + <item name="Dependency Convergence" href="/dependency-convergence.html" /> + <item name="Dependency Management" href="/dependency-management.html" /> + <item name="Project Team" href="/team-list.html" /> + <item name="Mailing Lists" href="/mail-lists.html" /> + <item name="Issue Tracking" href="/issue-tracking.html" /> + <item name="Project License" href="/license.html" /> + <item name="Source Repository" href="/source-repository.html" /> + <item name="Project Summary" href="/project-summary.html" /> + </menu> + + <menu name="Project Reports" img="icon-cog"> + <item name="Changes Report" href="/changes-report.html" /> + <item name="JIRA Report" href="/jira-report.html" /> + <item name="RAT Report" href="/rat-report.html" /> + </menu> + </body> </project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/log4j-catalog/log4j-catalog-api/src/main/java/org/apache/logging/log4j/catalog/api/EventAttribute.java ---------------------------------------------------------------------- diff --git a/log4j-catalog/log4j-catalog-api/src/main/java/org/apache/logging/log4j/catalog/api/EventAttribute.java b/log4j-catalog/log4j-catalog-api/src/main/java/org/apache/logging/log4j/catalog/api/EventAttribute.java index 5aa617b..0154df0 100644 --- a/log4j-catalog/log4j-catalog-api/src/main/java/org/apache/logging/log4j/catalog/api/EventAttribute.java +++ b/log4j-catalog/log4j-catalog-api/src/main/java/org/apache/logging/log4j/catalog/api/EventAttribute.java @@ -16,11 +16,14 @@ */ package org.apache.logging.log4j.catalog.api; +import java.io.Serializable; + /** * Attribute used in an event */ -public class EventAttribute { +public class EventAttribute implements Serializable { + private static final long serialVersionUID = 6234766849875135836L; private String name; private Boolean isRequired; http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/log4j-catalog/log4j-catalog-api/src/site/markdown/index.md ---------------------------------------------------------------------- diff --git a/log4j-catalog/log4j-catalog-api/src/site/markdown/index.md b/log4j-catalog/log4j-catalog-api/src/site/markdown/index.md index f060c06..8365347 100644 --- a/log4j-catalog/log4j-catalog-api/src/site/markdown/index.md +++ b/log4j-catalog/log4j-catalog-api/src/site/markdown/index.md @@ -16,9 +16,9 @@ limitations under the License. --> -# Log4j Audit API +# Log4j Audit Catalog API -The Log4j Audit API provides the event interfaces that applications should use when logging audit events. +The Log4j Audit Catalog API provides the interfaces and classes used to access the Log4j Audit catalog. ## Requirements http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/log4j-catalog/log4j-catalog-api/src/site/site.xml ---------------------------------------------------------------------- diff --git a/log4j-catalog/log4j-catalog-api/src/site/site.xml b/log4j-catalog/log4j-catalog-api/src/site/site.xml index 238e70d..3a86de7 100644 --- a/log4j-catalog/log4j-catalog-api/src/site/site.xml +++ b/log4j-catalog/log4j-catalog-api/src/site/site.xml @@ -31,5 +31,23 @@ <!-- Component-specific reports --> <menu ref="reports"/> + <menu name="Project Information" img="icon-info-sign"> + <item name="Dependencies" href="/dependencies.html" /> + <item name="Dependency Convergence" href="/dependency-convergence.html" /> + <item name="Dependency Management" href="/dependency-management.html" /> + <item name="Project Team" href="/team-list.html" /> + <item name="Mailing Lists" href="/mail-lists.html" /> + <item name="Issue Tracking" href="/issue-tracking.html" /> + <item name="Project License" href="/license.html" /> + <item name="Source Repository" href="/source-repository.html" /> + <item name="Project Summary" href="/project-summary.html" /> + </menu> + + <menu name="Project Reports" img="icon-cog"> + <item name="Changes Report" href="/changes-report.html" /> + <item name="JIRA Report" href="/jira-report.html" /> + <item name="RAT Report" href="/rat-report.html" /> + </menu> + </body> </project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/log4j-catalog/log4j-catalog-git/src/main/java/org/apache/logging/log4j/catalog/git/dao/GitCatalogData.java ---------------------------------------------------------------------- diff --git a/log4j-catalog/log4j-catalog-git/src/main/java/org/apache/logging/log4j/catalog/git/dao/GitCatalogData.java b/log4j-catalog/log4j-catalog-git/src/main/java/org/apache/logging/log4j/catalog/git/dao/GitCatalogData.java deleted file mode 100644 index 48fe71b..0000000 --- a/log4j-catalog/log4j-catalog-git/src/main/java/org/apache/logging/log4j/catalog/git/dao/GitCatalogData.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.logging.log4j.catalog.git.dao; - -import org.apache.logging.log4j.catalog.api.CatalogData; - -/** - * The Catalog data.. - */ -public class GitCatalogData extends CatalogData { - - private String lastModification; - private String initStatus; - - public String getLastModification() { - return lastModification; - } - - public void setLastModification(String lastModification) { - this.lastModification = lastModification; - } - - public void setInitStatus(String status) { - this.initStatus = status; - } - - public String getInitStatus() { - return initStatus; - } - - public CatalogData copyOf() { - CatalogData catalogData = new CatalogData(); - return null; - } -} http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/log4j-catalog/log4j-catalog-git/src/site/markdown/index.md ---------------------------------------------------------------------- diff --git a/log4j-catalog/log4j-catalog-git/src/site/markdown/index.md b/log4j-catalog/log4j-catalog-git/src/site/markdown/index.md index f060c06..77e02af 100644 --- a/log4j-catalog/log4j-catalog-git/src/site/markdown/index.md +++ b/log4j-catalog/log4j-catalog-git/src/site/markdown/index.md @@ -16,9 +16,9 @@ limitations under the License. --> -# Log4j Audit API +# Log4j Audit Catalog Git DAO -The Log4j Audit API provides the event interfaces that applications should use when logging audit events. +This module provides the DAO used to retrieve and store the JSON catalog in a Git repository. ## Requirements http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/log4j-catalog/log4j-catalog-git/src/site/site.xml ---------------------------------------------------------------------- diff --git a/log4j-catalog/log4j-catalog-git/src/site/site.xml b/log4j-catalog/log4j-catalog-git/src/site/site.xml index 7aebf98..a7de9d0 100644 --- a/log4j-catalog/log4j-catalog-git/src/site/site.xml +++ b/log4j-catalog/log4j-catalog-git/src/site/site.xml @@ -31,5 +31,23 @@ <!-- Component-specific reports --> <menu ref="reports"/> + <menu name="Project Information" img="icon-info-sign"> + <item name="Dependencies" href="/dependencies.html" /> + <item name="Dependency Convergence" href="/dependency-convergence.html" /> + <item name="Dependency Management" href="/dependency-management.html" /> + <item name="Project Team" href="/team-list.html" /> + <item name="Mailing Lists" href="/mail-lists.html" /> + <item name="Issue Tracking" href="/issue-tracking.html" /> + <item name="Project License" href="/license.html" /> + <item name="Source Repository" href="/source-repository.html" /> + <item name="Project Summary" href="/project-summary.html" /> + </menu> + + <menu name="Project Reports" img="icon-cog"> + <item name="Changes Report" href="/changes-report.html" /> + <item name="JIRA Report" href="/jira-report.html" /> + <item name="RAT Report" href="/rat-report.html" /> + </menu> + </body> </project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/log4j-catalog/log4j-catalog-jpa/src/main/java/org/apache/logging/log4j/catalog/jpa/config/HibernateConfig.java ---------------------------------------------------------------------- diff --git a/log4j-catalog/log4j-catalog-jpa/src/main/java/org/apache/logging/log4j/catalog/jpa/config/HibernateConfig.java b/log4j-catalog/log4j-catalog-jpa/src/main/java/org/apache/logging/log4j/catalog/jpa/config/HibernateConfig.java new file mode 100644 index 0000000..6855e62 --- /dev/null +++ b/log4j-catalog/log4j-catalog-jpa/src/main/java/org/apache/logging/log4j/catalog/jpa/config/HibernateConfig.java @@ -0,0 +1,64 @@ +/* + * Copyright 2001-2005 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.logging.log4j.catalog.jpa.config; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; +import org.springframework.data.jpa.repository.config.EnableJpaRepositories; +import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder; +import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType; +import org.springframework.orm.jpa.JpaTransactionManager; +import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; +import org.springframework.orm.jpa.vendor.AbstractJpaVendorAdapter; +import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; +import org.springframework.transaction.PlatformTransactionManager; +import org.springframework.transaction.annotation.EnableTransactionManagement; + +import javax.persistence.EntityManagerFactory; +import javax.sql.DataSource; + +@Configuration +@EnableJpaRepositories("org.apache.logging.log4j.catalog.jpa.dao") +@EnableTransactionManagement +@Profile("hibernate") +public class HibernateConfig { + + @Autowired + private DataSourceConfig dataSourceConfig; + + @Bean + public EntityManagerFactory entityManagerFactory() { + AbstractJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter(); + vendorAdapter.setGenerateDdl(false); + + LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean(); + factory.setJpaVendorAdapter(vendorAdapter); + factory.setPackagesToScan("org.apache.logging.log4j.catalog"); + factory.setDataSource(dataSourceConfig.dataSource()); + factory.afterPropertiesSet(); + + return factory.getObject(); + } + + @Bean + public PlatformTransactionManager transactionManager() { + JpaTransactionManager txManager = new JpaTransactionManager(); + txManager.setEntityManagerFactory(entityManagerFactory()); + return txManager; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/log4j-catalog/log4j-catalog-jpa/src/main/java/org/apache/logging/log4j/catalog/jpa/config/HibernatgeConfig.java ---------------------------------------------------------------------- diff --git a/log4j-catalog/log4j-catalog-jpa/src/main/java/org/apache/logging/log4j/catalog/jpa/config/HibernatgeConfig.java b/log4j-catalog/log4j-catalog-jpa/src/main/java/org/apache/logging/log4j/catalog/jpa/config/HibernatgeConfig.java deleted file mode 100644 index 1e5f81c..0000000 --- a/log4j-catalog/log4j-catalog-jpa/src/main/java/org/apache/logging/log4j/catalog/jpa/config/HibernatgeConfig.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.logging.log4j.catalog.jpa.config; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Profile; -import org.springframework.data.jpa.repository.config.EnableJpaRepositories; -import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder; -import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType; -import org.springframework.orm.jpa.JpaTransactionManager; -import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; -import org.springframework.orm.jpa.vendor.AbstractJpaVendorAdapter; -import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; -import org.springframework.transaction.PlatformTransactionManager; -import org.springframework.transaction.annotation.EnableTransactionManagement; - -import javax.persistence.EntityManagerFactory; -import javax.sql.DataSource; - -@Configuration -@EnableJpaRepositories("org.apache.logging.log4j.catalog.jpa.dao") -@EnableTransactionManagement -@Profile("hibernate") -public class HibernatgeConfig { - - @Autowired - private DataSourceConfig dataSourceConfig; - - @Bean - public EntityManagerFactory entityManagerFactory() { - AbstractJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter(); - vendorAdapter.setGenerateDdl(false); - - LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean(); - factory.setJpaVendorAdapter(vendorAdapter); - factory.setPackagesToScan("org.apache.logging.log4j.catalog"); - factory.setDataSource(dataSourceConfig.dataSource()); - factory.afterPropertiesSet(); - - return factory.getObject(); - } - - @Bean - public PlatformTransactionManager transactionManager() { - JpaTransactionManager txManager = new JpaTransactionManager(); - txManager.setEntityManagerFactory(entityManagerFactory()); - return txManager; - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/log4j-catalog/log4j-catalog-jpa/src/site/markdown/index.md ---------------------------------------------------------------------- diff --git a/log4j-catalog/log4j-catalog-jpa/src/site/markdown/index.md b/log4j-catalog/log4j-catalog-jpa/src/site/markdown/index.md index f060c06..254580d 100644 --- a/log4j-catalog/log4j-catalog-jpa/src/site/markdown/index.md +++ b/log4j-catalog/log4j-catalog-jpa/src/site/markdown/index.md @@ -16,9 +16,17 @@ limitations under the License. --> -# Log4j Audit API +# Log4j Audit Catalog JPA DAO -The Log4j Audit API provides the event interfaces that applications should use when logging audit events. +This module provides the DAOs to retrieve, update, delete, and save Log4j Audit Catalog elements in a relational +database. + +The specific database used is determined by the jdbcUrl scheme provided. Log4j Audit currently supports HSQL and +PostgresQL databases. Others may be added by providing a Spring configuration class that implements a method +named datasource that takes no arguments and returns a DataSource. The class must be annotated with the +@JdbcUrl annotation with a parameter that matches the scheme specified in the JDBC Url String. See +[PostgresqlDataSourceConfig.java](https://github.com/apache/logging-log4j-audit/blob/master/log4j-catalog/log4j-catalog-jpa/src/main/java/org/apache/logging/log4j/catalog/jpa/config/PostgresqlDataSourceConfig.java) +for an example. ## Requirements http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/log4j-catalog/log4j-catalog-jpa/src/site/site.xml ---------------------------------------------------------------------- diff --git a/log4j-catalog/log4j-catalog-jpa/src/site/site.xml b/log4j-catalog/log4j-catalog-jpa/src/site/site.xml index e9fa50d..853bf11 100644 --- a/log4j-catalog/log4j-catalog-jpa/src/site/site.xml +++ b/log4j-catalog/log4j-catalog-jpa/src/site/site.xml @@ -31,5 +31,23 @@ <!-- Component-specific reports --> <menu ref="reports"/> + <menu name="Project Information" img="icon-info-sign"> + <item name="Dependencies" href="/dependencies.html" /> + <item name="Dependency Convergence" href="/dependency-convergence.html" /> + <item name="Dependency Management" href="/dependency-management.html" /> + <item name="Project Team" href="/team-list.html" /> + <item name="Mailing Lists" href="/mail-lists.html" /> + <item name="Issue Tracking" href="/issue-tracking.html" /> + <item name="Project License" href="/license.html" /> + <item name="Source Repository" href="/source-repository.html" /> + <item name="Project Summary" href="/project-summary.html" /> + </menu> + + <menu name="Project Reports" img="icon-cog"> + <item name="Changes Report" href="/changes-report.html" /> + <item name="JIRA Report" href="/jira-report.html" /> + <item name="RAT Report" href="/rat-report.html" /> + </menu> + </body> </project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/log4j-catalog/log4j-catalog-jpa/src/test/java/org/apache/logging/log4j/catalog/jpa/config/ApplicationConfiguration.java ---------------------------------------------------------------------- diff --git a/log4j-catalog/log4j-catalog-jpa/src/test/java/org/apache/logging/log4j/catalog/jpa/config/ApplicationConfiguration.java b/log4j-catalog/log4j-catalog-jpa/src/test/java/org/apache/logging/log4j/catalog/jpa/config/ApplicationConfiguration.java index 6f0a698..950a4a6 100644 --- a/log4j-catalog/log4j-catalog-jpa/src/test/java/org/apache/logging/log4j/catalog/jpa/config/ApplicationConfiguration.java +++ b/log4j-catalog/log4j-catalog-jpa/src/test/java/org/apache/logging/log4j/catalog/jpa/config/ApplicationConfiguration.java @@ -25,7 +25,7 @@ import org.springframework.context.annotation.Import; @Configuration @ComponentScan(basePackages = { "org.apache.logging.log4j.catalog" }) -@Import(HibernatgeConfig.class) +@Import(HibernateConfig.class) public class ApplicationConfiguration { @Bean public CatalogService catalogService() { http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/log4j-catalog/log4j-catalog-war/src/site/markdown/index.md ---------------------------------------------------------------------- diff --git a/log4j-catalog/log4j-catalog-war/src/site/markdown/index.md b/log4j-catalog/log4j-catalog-war/src/site/markdown/index.md index f060c06..1cdb7d6 100644 --- a/log4j-catalog/log4j-catalog-war/src/site/markdown/index.md +++ b/log4j-catalog/log4j-catalog-war/src/site/markdown/index.md @@ -16,9 +16,9 @@ limitations under the License. --> -# Log4j Audit API +# Log4j Audit Catalog Editor -The Log4j Audit API provides the event interfaces that applications should use when logging audit events. +The Log4j Audit Catalog Editor module generates the web application used to edit the Log4j Audit Catalog. ## Requirements http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/log4j-catalog/log4j-catalog-war/src/site/site.xml ---------------------------------------------------------------------- diff --git a/log4j-catalog/log4j-catalog-war/src/site/site.xml b/log4j-catalog/log4j-catalog-war/src/site/site.xml index 77d25f8..f029c8b 100644 --- a/log4j-catalog/log4j-catalog-war/src/site/site.xml +++ b/log4j-catalog/log4j-catalog-war/src/site/site.xml @@ -31,5 +31,23 @@ <!-- Component-specific reports --> <menu ref="reports"/> + <menu name="Project Information" img="icon-info-sign"> + <item name="Dependencies" href="/dependencies.html" /> + <item name="Dependency Convergence" href="/dependency-convergence.html" /> + <item name="Dependency Management" href="/dependency-management.html" /> + <item name="Project Team" href="/team-list.html" /> + <item name="Mailing Lists" href="/mail-lists.html" /> + <item name="Issue Tracking" href="/issue-tracking.html" /> + <item name="Project License" href="/license.html" /> + <item name="Source Repository" href="/source-repository.html" /> + <item name="Project Summary" href="/project-summary.html" /> + </menu> + + <menu name="Project Reports" img="icon-cog"> + <item name="Changes Report" href="/changes-report.html" /> + <item name="JIRA Report" href="/jira-report.html" /> + <item name="RAT Report" href="/rat-report.html" /> + </menu> + </body> </project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 4f69dc5..91a0f31 100644 --- a/pom.xml +++ b/pom.xml @@ -35,7 +35,7 @@ </issueManagement> <ciManagement> <system>Jenkins</system> - <url>https://builds.apache.org/job/Log4j%202.x/</url> + <url>https://builds.apache.org/job/Log4j-Audit/</url> </ciManagement> <inceptionYear>2016</inceptionYear> <developers> @@ -97,8 +97,6 @@ <scm> <connection>scm:git:https://git-wip-us.apache.org/repos/asf/logging-log4j-audit.git</connection> <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/logging-log4j-audit.git</developerConnection> - <!--<connection>scm:git:http://git-wip-us.apache.org/repos/asf/logging-log4j-audit.git</connection> - <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/logging-log4j-audit.git</developerConnection>--> <url>https://git-wip-us.apache.org/repos/asf?p=logging-log4j-audit.git;a=summary</url> <tag>HEAD</tag> </scm> @@ -129,7 +127,7 @@ <commons.validator.version>1.5.0</commons.validator.version> <compiler.plugin.version>3.6.1</compiler.plugin.version> <failsafe.plugin.version>2.19.1</failsafe.plugin.version> - <findbugs.plugin.version>3.0.3</findbugs.plugin.version> + <findbugs.plugin.version>3.0.5</findbugs.plugin.version> <hibernate.version>5.2.10.Final</hibernate.version> <eclipselink.version>2.7.0</eclipselink.version> <httpclient.version>4.5.3</httpclient.version> @@ -146,7 +144,7 @@ <log4j.version>2.10.0</log4j.version> <mockito.version>2.0.31-beta</mockito.version> <pdf.plugin.version>1.2</pdf.plugin.version> - <pmd.plugin.version>3.6</pmd.plugin.version> + <pmd.plugin.version>3.8</pmd.plugin.version> <postgresql.version>42.2.0</postgresql.version> <rat.plugin.version>0.12</rat.plugin.version> <release.plugin.version>2.5.3</release.plugin.version> @@ -1095,6 +1093,31 @@ <webAccessUrl>${project.scm.url}</webAccessUrl> <anonymousConnection>${project.scm.connection}</anonymousConnection> <developerConnection>${project.scm.developerConnection}</developerConnection> + <dependencyLocationsEnabled>false</dependencyLocationsEnabled> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>${javadoc.plugin.version}</version> + <configuration> + <aggregate>true</aggregate> + <bottom><![CDATA[<p align="center">Copyright © {inceptionYear}-{currentYear} {organizationName}. All Rights Reserved.<br /> + Apache Logging, Apache Log4j, Apache Log4j Audit, Log4j, Log4j Audit, Apache, the Apache feather logo, the Apache Logging project logo, + and the Apache Log4j logo are trademarks of The Apache Software Foundation.</p>]]></bottom> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>${checkstyle.plugin.version}</version> + <configuration> + <!--<propertiesLocation>${vfs.parent.dir}/checkstyle.properties</propertiesLocation> --> + <configLocation>${log4jParentDir}/checkstyle.xml</configLocation> + <suppressionsLocation>${log4jParentDir}/checkstyle-suppressions.xml</suppressionsLocation> + <enableRulesSummary>false</enableRulesSummary> + <propertyExpansion>basedir=${basedir}</propertyExpansion> + <propertyExpansion>licensedir=${log4jParentDir}/checkstyle-header.txt</propertyExpansion> </configuration> </plugin> <!-- Surefire report --> @@ -1130,6 +1153,45 @@ </excludes> </configuration> </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>findbugs-maven-plugin</artifactId> + <version>${findbugs.plugin.version}</version> + <configuration> + <fork>true</fork> + <jvmArgs>-Duser.language=en</jvmArgs> + <threshold>Normal</threshold> + <effort>Default</effort> + <excludeFilterFile>${log4jParentDir}/findbugs-exclude-filter.xml</excludeFilterFile> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jxr-plugin</artifactId> + <version>${jxr.plugin.version}</version> + <reportSets> + <reportSet> + <id>non-aggregate</id> + <reports> + <report>jxr</report> + </reports> + </reportSet> + <reportSet> + <id>aggregate</id> + <reports> + <report>aggregate</report> + </reports> + </reportSet> + </reportSets> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-pmd-plugin</artifactId> + <version>${pmd.plugin.version}</version> + <configuration> + <targetJdk>${maven.compiler.target}</targetJdk> + </configuration> + </plugin> </plugins> </reporting> <distributionManagement> http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/src/site/markdown/catalog.md.vm ---------------------------------------------------------------------- diff --git a/src/site/markdown/catalog.md.vm b/src/site/markdown/catalog.md.vm index 62d270f..40515d2 100644 --- a/src/site/markdown/catalog.md.vm +++ b/src/site/markdown/catalog.md.vm @@ -24,35 +24,9 @@ $h1 The Apache Log4j Audit Catalog Log4j-Audit uses a Catalog that describes the attributes and events that can be logged. The events may be grouped by Products and/or Categories, but at this time nothing in Log4j Audit makes use of the product or catalog -definitions. +definitions. The catalog is required to generate the audit events and to validate events being logged. -$h2 Catalog Components - -$h3 Attributes - -Attributes are the discrete data elements to be captured in audit events. One of the goals of the audit catalog -is to avoid having what are essentially the same attributes with different names in various events. When creating -new events users are highly encouraged to scan the existing attributes for one that is already present. - -Attributes can have aliases and examples, however the Catalog UI provides no way to edit these and Log4j Audit -currently doesn't do anything with these fields. - -$h3 Events - -Events represent the aggregation of attributes to be collected when a specific action is performed. Event -names should identify what action took place and the associated attributes should identify the key characteristics -of who performed the action and what they did. - -Events can have aliases, however the Catalog UI provides no way to edit them and Log4j Audit -currently doesn't do anything with alias fields. - -$h3 Products and Categories. - -Products and Categories can be defined as a way of grouping events. Log4j Audit doesn't do anything with -this data but a user interface might use this data as a way to limit searches or provide a drop down list -of events. - -$h2 The Catalog Editor +$h2 The Catalog and Catalog Editor Log4j Audit provides an AuditCatalog WAR that can be deployed to a servlet container for use in creating and maintaining the catalog. Because the Catalog Editor requires the credentials to be configured on the machine @@ -68,6 +42,13 @@ repository, the Catalog Editor is configured to only use the in memory database. $h3 Attributes +Attributes are the discrete data elements to be captured in audit events. One of the goals of the audit catalog +is to avoid having what are essentially the same attributes with different names in various events. When creating +new events users are highly encouraged to scan the existing attributes for one that is already present. + +Attributes can have aliases and examples, however the Catalog Editor provides no way to edit these and Log4j Audit +currently doesn't do anything with these fields. + The attribute edit screen allows attributes to be defined, modified or deleted. The fields that may be modified are: <table> <tr><th>Field</th><th>Description</th></tr> @@ -99,6 +80,13 @@ Using constraints can prevent garbage data from being included in the audit data $h3 Events +Events represent the aggregation of attributes to be collected when a specific action is performed. Event +names should identify what action took place and the associated attributes should identify the key characteristics +of who performed the action and what they did. + +Events can have aliases, however the Catalog UI provides no way to edit them and Log4j Audit +currently doesn't do anything with alias fields. + The event edit screen allows events to be defined, modified, or deleted. The fields that may be modified are: <table> <tr><th>Field</th><th>Description</th></tr> http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/src/site/markdown/index.md.vm ---------------------------------------------------------------------- diff --git a/src/site/markdown/index.md.vm b/src/site/markdown/index.md.vm index d89eea6..ad32740 100644 --- a/src/site/markdown/index.md.vm +++ b/src/site/markdown/index.md.vm @@ -21,11 +21,60 @@ $h1 Apache Log4j Audit -Log4j-Audit provides a framework for defining audit events and then logging them using Log4j. The framework focuses on +$h2 What is Audit Logging + +The basic purpose of audit logging is to provide the information to determine what actions have been performed, or +attempted to be performed, by whom, when they did it and what the data associated with the action was. Audit log +data is most typically used by security teams to monitor for fraud or illegal or otherwise unauthorized activities +and to be able to correct changes that were incorrectly made. Audit logs are often used to demonstrate compliance +with legal obligations such as Sarbanes-Oxley or HIPPA. + +$h3 What is the difference between audit logging and "normal" logging? + +In a typical application developers add logging statements at key points to help diagnose problems or to +document unexpected occurances, such as a failure to communicate with a key service. These are normally referred +to as diagnostic logs. Diagnostic logs are critical in aiding in maintaining the servicability of the application +but generally aren't very useful in helping to determine who made a paticular change and when it was done. +On the other hand, audit logs focus on identifying when a change was made, who made it, and what data elements were +changed. While audit logs can sometimes help in troubleshooting problems, that isn't their primary purpose just as +the primary purpose of diagnostic logging is not to record actions taken by people using the system. + +A key difference between diagnostic logs and audit logs is that while diagnostic logs are generally free form +with the content left up to the developer, audit logs usually contain the action being performed and the data +elements that have been impacted. In many systems audit logs are written to a database where the values for these +elements may be written to specific columns. In recent times it is more common to see audit logs written to NoSQL +data stores where they can be efficiently queried. + +Another key difference is that audit logs are often used to generate reports that are of value to several parts of +the organization. For example, an auditor at a bank might be interested in locating all the accounts with more than +3 failed login attempts the prior day, or all the transfers for more than $10,000.00. A customer service representative +might want to watch the audit events for a specific user while they are on the phone with them troubleshooting a problem. +Generally, diagnostic logs do not provide the information to support these use cases while audit logs do. + +Finally, diagnostic logs and audit logs differ in that diagnostic logs typcially are categorized via "levels" +while audit logs are not. Diagnostic logging typcially includes fairly detailed logging of the internals of the system +via debug level messages. Other messages may be classified as informational or, in response to some kind of an +error, a warning or error log message may be generated. In contrast to this, audit logs are usually always logged +so a level is meaningless. + +While audit logs and diagnostic logs may differ in their format and usage, Log4j can still play a part in delivering +both. Unlike systems where audit logs are written directly to a database, the use of Log4j and Log4j-Audit allows +applications to be written to perform audit logging without any knowledge of where those will end up and what they will +be used for. Furthermore, the log events can be easily transformed into various formats that best matches their +intended uses. + +$h2 What is Log4j Audit? + +Log4j Audit provides a framework for defining audit events and then logging them using Log4j. The framework focuses on defining the events and providing an easy mechanism for applications to log them, allowing products to provide consistency and validity to the events that are logged. It does not focus on how the log events are written to a data store. Log4j itself provides many options for that. +Log4j Audit builds upon Log4j by defining its own AuditMessage. An AuditMessage is a container for +[StructuredDataMessage](http://logging.apache.org/log4j/2.x/manual/messages.html)s which allows a log message to be +generated that contains a set of keys and values. The AuditMessage passes through Log4j as any other log event +would. + $h2 Features $h3 Audit Event Catalog http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/src/site/markdown/javadoc.md ---------------------------------------------------------------------- diff --git a/src/site/markdown/javadoc.md b/src/site/markdown/javadoc.md index 00cd556..3f25ad4 100644 --- a/src/site/markdown/javadoc.md +++ b/src/site/markdown/javadoc.md @@ -25,25 +25,10 @@ directly in code. You can also use the menu links on the left. Component | Description --------- | ----------- -[Log4j 2 API](log4j-api/apidocs/index.html) | The interface that applications should use and code against. -[Implementation](log4j-core/apidocs/index.html) | The standard implementation, also called the Log4j 2 Core, that contains Appenders, Filters, and more. -[Log4j IO Streams](log4j-iostreams/apidocs/index.html) | Extra classes for dealing with older APIs that expect classes from `java.io` for logging. -[JSP Tag Library](log4j-taglib/apidocs/index.html) | The tag library that enables Java-free logging in JavaServer Pages⢠using Log4j 2. -[JSP Tag Library (TLD Doc)](log4j-taglib/tlddoc/index.html) | The special Javadoc-like Tag Library Documentation for the Log4j 2 JSP Tag Library. - -The table below contains links to the Javadoc API Documentation for all the other Log4j 2 components, which you -likely will not use directly in code but instead will only configure or include in your dependencies. - -Component | Description ---------- | ----------- -[Commons Logging Bridge](log4j-jcl/apidocs/index.html) | A bridge that permits applications written against the Apache Commons Logging API to log using Log4j 2. -[SLF4J Binding](log4j-slf4j-impl/apidocs/index.html) | A bridge that permits applications written against the SLF4J API to log using Log4j 2. -[Java Util Logging Adapter](log4j-jul/apidocs/index.html) | A bridge that permits applications written against the `java.util.logging` API to log using Log4j 2. -[Log4j 1.2 API Bridge](log4j-1.2-api/apidocs/index.html) | A bridge that permits applications written against the Log4j 1.2.x API to log using Log4j 2. -[Log4j 2 to SLF4J Adapter](log4j-to-slf4j/apidocs/index.html) | An adapter that permits applications written against the Log4j 2 API to log using SLF4J. -[Apache Flume Appender](log4j-flume-ng/apidocs/index.html) | An Appender that allows applications to send logging events to Apache Flume Agents. -[Log4j JMX GUI](log4j-jmx-gui/apidocs/index.html) | A Java Swing-based client for remotely viewing the status logger and editing the Log4j configuration. -[Log4j Web Application Support](log4j-web/apidocs/index.html) | Additional classes that enable multiple configurations within a Servlet Container. -[Log4j CouchDB Support](log4j-couchdb/apidocs/index.html) | Additional Appender for CouchDB. -[Log4j MongoDB Support](log4j-mongodb/apidocs/index.html) | Additional Appender for MongoDB. -[Log4j Cassandra Support](log4j-cassandra/apidocs/index.html) | Additional Appender for Cassandra. +[Log4j Audit API](/log4j-audit/log4j-audit-api/apidocs/index.html) | The interface that applications should use and code against. +[Audit Service](log4j-audit/log4j-audit-war/apidocs/index.html) | The standard implementation, also called the Log4j 2 Core, that contains Appenders, Filters, and more. +[Maven Plugin](log4j-audit/log4j-audit-maven-plugin/apidocs/index.html) | Extra classes for dealing with older APIs that expect classes from `java.io` for logging. +[Catalog API](log4j-catalog/log4j-catalog-api/apidocs/index.html) | The tag library that enables Java-free logging in JavaServer Pages⢠using Log4j 2. +[Git Catalog Access](log4j-catalog/log4j-catalog-git/apidocs/index.html) | The special Javadoc-like Tag Library Documentation for the Log4j 2 JSP Tag Library. +[JPA Catalog Access](log4j-catalog/log4j-catalog-jpa/apidocs/index.html) | +[Catalog Editor](log4j-catalog/log4j-catalog-war/apidocs/index.html) | http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/src/site/markdown/requestContext.md.vm ---------------------------------------------------------------------- diff --git a/src/site/markdown/requestContext.md.vm b/src/site/markdown/requestContext.md.vm index 2fcb2ac..1fa5ad9 100644 --- a/src/site/markdown/requestContext.md.vm +++ b/src/site/markdown/requestContext.md.vm @@ -22,25 +22,47 @@ $h1 RequestContext Log4j-Audit incorporates Log4j ThreadContext variables as a way of including information into audit events that is -common throughout the application. This would include things like a client account number (especially useful in -multi-tenant applications), the user's login id, and the ip address of the user. In a services-based application -these values need to be populated at the point of entry to the application and then passed to all the service -endpoints. It is especially useful to create artificial request and session ids so that all the activities across -all the servers can be correlated to the user's request and/or session. +common throughout the application. While usage of a RequestContext is not required, the use of one should be +considered a best practice. + +In a typcial application that might use a ThreadContext Map, it will place variables in the Map so that they will +be included in all Log4j log events. Log4j Audit takes advantage of this so that variables placed into the +ThreadContext Map will be automatically be available in audit events as well. In addition, through the use of +the RequestContextFilter and RequestContextHeaderInterceptor, these variable will automatically be passed from a +client application to a REST service. + +A common use case is to include a request id and/or a session id in the RequestContext. By generating these variables +when a user first logs in and at the start of every action a user takes all log eveents, including audit events, +can be correlated in the application and through all the microservices the application might use. This could also +include things like a client account number (especially useful in multi-tenant applications), the user's login id, +and the ip address of the user. In a services-based application these values need to be populated at the point of +entry to the application and then passed to all the service endpoints. It is especially useful to create artificial +request and session ids so that all the activities acrossall the servers can be correlated to the user's request +and/or session. + +When defining audit events there are generally two types of data included in the event. The first are data elements +that are specific to a particular or small set of log events. The second are data elements that would be expected +to be included in all audit events. The second type are normally included in the RequestContext. Although they do +not have to be placed in the RequestContext doing so reduces the effort require to create an audit event since only +the data specific to that event needs to be added by the application. + +Another use case for RequestContext or ThreadContext Map variables is when lower level components need access to +data elements that the components calling them have no use for. For example, an application may shard its database +based on a customer's account number. A particular component may not need the account number in any of its operations +but would be forced to pass it through so the database access component could use it to determine which datbase to +use. By using the RequestContext the intermediate component no longer has to be aware of what customer it is performing +work for. + +One aspect of the Log4j ThreadContext should be noted. When an application directly creates a thread ThreadContext +variables are NOT automatically provided to that thread. Applications may make use of the RequestContext when +determining which variables in the ThreadContext Map should be passed to the child thread. Log4j provides a convenient way to identify the RequestContext variables such that they can be reliably accessed by the application and passed to the target services. To do this the application should create a RequestContext class that -resembles: +resembles [RequestContext.java](https://github.com/apache/logging-log4j-audit-sample/blob/master/audit-service-war/src/main/java/org/apache/logging/log4j/audit/service/RequestContext.java) +in the log4j-audit-sample project. A portion of that is shown here: ``` -import org.apache.logging.log4j.ThreadContext; -import org.apache.logging.log4j.audit.annotation.Chained; -import org.apache.logging.log4j.audit.annotation.ClientServer; -import org.apache.logging.log4j.audit.annotation.HeaderPrefix; -import org.apache.logging.log4j.audit.annotation.Local; -import org.apache.logging.log4j.core.util.NetUtils; -import org.apache.logging.log4j.core.util.UuidUtil; - /** * Defines all the variables that an application needs to be available in the ThreadContext for audit logging and * general application usage. @@ -51,14 +73,6 @@ public final class RequestContext { public static final String REQUEST_ID = "requestId"; @ClientServer public static final String SESSION_ID = "sessionId"; - @ClientServer - public static final String ACCOUNT_NUMBER = "accountNumber"; - @ClientServer - public static final String IP_ADDRESS = "ipAddress"; - @ClientServer - public static final String USER_ID = "userId"; - @ClientServer - public static final String LOGIN_ID = "loginId"; @Local public static final String CALLING_HOST = "callingHost"; @@ -71,115 +85,54 @@ public final class RequestContext { */ @Chained(fieldName = HOST_NAME, chainedFieldName = CALLING_HOST) public static final Supplier<String> LOCAL_HOST_SUPPLIER = () -> LOCAL_HOST_NAME; - /** - * The methods in this class are not required by framework components that use the RequestContext properties. - * They are provided as a convenience for applications. If they are not provided the properties can be accessed - * directly through the Log4j ThreadContext Map using the keys above. - */ - public static void clear() { - ThreadContext.clearMap(); - } - - public static String getRequestId() { - String uuidStr = ThreadContext.get(REQUEST_ID); - UUID uuid; - if (uuidStr == null) { - uuid = UuidUtil.getTimeBasedUuid(); - ThreadContext.put(REQUEST_ID, uuid.toString()); - } - return uuidStr; - } - - public static String getSessionId() { - return ThreadContext.get(SESSION_ID); - } - - public static void setSessionId(UUID sessionId) { - if (sessionId != null) { - ThreadContext.put(SESSION_ID, sessionId.toString()); - } - } - - public static void setSessionId(String sessionId) { - if (sessionId != null) { - ThreadContext.put(SESSION_ID, sessionId); - } - } - - public static void setAccountNumber(Long accountNumber) { - ThreadContext.put(ACCOUNT_NUMBER, accountNumber.toString()); - } - - public static Long getAccountNumber() { - String value = ThreadContext.get(ACCOUNT_NUMBER); - if (value == null || value.length() == 0) { - return 0L; - } - try { - return Long.parseLong(value); - } catch (Exception e) { - return 0L; - } - } - - public static void setIpAddress(String address) { - ThreadContext.put(IP_ADDRESS, address); - } - - public static String getIpAddress() { - return ThreadContext.get(IP_ADDRESS); - } - - public static void setUserId(String userId) { - ThreadContext.put(USER_ID, userId); - } - - public static String getUserId() { - return ThreadContext.get(USER_ID); - } - - public static void setLoginId(String loginId) { - ThreadContext.put(LOGIN_ID, loginId); - } - - public static String getLoginId() { - return ThreadContext.get(LOGIN_ID); - } - - public static String getHostName() { - return ThreadContext.get(HOST_NAME); - } - - public static void setHostName(String hostName) { - ThreadContext.put(HOST_NAME, hostName); - } - - public static String getCallingHost() { - return ThreadContext.get(CALLING_HOST); - } - - public static void setCallingHost(String hostName) { - ThreadContext.put(CALLING_HOST, hostName); - } } ``` +$h2 RequestContext Annotations +$h3 HeaderPrefix The HeaderPrefix annotation is used to define the string to be prepended to the names of the ThreadContext variables when they are passed to a REST service. The default value is "request-context-". +$h3 Mapping Annotations + The ClientServer, Local, and Chained annotations represent the 3 types of RequestContext variables. -* ClientServer represents a variable whose value should be passed to the target service using the same name. -* Local represents a variable that is used in the local application and should not be passed to a client service. -* Chained represents a variable that should be passed to the target service using a new name. A variable with the +<ul> +<li>ClientServer represents a variable whose value should be passed to the target service using the same name.</li> +<li>Local represents a variable that is used in the local application and should not be passed to a client service.</li> +<li>Chained represents a variable that should be passed to the target service using a new name. A variable with the same named may be created in the target service using a different value. This is primarily used to pass the name -of the current server to the target service. +of the current server to the target service.</li> +</ul> + +$h2 RequestContext methods -The public static set and get methods are optional but provide a convenient way to access the variables stored in +The public static set and get methods shown in +[RequestContext.java](https://github.com/apache/logging-log4j-audit-sample/blob/master/audit-service-war/src/main/java/org/apache/logging/log4j/audit/service/RequestContext.java) +are optional but provide a convenient way to access the variables stored in Log4j's ThreadContext Map. -$h2 Initializing the RequestContext +It should also be noted that it is possible to allow the RequestContext variables to be copied into an instance of the +RequestContext so they can be passed to a child thread where the instance will be used to populate that thread's +ThreadContext Map. See the save and restore methods in the sample +[RequestContext.java](https://github.com/apache/logging-log4j-audit-sample/blob/master/audit-service-war/src/main/java/org/apache/logging/log4j/audit/service/RequestContext.java) +for an example of how that can be done. + +$h2 Transporting the RequestContext + +This diagram shows how the RequestContext is created at the beginning of every request where it is used by the +application (including audit logging). It is then converted to HTTP headers by a Spring Interceptor (provided by +Log4j Audit) that are passed on a REST call to a service. The service then uses a servlet filter (provided by Log4j +Audit) to create a RequestContext for use by the service. + +![RequestContext Flow](images/request-context.png) -The RequestContext should be initialized at the beginning of every request and cleared at the end of the request. In -a Spring web application this can be handled in a Servlet Filter similar to this example. +$h3 Initializing the RequestContext + +The RequestContext should be initialized at the beginning of every request and cleared at the end of the request. +In a web application, typically some data is captured during login and is captured in the HTTP session. In a web +application that does not use an HTTP session this data would be stored wherever the equivalent of session data +is stored (for example, the local storage of the browser). This session data is then copied into the RequestContext +on each request in a ServletFilter or a Spring Interceptor similar to the example that follows. Although this +example uses Spring it could be implemented as a Servlet Filter or something similar. ``` public class RequestContextInterceptor implements HandlerInterceptor { @@ -202,7 +155,7 @@ public class RequestContextInterceptor implements HandlerInterceptor { SessionData sessionData = SessionData.getSessionData(session); if (sessionData == null) { logger.info("no account logged in - send to login page"); - response.sendRedirect("/login); + response.sendRedirect("/login"); success = false; } else { startTime.set(System.nanoTime()); @@ -251,11 +204,12 @@ public class RequestContextInterceptor implements HandlerInterceptor { } RequestContext.clear(); } +} ``` -$h2 Passing the RequestContext to a Service +$h3 Passing the RequestContext to a Service -Log4j Audit provides an Interceptor that can be used with Spring applications that will convert RequestContext +Log4j Audit provides an Interceptor that can be used with Spring web applications that will convert RequestContext variables to HTTP headers. The RequestContextHeaderInterceptor can be created by a java configuration method such as: ``` @@ -268,7 +222,10 @@ variables to HTTP headers. The RequestContextHeaderInterceptor can be created by } ``` -The returned list should then be added to the RestTemplate. +Assuming spring-web is being used, the returned list should then be added to the RestTemplate. + +If Spring is not being used a component similar to the RequestContextHeaderInterceptor that is appropriate for the +application could be used instead. The target application then needs to convert the headers back into RequestContext variables by creating a class that extends WebApplicationInitializer that does: @@ -284,8 +241,15 @@ extends WebApplicationInitializer that does: As an added benefit, the RequestContextFilter will log the beginning and end of each request and log the elapsed time at the end of the request. +Although the preceding example uses Spring the code within the method will work for any Java web application that +uses version 3.0 of the servlet spec or greater, provided it is called as the application is being initialized. + +$h2 Configuring Logging to Include RequestContext Variables + When logging RequestContext variables simply configure log4j2.xml to include specific ThreadContext variables or all of them using the %X pattern converter or by setting the includeMdc, includeThreadContext, or properties attribute to true on the desired Layout. +``` +``` http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/src/site/resources/images/request-context.png ---------------------------------------------------------------------- diff --git a/src/site/resources/images/request-context.png b/src/site/resources/images/request-context.png new file mode 100644 index 0000000..b0798a4 Binary files /dev/null and b/src/site/resources/images/request-context.png differ http://git-wip-us.apache.org/repos/asf/logging-log4j-audit/blob/540d9e57/src/site/site.xml ---------------------------------------------------------------------- diff --git a/src/site/site.xml b/src/site/site.xml index b6d1d0b..c29dec8 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -30,20 +30,12 @@ <menu name="Apache Log4j Auditâ¢" inherit="top" img="icon-home"> <item name="About" href="/index.html"/> <item name="Download" href="/download.html"/> - <item name="Javadoc" href="/javadoc.html" collapse="true"> - <item name="Log4j Audit API" href="/log4j-audit/log4j-audit-api/apidocs/index.html" /> - <item name="Audit Service" href="log4j-audit/log4j-audit-war/apidocs/index.html"/> - <item name="Maven Plugin" href="log4j-audit/log4j-audit-maven-plugin/apidocs/index.html"/> - <item name="Catalog API" href="log4j-catalog/log4j-catalog-api/apidocs/index.html"/> - <item name="Git Catalog Access" href="log4j-catalog/log4j-catalog-git/apidocs/index.html"/> - <item name="JPA Catalog Access" href="log4j-catalog/log4j-catalog-jpa/apidocs/index.html"/> - <item name="Catalog Editor" href="log4j-catalog/log4j-catalog-war/apidocs/index.html"/> - </item> <item name="Getting Started" href="/gettingStarted.html"/> <item name="RequestContext" href="/requestContext.html"/> <item name="Audit Catalog" href="catalog.html"/> <item name="Sample Project" href="sample.html"/> <item name="Changelog" href="/changelog.html"/> + <item name="Javadoc" href="/apidocs/index.html"/> </menu> <menu name="For Contributors" inherit="top" img="icon-pencil"> @@ -52,7 +44,7 @@ <item name="Style Guide" href="/javastyle.html"/> </menu> - <menu name="Components" inherit="top" img="icon-cog"> + <menu name="Component Reports" inherit="top" img="icon-cog"> <item name="Audit API" href="log4j-audit/log4j-audit-api/index.html"/> <item name="Audit Service" href="log4j-audit/log4j-audit-war/index.html"/> <item name="Maven Plugin" href="log4j-audit/log4j-audit-maven-plugin/index.html"/> @@ -77,7 +69,6 @@ <menu name="Project Reports" img="icon-cog"> <item name="Changes Report" href="/changes-report.html" /> <item name="JIRA Report" href="/jira-report.html" /> - <item name="Surefire Report" href="/surefire-report.html" /> <item name="RAT Report" href="/rat-report.html" /> </menu> </body>