Skip to content

Commit adf5256

Browse files
committed
Merge branch 'release/5.4.0'
2 parents d8f5659 + fb95847 commit adf5256

16 files changed

Lines changed: 398 additions & 365 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
/.project
33
/.settings/
44
/.README.md.html
5+
/.CHANGELOG.md.html

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
All notable changes to this project are documented in this file following the [Keep a CHANGELOG](http://keepachangelog.com) conventions. We try to apply [Semantic Versioning](http://semver.org) with one particular rule: the version must be equal to or greater than the version of the _authzforce-ce-rest-api-model_ dependency (declared in _rest-service_ module's POM). Indeed, this dependency holds the resources of the REST API specification implemented by this project. Therefore, the rule helps relate a specific version of this project to the specific version of the REST API specification that is implemented/supported.
33

44

5+
## 5.4.0
6+
### Added
7+
- Conformance with [REST Profile of XACML v3.0 Version 1.0](http://docs.oasis-open.org/xacml/xacml-rest/v1.0/xacml-rest-v1.0.html), especially test assertion [urn:oasis:names:tc:xacml:3.0:profile:rest:assertion:home:pdp](http://docs.oasis-open.org/xacml/xacml-rest/v1.0/cs02/xacml-rest-v1.0-cs02.html#_Toc399235433) (FIWARE SEC-923).
8+
9+
### Changed
10+
- REST API model (authzforce-ce-rest-api-model) version: 5.3.1 (only text and FastInfoset-encoded XML are supported, not JSON)
11+
12+
513
## 5.3.0
614
### Changed
715
- Version of dependency `authzforce-ce-pap-dao-flat-file` to `6.0.0`, causing changes to the REST API URL `/domains/{domainId}/pap/pdp.properties` regarding IDs of features of type `urn:ow2:authzforce:feature-type:pdp:request-filter`:

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/cdb9dd59cbf04a95bfbfbdcf770bb7d8)](https://www.codacy.com/app/coder103/authzforce-ce-server?utm_source=github.com&utm_medium=referral&utm_content=authzforce/server&utm_campaign=Badge_Grade)
2-
3-
# AuthZForce Server
1+
# AuthZForce Server (Community Edition)
42
[![License badge](https://img.shields.io/badge/license-GPL-blue.svg)](https://opensource.org/licenses/GPL-3.0)
5-
[![Documentation badge](https://readthedocs.org/projects/authzforce-ce-fiware/badge/?version=release-5.3.0)](http://authzforce-ce-fiware.readthedocs.io/en/release-5.3.0/?badge=release-5.3.0)
3+
[![Documentation badge](https://readthedocs.org/projects/authzforce-ce-fiware/badge/?version=release-5.3.0a)](http://authzforce-ce-fiware.readthedocs.io/en/release-5.3.0a/?badge=release-5.3.0a)
64
[![Docker badge](https://img.shields.io/docker/pulls/fiware/authzforce-ce-server.svg)](https://hub.docker.com/r/fiware/authzforce-ce-server/)
75
[![Support badge]( https://img.shields.io/badge/support-ask.fiware.org-yellowgreen.svg)](https://ask.fiware.org/questions/scope:all/sort:activity-desc/tags:authzforce/)
6+
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/cdb9dd59cbf04a95bfbfbdcf770bb7d8)](https://www.codacy.com/app/coder103/authzforce-ce-server?utm_source=github.com&utm_medium=referral&utm_content=authzforce/server&utm_campaign=Badge_Grade)
87

98
AuthZForce Server provides a multi-tenant RESTful API to Policy Administration Points (PAP) and Policy Decision Points (PDP) as defined in the [OASIS XACML 3.0 standard](http://docs.oasis-open.org/xacml/3.0/xacml-3.0-core-spec-os-en.html).
109

@@ -55,7 +54,7 @@ The sources for the manuals are located in [fiware repository](http://github.com
5554
* Defined in standard [Web Application Description Language and XML schema](https://github.com/authzforce/rest-api-model/tree/develop/src/main/resources) so that you can automatically generate client code.
5655
* Provides access to all PAP/PDP features mentioned in previous sections.
5756
* Multi-tenant: allows to have multiple domains/tenants, each with its own PAP/PDP, in particular its own policy repository.
58-
* Conformance with [REST Profile of XACML v3.0 Version 1.0](http://docs.oasis-open.org/xacml/xacml-rest/v1.0/xacml-rest-v1.0.html) (at the level of each domain) except for test `urn:oasis:names:tc:xacml:3.0:profile:rest:assertion:home:pdp` (to be fixed in next release)
57+
* Conformance with [REST Profile of XACML v3.0 Version 1.0](http://docs.oasis-open.org/xacml/xacml-rest/v1.0/xacml-rest-v1.0.html)
5958
* [Fast Infoset](http://www.itu.int/en/ITU-T/asn1/Pages/Fast-Infoset.aspx) support for requests/responses.
6059

6160
### High availability and load-balancing

dist/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<groupId>org.ow2.authzforce</groupId>
55
<artifactId>authzforce-ce-server</artifactId>
6-
<version>5.3.1-SNAPSHOT</version>
6+
<version>5.4.0</version>
77
<relativePath>..</relativePath>
88
</parent>
99
<artifactId>authzforce-ce-server-dist</artifactId>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</parent>
99
<artifactId>authzforce-ce-server</artifactId>
1010
<!-- FIWARE Versioning + Version must be equal or higher than 'authzforce-ce-rest-api-model' dependency in 'rest-service' module -->
11-
<version>5.3.1-SNAPSHOT</version>
11+
<version>5.4.0</version>
1212
<packaging>pom</packaging>
1313
<name>${project.groupId}:${project.artifactId}</name>
1414
<description>AuthZForce CE Server</description>

rest-service/pom.xml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>org.ow2.authzforce</groupId>
55
<artifactId>authzforce-ce-server</artifactId>
66
<!-- Version must be equal or higher than authzforce-ce-rest-api-model dependency -->
7-
<version>5.3.1-SNAPSHOT</version>
7+
<version>5.4.0</version>
88
<relativePath>..</relativePath>
99
</parent>
1010
<artifactId>authzforce-ce-server-rest-service</artifactId>
@@ -29,10 +29,6 @@
2929
<artifactId>log4j-over-slf4j</artifactId>
3030
<version>${slf4j.version}</version>
3131
</dependency>
32-
<dependency>
33-
<groupId>org.apache.cxf</groupId>
34-
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
35-
</dependency>
3632
<dependency>
3733
<!-- For URL path segment escaper: http://google.github.io/guava/releases/18.0/api/docs/com/google/common/net/UrlEscapers.html#urlPathSegmentEscaper() -->
3834
<groupId>com.google.guava</groupId>
@@ -42,7 +38,7 @@
4238
<dependency>
4339
<groupId>${project.groupId}</groupId>
4440
<artifactId>${artifactId.prefix}-rest-api-model</artifactId>
45-
<version>5.2.0</version>
41+
<version>5.3.1</version>
4642
</dependency>
4743
<dependency>
4844
<groupId>${project.groupId}</groupId>

rest-service/src/main/java/org/ow2/authzforce/rest/service/jaxrs/DomainResourceImpl.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,13 @@ public Domain getDomain()
218218

219219
pdpLink.setHref(pdpResourcePath.value());
220220
pdpLink.setTitle("Policy Decision Point");
221-
pdpLink.setRel(Relation.ITEM);
221+
222+
/*
223+
* Conformance with test assertion 'urn:oasis:names:tc:xacml:3.0:profile:rest:assertion:home:pdp' of REST Profile of XACML v3.0 Version 1.0:
224+
* http://docs.oasis-open.org/xacml/xacml-rest/v1.0/cs02/xacml-rest-v1.0-cs02.html#_Toc399235433. Example:
225+
* http://docs.oasis-open.org/xacml/xacml-rest/v1.0/cs02/xacml-rest-v1.0-cs02.html#_Toc399235419
226+
*/
227+
pdpLink.setRel(Relation.HTTP_DOCS_OASIS_OPEN_ORG_NS_XACML_RELATION_PDP);
222228

223229
final Resources childResources = new Resources(Arrays.asList(propsLink, papLink, pdpLink));
224230
final ReadableDomainProperties props;

rest-service/src/main/java/org/ow2/authzforce/rest/service/jaxrs/DomainsResourceImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
import java.util.List;
2929
import java.util.Set;
3030

31+
import javax.servlet.http.HttpServletRequest;
3132
import javax.ws.rs.BadRequestException;
3233
import javax.ws.rs.InternalServerErrorException;
3334
import javax.ws.rs.NotFoundException;
3435
import javax.ws.rs.core.Context;
3536

36-
import org.apache.cxf.jaxrs.ext.MessageContext;
3737
import org.ow2.authzforce.core.pap.api.dao.DomainsDAO;
3838
import org.ow2.authzforce.rest.api.jaxrs.DomainResource;
3939
import org.ow2.authzforce.rest.api.jaxrs.DomainsResource;
@@ -53,7 +53,7 @@ public class DomainsResourceImpl implements DomainsResource
5353
private static final BadRequestException INVALID_ARG_BAD_REQUEST_EXCEPTION = new BadRequestException("Invalid argument");
5454

5555
@Context
56-
private MessageContext messageContext;
56+
private HttpServletRequest httpRequest;
5757

5858
private final DomainsDAO<DomainResourceImpl<?>> domainRepo;
5959

@@ -130,7 +130,7 @@ public Resources getDomains(String externalId)
130130
// add domain on the fly
131131
// rename to resourceCollection
132132
final Set<String> authorizedDomainIDs = new HashSet<>();
133-
final Object attrVal = messageContext == null ? null : messageContext.getHttpServletRequest().getAttribute(authorizedResourceAttrId);
133+
final Object attrVal = httpRequest == null ? null : httpRequest.getAttribute(authorizedResourceAttrId);
134134
// attrVal may be null
135135
if (attrVal == null)
136136
{

0 commit comments

Comments
 (0)