Commit a7fec420 authored by cdanger's avatar cdanger

Merge branch 'release/5.0.0'

parents b5e80036 61710821
......@@ -8,3 +8,4 @@ pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
/.pmd
......@@ -2,6 +2,18 @@
All notable changes to this project are documented in this file following the [Keep a CHANGELOG](http://keepachangelog.com) conventions.
## 5.0.0
### Changed
- Renamed enum XACMLCategory to XACMLAttributeCategory and simplified its constants
- Renamed/simplified XACMLAttributeId enum constants
- Managed dependency versions:
SLF4J: 1.7.6 -> 1.7.22
CXF: 3.1.9 -> 3.1.10
Spring: 4.3.5 -> 4.3.6
Logback-classic: 1.1.1 -> 1.1.9
Guava: 20.0 -> 21.0
## 4.1.1
### Fixed
- Upgraded OWASP dependency-check maven plugin: 1.4.4 -> 1.4.4.1 => fix issue with multi-module projects (#617 on GitHub)
......
......@@ -3,7 +3,7 @@
<parent>
<groupId>org.ow2.authzforce</groupId>
<artifactId>authzforce-ce-parent</artifactId>
<version>4.1.1</version>
<version>5.0.0</version>
</parent>
<artifactId>authzforce-ce-atom-model</artifactId>
<packaging>jar</packaging>
......
......@@ -3,7 +3,7 @@
<parent>
<groupId>org.ow2.authzforce</groupId>
<artifactId>authzforce-ce-parent</artifactId>
<version>4.1.1</version>
<version>5.0.0</version>
</parent>
<artifactId>authzforce-ce-pdp-ext-model</artifactId>
<name>${project.groupId}:${project.artifactId}</name>
......
......@@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.ow2.authzforce</groupId>
<artifactId>authzforce-ce-parent</artifactId>
<version>4.1.1</version>
<version>5.0.0</version>
<packaging>pom</packaging>
<name>${project.groupId}:${project.artifactId}</name>
<description>AuthZforce - Super Parent of all AuthZForce components</description>
......@@ -21,10 +21,10 @@
<git.url.base>https://tuleap.ow2.org/plugins/git/authzforce</git.url.base>
<jaxb2-basics.version>0.11.1</jaxb2-basics.version>
<jaxb2-value-constructor.version>3.0</jaxb2-value-constructor.version>
<slf4j.version>1.7.6</slf4j.version>
<slf4j.version>1.7.22</slf4j.version>
<!-- This version must match the Spring version used by 'logback-ext-spring' in dependencyManagement. -->
<spring.version>4.3.5.RELEASE</spring.version>
<cxf.version>3.1.9</cxf.version>
<spring.version>4.3.6.RELEASE</spring.version>
<cxf.version>3.1.10</cxf.version>
</properties>
<url>${project.url}</url>
<inceptionYear>2012</inceptionYear>
......@@ -98,7 +98,7 @@
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<!-- This version must match the version used by the one of 'logback-ext-spring' above. -->
<version>1.1.1</version>
<version>1.1.9</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
......@@ -158,7 +158,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>20.0</version>
<version>21.0</version>
</dependency>
<!-- /Third party dependencies -->
<!-- Common AuthZForce CE dependencies. Only child modules here (see <modules>). -->
......@@ -166,25 +166,25 @@
<groupId>${project.groupId}</groupId>
<artifactId>${artifactId.prefix}-xmlns-model</artifactId>
<!-- Version updated automatically by maven jgitflow:release-start -->
<version>4.1.1</version>
<version>5.0.0</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${artifactId.prefix}-atom-model</artifactId>
<!-- Version updated automatically by maven jgitflow:release-start -->
<version>4.1.1</version>
<version>5.0.0</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${artifactId.prefix}-xacml-model</artifactId>
<!-- Version updated automatically by maven jgitflow:release-start -->
<version>4.1.1</version>
<version>5.0.0</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${artifactId.prefix}-pdp-ext-model</artifactId>
<!-- Version updated automatically by maven jgitflow:release-start -->
<version>4.1.1</version>
<version>5.0.0</version>
</dependency>
<!-- /Common AuthZForce CE dependencies -->
</dependencies>
......
......@@ -3,3 +3,4 @@
/.classpath
/.project
/bin
/.pmd
......@@ -3,7 +3,7 @@
<parent>
<groupId>org.ow2.authzforce</groupId>
<artifactId>authzforce-ce-parent</artifactId>
<version>4.1.1</version>
<version>5.0.0</version>
</parent>
<artifactId>authzforce-ce-xacml-model</artifactId>
<name>${project.groupId}:${project.artifactId}</name>
......@@ -32,8 +32,7 @@
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<header>license/thales-gpl.txt</header>
<skipExistingHeaders>true</skipExistingHeaders>
<header>license/thales-gpl.header.txt</header>
<includes>
<include>src/main/java/**</include>
<include>src/test/java/**</include>
......
/**
* Copyright (C) 2012-2016 Thales Services SAS.
* Copyright (C) 2012-2017 Thales Services SAS.
*
* This file is part of AuthZForce CE.
*
......@@ -23,58 +23,58 @@ package org.ow2.authzforce.xacml.identifiers;
/**
* XACML Version. The actual version IDs are returned by {@link XACMLCategory#ordinal()} and match the XACML version integers defined in SunXACML PolicyMetadata class.
* XACML Version. The actual version IDs are returned by {@link XACMLAttributeCategory#ordinal()} and match the XACML version integers defined in SunXACML PolicyMetadata class.
*
*/
public enum XACMLCategory
public enum XACMLAttributeCategory
{
/**
* Subject Category
* urn:oasis:names:tc:xacml:1.0:subject-category:access-subject
*/
XACML_1_0_SUBJECT_CATEGORY_ACCESS_SUBJECT("urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"),
XACML_1_0_ACCESS_SUBJECT("urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"),
/**
* urn:oasis:names:tc:xacml:1.0:subject-category:codebase
*/
XACML_1_0_SUBJECT_CATEGORY_CODEBASE("urn:oasis:names:tc:xacml:1.0:subject-category:codebase"),
XACML_1_0_SUBJECT_CODEBASE("urn:oasis:names:tc:xacml:1.0:subject-category:codebase"),
/**
* urn:oasis:names:tc:xacml:1.0:subject-category:intermediary-subject
*/
XACML_1_0_SUBJECT_CATEGORY_INTERMEDIARY_SUBJECT("urn:oasis:names:tc:xacml:1.0:subject-category:intermediary-subject"),
XACML_1_0_INTERMEDIARY_SUBJECT("urn:oasis:names:tc:xacml:1.0:subject-category:intermediary-subject"),
/**
* urn:oasis:names:tc:xacml:1.0:subject-category:recipient-subject
*/
XACML_1_0_SUBJECT_CATEGORY_RECIPIENT_SUBJECT("urn:oasis:names:tc:xacml:1.0:subject-category:recipient-subject"),
XACML_1_0_RECIPIENT_SUBJECT("urn:oasis:names:tc:xacml:1.0:subject-category:recipient-subject"),
/**
* urn:oasis:names:tc:xacml:1.0:subject-category:requesting-machine
*/
XACML_1_0_SUBJECT_CATEGORY_REQUESTING_MACHINE("urn:oasis:names:tc:xacml:1.0:subject-category:requesting-machine"),
XACML_1_0_SUBJECT_REQUESTING_MACHINE("urn:oasis:names:tc:xacml:1.0:subject-category:requesting-machine"),
/**
* Resource Category
*
* urn:oasis:names:tc:xacml:3.0:attribute-category:resource
*/
XACML_3_0_RESOURCE_CATEGORY_RESOURCE("urn:oasis:names:tc:xacml:3.0:attribute-category:resource"),
XACML_3_0_RESOURCE("urn:oasis:names:tc:xacml:3.0:attribute-category:resource"),
/**
* Action Category
*/
XACML_3_0_ACTION_CATEGORY_ACTION("urn:oasis:names:tc:xacml:3.0:attribute-category:action"),
XACML_3_0_ACTION("urn:oasis:names:tc:xacml:3.0:attribute-category:action"),
/**
* Environment Category
* urn:oasis:names:tc:xacml:3.0:attribute-category:environment
*/
XACML_3_0_ENVIRONMENT_CATEGORY_ENVIRONMENT("urn:oasis:names:tc:xacml:3.0:attribute-category:environment");
XACML_3_0_ENVIRONMENT("urn:oasis:names:tc:xacml:3.0:attribute-category:environment");
private final String value;
XACMLCategory(String v) {
XACMLAttributeCategory(String v) {
value = v;
}
......@@ -89,8 +89,8 @@ public enum XACMLCategory
* @param v XACML identifier for this category
* @return XACMLCategory
*/
public static XACMLCategory fromValue(String v) {
for (XACMLCategory c : XACMLCategory.values()) {
public static XACMLAttributeCategory fromValue(String v) {
for (XACMLAttributeCategory c : XACMLAttributeCategory.values()) {
if (c.value.equals(v)) {
return c;
}
......
/**
* Copyright (C) 2012-2016 Thales Services SAS.
* Copyright (C) 2012-2017 Thales Services SAS.
*
* This file is part of AuthZForce CE.
*
......@@ -22,140 +22,148 @@ package org.ow2.authzforce.xacml.identifiers;
* XACML standard attribute identifiers
*
*/
public enum XACMLAttributeId {
public enum XACMLAttributeId
{
/*
* Subject
*/
/**
*
* XACML 3.0, §10.2.6
*/
XACML_SUBJECT_DNS_NAME("urn:oasis:names:tc:xacml:1.0:subject:authn-locality:dns-name"),
XACML_1_0_SUBJECT_DNS_NAME("urn:oasis:names:tc:xacml:1.0:subject:authn-locality:dns-name"),
/**
*
*/
XACML_SUBJECT_IP_ADDRESS("urn:oasis:names:tc:xacml:1.0:subject:authn-locality:ip-address"),
XACML_1_0_SUBJECT_IP_ADDRESS("urn:oasis:names:tc:xacml:1.0:subject:authn-locality:ip-address"),
/**
*
*/
XACML_SUBJECT_AUTHENTICATION_METHOD("urn:oasis:names:tc:xacml:1.0:subject:authentication-method"),
XACML_1_0_SUBJECT_AUTHENTICATION_METHOD("urn:oasis:names:tc:xacml:1.0:subject:authentication-method"),
/**
*
*/
XACML_SUBJECT_AUTHENTICATION_TIME("urn:oasis:names:tc:xacml:1.0:subject:authentication-time"),
XACML_1_0_SUBJECT_AUTHENTICATION_TIME("urn:oasis:names:tc:xacml:1.0:subject:authentication-time"),
/**
*
*/
XACML_SUBJECT_KEY_INFO("urn:oasis:names:tc:xacml:1.0:subject:key-info"),
XACML_1_0_SUBJECT_KEY_INFO("urn:oasis:names:tc:xacml:1.0:subject:key-info"),
/**
*
*/
XACML_SUBJECT_REQUEST_TIME("urn:oasis:names:tc:xacml:1.0:subject:request-time"),
XACML_1_0_SUBJECT_REQUEST_TIME("urn:oasis:names:tc:xacml:1.0:subject:request-time"),
/**
*
*/
XACML_SUBJECT_SESSION_START_TIME("urn:oasis:names:tc:xacml:1.0:subject:session-start-time"),
XACML_1_0_SUBJECT_SESSION_START_TIME("urn:oasis:names:tc:xacml:1.0:subject:session-start-time"),
/**
*
*/
XACML_SUBJECT_SUBJECT_ID("urn:oasis:names:tc:xacml:1.0:subject:subject-id"),
XACML_1_0_SUBJECT_ID("urn:oasis:names:tc:xacml:1.0:subject:subject-id"),
/**
*
*/
XACML_SUBJECT_SUBJECT_ID_QUALIFIER("urn:oasis:names:tc:xacml:1.0:subject:subject-id-qualifier"),
XACML_1_0_SUBJECT_ID_QUALIFIER("urn:oasis:names:tc:xacml:1.0:subject:subject-id-qualifier"),
/**
*
* XACML 3.0 RBAC Profile, §6.2
*/
XACML_SUBJECT_SUBJECT_ID_ROLE("urn:oasis:names:tc:xacml:1.0:subject:subject-id-role"),
XACML_2_0_SUBJECT_ROLE("urn:oasis:names:tc:xacml:2.0:subject:role"),
/*
* Resource
*/
/**
*
* XACML 3.0, §10.2.6
*/
XACML_RESOURCE_RESOURCE_ID("urn:oasis:names:tc:xacml:1.0:resource:resource-id"),
XACML_1_0_RESOURCE_ID("urn:oasis:names:tc:xacml:1.0:resource:resource-id"),
/**
*
*/
XACML_RESOURCE_RESOURCE_LOCATION("urn:oasis:names:tc:xacml:1.0:resource:resource-location"),
XACML_1_0_RESOURCE_LOCATION("urn:oasis:names:tc:xacml:1.0:resource:resource-location"),
/**
* The standard URI for the resource's scope in XACML v3.0 (resp. v2.0) multiple decision (resp. resource) profile.
* @see XACMLResourceScope possible scopes
*/
XACML_RESOURCE_SCOPE("urn:oasis:names:tc:xacml:2.0:resource:scope"),
* The standard URI for the resource's scope in XACML v3.0 (resp. v2.0) multiple decision (resp. resource) profile.
*
* @see XACMLResourceScope possible scopes
*/
XACML_2_0_RESOURCE_SCOPE("urn:oasis:names:tc:xacml:2.0:resource:scope"),
/**
*
*/
XACML_RESOURCE_SIMPLE_FILE_NAME("urn:oasis:names:tc:xacml:1.0:resource:simple-file-name"),
XACML_1_0_RESOURCE_SIMPLE_FILE_NAME("urn:oasis:names:tc:xacml:1.0:resource:simple-file-name"),
/**
* XACML v3.0 Multiple Decision Profile Version 1.0
*/
XACML_3_0_PROFILE_MULTIPLE_CONTENT_SELECTOR("urn:oasis:names:tc:xacml:3.0:profile:multiple:content-selector"),
/*
* Action
*
* XACML 3.0, §10.2.6
*/
/**
* urn:oasis:names:tc:xacml:1.0:action:action-id
*/
XACML_ACTION_ACTION_ID("urn:oasis:names:tc:xacml:1.0:action:action-id"),
XACML_1_0_ACTION_ID("urn:oasis:names:tc:xacml:1.0:action:action-id"),
/**
*
*/
XACML_ACTION_IMPLIED_ACTION("urn:oasis:names:tc:xacml:1.0:action:implied-action"),
XACML_1_0_ACTION_IMPLIED_ACTION("urn:oasis:names:tc:xacml:1.0:action:implied-action"),
/*
* Environment
*/
/**
*
* XACML 3.0, §10.2.5
*/
XACML_1_0_ENVIRONMENT_CURRENT_TIME("urn:oasis:names:tc:xacml:1.0:environment:current-time"),
/**
*
*/
XACML_1_0_ENVIRONMENT_CURRENT_DATE("urn:oasis:names:tc:xacml:1.0:environment:current-date"),
/**
*
*/
XACML_1_0_ENVIRONMENT_CURRENT_DATETIME("urn:oasis:names:tc:xacml:1.0:environment:current-dateTime"),
/**
* XACML v3.0 Multiple Decision Profile Version 1.0
*/
MULTIPLE_CONTENT_SELECTOR("urn:oasis:names:tc:xacml:3.0:profile:multiple:content-selector"),
/**
* XACML v3.0 Hierarchical Resource Profile Version 1.0, XACML v3.0 Multiple Decision Profile Version 1.0
*/
CONTENT_SELECTOR("urn:oasis:names:tc:xacml:3.0:content-selector");
XACML_1_0_ENVIRONMENT_CURRENT_DATETIME("urn:oasis:names:tc:xacml:1.0:environment:current-dateTime");
private final String value;
XACMLAttributeId(String v) {
XACMLAttributeId(final String v)
{
value = v;
}
/**
* Get attribute ID (URI)
*
* @return attribute ID
*/
public String value() {
public String value()
{
return value;
}
/**
* Get enum constant for a given standard attribute ID
* @param v
*
* @param identifier
* attribute identifier
* @return enum constant for this attribute ID
*/
public static XACMLAttributeId fromValue(String v) {
for (XACMLAttributeId c : XACMLAttributeId.values()) {
if (c.value.equals(v)) {
public static XACMLAttributeId fromValue(final String identifier)
{
for (final XACMLAttributeId c : XACMLAttributeId.values())
{
if (c.value.equals(identifier))
{
return c;
}
}
throw new IllegalArgumentException(v);
throw new IllegalArgumentException(identifier);
}
}
\ No newline at end of file
/**
* Copyright (C) 2012-2016 Thales Services SAS.
* Copyright (C) 2012-2017 Thales Services SAS.
*
* This file is part of AuthZForce CE.
*
......@@ -96,14 +96,12 @@ public enum XACMLDatatypeId
XPATH_EXPRESSION("urn:oasis:names:tc:xacml:3.0:data-type:xpathExpression");
/**
* Prefix of URI of XML schema built-in datatypes (used in XACML), up to the '#' included:
* {@value #XML_SCHEMA_URI_PREFIX}
* Prefix of URI of XML schema built-in datatypes (used in XACML), up to the '#' included: {@value #XML_SCHEMA_URI_PREFIX}
*/
public static final String XML_SCHEMA_URI_PREFIX = "http://www.w3.org/2001/XMLSchema#";
/**
* Length of {@link #XML_SCHEMA_URI_PREFIX}, used for extracting suffix from datatypes in order
* to create XACML function names, logging types of data, etc.
* Length of {@link #XML_SCHEMA_URI_PREFIX}, used for extracting suffix from datatypes in order to create XACML function names, logging types of data, etc.
*/
public static final int XML_SCHEMA_URI_PREFIX_LENGTH = XACMLDatatypeId.XML_SCHEMA_URI_PREFIX.length();
......@@ -119,26 +117,28 @@ public enum XACMLDatatypeId
return value;
}
private XACMLDatatypeId(String v)
private XACMLDatatypeId(final String v)
{
value = v;
}
/**
* Get datatype enum constant from datatype URI
* @param v
*
* @param datatypeURI
* datatype idenfifier (URI)
* @return Datatype enum
*/
public static XACMLDatatypeId fromValue(String v)
public static XACMLDatatypeId fromValue(final String datatypeURI)
{
for (XACMLDatatypeId c : XACMLDatatypeId.values())
for (final XACMLDatatypeId c : XACMLDatatypeId.values())
{
if (c.value.equals(v))
if (c.value.equals(datatypeURI))
{
return c;
}
}
throw new IllegalArgumentException(v);
throw new IllegalArgumentException(datatypeURI);
}
}
/**
* Copyright (C) 2012-2016 Thales Services SAS.
* Copyright (C) 2012-2017 Thales Services SAS.
*
* This file is part of AuthZForce CE.
*
......@@ -22,12 +22,11 @@
package org.ow2.authzforce.xacml.identifiers;
/**
* XACML node names, as defined in XACML Core Specification (declared in the
* same order). There may be fewer names than defined in the XACML schema. There
* are added progressively as needed.
* XACML node names, as defined in XACML Core Specification (declared in the same order). There may be fewer names than defined in the XACML schema. There are added progressively as needed.
*
*/
public enum XACMLNodeName {
public enum XACMLNodeName
{
/**
* Special name to represent any node
......@@ -83,77 +82,77 @@ public enum XACMLNodeName {
*
*/
COMBINER_PARAMETER("CombinerParameter"),
/**
*
*/
RULE("Rule"),
/**
*
*/
VARIABLE_DEFINITION("VariableDefinition"),
/**
*
*/
VARIABLE_REFERENCE("VariableReference"),
/**
*
*/
CONDITION("Condition"),
/**
*
*/
APPLY("Apply"),
/**
*
*/
FUNCTION("Function"),
/**
*
*/
ATTRIBUTE_DESIGNATOR("AttributeDesignator"),
/**
*
*/
ATTRIBUTE_SELECTOR("AttributeSelector"),
/**
*
*/
ATTRIBUTE_VALUE("AttributeValue"),
/**
*
*/
OBLIGATION("Obligation"),
/**
*
*/
ADVICE("Advice"),
/**
*
*/
ATTRIBUTE_ASSIGNMENT("AttributeAssignment"),
/**
*
*/
OBLIGATION_EXPRESSION("ObligationExpression"),
/**
*
*/
ADVICE_EXPRESSION("AdviceExpression"),
/**
*
*/
......@@ -216,26 +215,32 @@ public enum XACMLNodeName {
*
* @return datatype URI
*/
public String value() {
public String value()
{
return value;
}
private XACMLNodeName(String v) {
private XACMLNodeName(final String v)
{
value = v;
}
/**
* Get enum constant from value
*
* @param v
* @param nodeName
* XACML node name
* @return enum constant
*/
public static XACMLNodeName fromValue(String v) {
for (XACMLNodeName c : XACMLNodeName.values()) {
if (c.value.equals(v)) {
public static XACMLNodeName fromValue(final String nodeName)
{
for (final XACMLNodeName c : XACMLNodeName.values())
{
if (c.value.equals(nodeName))
{
return c;
}
}
throw new IllegalArgumentException(v);
throw new IllegalArgumentException(nodeName);
}
}
/**
* Copyright (C) 2012-2016 Thales Services SAS.
* Copyright (C) 2012-2017 Thales Services SAS.
*
* This file is part of AuthZForce CE.
*
......@@ -39,8 +39,7 @@ public enum XACMLResourceScope
CHILDREN("Children"),
/**
* Resource scope of Descendants (the given resource and all descendants at any depth or
* distance)
* Resource scope of Descendants (the given resource and all descendants at any depth or distance)
*/
DESCENDANTS("Descendants");
......@@ -56,7 +55,7 @@ public enum XACMLResourceScope
return value;
}
private XACMLResourceScope(String v)
private XACMLResourceScope(final String v)
{
value = v;
}
......@@ -64,18 +63,19 @@ public enum XACMLResourceScope
/**
* Get resource scope constant from value
*
* @param v
* @param scopeId
* resource scope identifier
* @return Resource scope enum
*/
public static XACMLResourceScope fromValue(String v)
public static XACMLResourceScope fromValue(final String scopeId)
{
for (XACMLResourceScope c : XACMLResourceScope.values())
for (final XACMLResourceScope c : XACMLResourceScope.values())
{
if (c.value.equals(v))
if (c.value.equals(scopeId))
{
return c;
}
}
throw new IllegalArgumentException(v);
throw new IllegalArgumentException(scopeId);
}
}
/**
* Copyright (C) 2012-2016 Thales Services SAS.
* Copyright (C) 2012-2017 Thales Services SAS.
*
* This file is part of AuthZForce CE.
*
......
/**
* Copyright (C) 2012-2016 Thales Services SAS.
* Copyright (C) 2012-2017 Thales Services SAS.
*
* This file is part of AuthZForce CE.
*
......
/**
* Copyright (C) 2012-2016 Thales Services SAS.
* Copyright (C) 2012-2017 Thales Services SAS.
*
* This file is part of AuthZForce CE.
*
......