-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
562 additions
and
409 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Copyright (C) 2012-2017 Thales Services SAS. | ||
# | ||
# This file is part of AuthZForce CE. | ||
# | ||
# AuthZForce CE is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# AuthZForce CE is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with AuthZForce CE. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
# Best practices for writing Dockerfiles: | ||
# https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/ | ||
|
||
# Tips to do an unattended installation on Debian/Ubuntu: | ||
# http://www.microhowto.info/howto/perform_an_unattended_installation_of_a_debian_package.html | ||
|
||
# The alternative is to use FROM ubuntu:* then install tomcat ubuntu package and use upstart/sysctl init script but this is not the way to go: | ||
# https://github.com/docker/docker/issues/6800 | ||
FROM tomcat:8-jre8 | ||
MAINTAINER AuthzForce Team (contact mailing list: http://scr.im/azteam) | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# Proxy configuration (if you are building from behind a proxy) | ||
# Next release of docker 1.9.0 should allow you to configure these by passing build-time arguments | ||
# More info: https://github.com/docker/docker/issues/14634 | ||
|
||
#ENV http_proxy 'http://user:password@proxy-host:proxy-port' | ||
#ENV https_proxy 'http://user:password@proxy-host:proxy-port' | ||
#ENV HTTP_PROXY 'http://user:password@proxy-host:proxy-port' | ||
#ENV HTTPS_PROXY 'http://user:password@proxy-host:proxy-port' | ||
|
||
ENV JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true -Djavax.xml.accessExternalSchema=http -Xms1024m -Xmx1024m -XX:+UseConcMarkSweepGC -server" | ||
|
||
ENV AUTHZFORCE_SERVER_VERSION="7.1.0" | ||
ENV AUTHZFORCE_SERVER_DOWNLOAD_URL="http://repo1.maven.org/maven2/org/ow2/authzforce/authzforce-ce-server-dist/$AUTHZFORCE_SERVER_VERSION/authzforce-ce-server-dist-$AUTHZFORCE_SERVER_VERSION.deb" | ||
|
||
# Download and install Authzforce Server (service starts automatically) | ||
# Where there is a command with a pipe, we need to put in between quotes and make it an argument to bash -c command | ||
RUN apt-get update --assume-yes -qq && \ | ||
apt-get install --assume-yes -qq \ | ||
locales-all \ | ||
locales \ | ||
less \ | ||
apt-utils \ | ||
debconf-utils \ | ||
gdebi \ | ||
curl && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN locale-gen en_US en_US.UTF-8 | ||
RUN dpkg-reconfigure locales | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US:en | ||
ENV LC_ALL en_US.UTF-8 | ||
|
||
RUN curl --silent --output authzforce-ce-server.deb --location $AUTHZFORCE_SERVER_DOWNLOAD_URL && \ | ||
dpkg --extract authzforce-ce-server.deb /root/authzforce/ && \ | ||
mv /root/authzforce/etc/tomcat8/Catalina /usr/local/tomcat/conf/ && \ | ||
mv /root/authzforce/opt/* /opt/ && \ | ||
rm -rf /opt/authzforce-ce-server/data/domains/* && \ | ||
rm -rf /root/authzforce && \ | ||
rm -f authzforce-ce-server.deb | ||
CMD ["catalina.sh", "run"] | ||
|
||
### Exposed ports | ||
# - App server | ||
EXPOSE 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
## AuthzForce Server CE - Minimal Docker image | ||
|
||
This image of a minimal AuthzForce Server runtime is intended to work together with [Identity Manager - Keyrock](http://catalogue.fiware.org/enablers/identity-management-keyrock) and [PEP Proxy Wilma](http://catalogue.fiware.org/enablers/pep-proxy-wilma) generic enabler. | ||
|
||
## Image contents | ||
- OpenJDK JRE 8; | ||
- Tomcat 8; | ||
- AuthzForce Server CE (version matching the Docker image tag). | ||
|
||
## Usage | ||
|
||
This image gives you a minimal installation for testing purposes. The AuthzForce Installation and Administration guide on [readthedocs.org](https://readthedocs.org/projects/authzforce-ce-fiware/versions/) (select the version matching the Docker image tag, then **AuthzForce - Installation and Administration Guide**) provides you a better approach for using it in a production environment. This installation guide also gives instructions to install from .deb package (instead of Docker), which is the recommended way for Ubuntu hosts. | ||
|
||
Create a container using `authzforce/server` image by doing (replace the first *8080* after *-p* with whatever network port you want to use on the host to access the AuthzForce Server, e.g. 80; and *release-7.1.0* with the current Docker image tag that you are using): | ||
|
||
``` | ||
docker run -d -p 8080:8080 --name <container-name> fiware/authzforce-ce-server:release-7.1.0 | ||
``` | ||
|
||
As stands in the AuthZForce Installation and administration guide on [readthedocs.org](https://readthedocs.org/projects/authzforce-ce-fiware/versions/) (select the version matching the Docker image tag, then **AuthzForce - Installation and Administration Guide**) you can: | ||
|
||
* **Create a domain** | ||
|
||
``` | ||
curl -s --request POST \ | ||
--header "Accept: application/xml" \ | ||
--header "Content-Type: application/xml;charset=UTF-8" \ | ||
--data '<?xml version="1.0" encoding="UTF-8"?><taz:domainProperties xmlns:taz="http://authzforce.github.io/rest-api-model/xmlns/authz/5" />' \ | ||
http://<authzforce-container-ip>:8080/authzforce-ce/domains | ||
``` | ||
|
||
* **Retrieve the domain ID** | ||
|
||
``` | ||
curl -s --request GET http://<authzforce-container-ip>:8080/authzforce-ce/domains | ||
``` | ||
|
||
* **Domain removal** | ||
|
||
``` | ||
curl --verbose --request DELETE \ | ||
--header "Content-Type: application/xml;charset=UTF-8" \ | ||
--header "Accept: application/xml" \ | ||
http://<authzforce-container-ip>:8080/authzforce-ce/domains/<domain-id> | ||
``` | ||
|
||
* **User and Role Management Setup && Domain Role Assignment** | ||
|
||
These tasks are now delegated to the [Identity Manager - Keyrock](http://catalogue.fiware.org/enablers/identity-management-keyrock) enabler. Here you can find how to use the interface for that purpose: [How to manage AuthzForce in Fiware](https://www.fiware.org/devguides/handling-authorization-and-access-control-to-apis/how-to-manage-access-control-in-fiware/). | ||
|
||
## User feedback | ||
|
||
### Documentation | ||
|
||
All the information regarding the Dockerfile is hosted publicly on [Github](https://github.com/authzforce/server/tree/master/src/docker). | ||
|
||
### Issues | ||
|
||
If you find any issue with this image, feel free to report at [Github issue tracking system](https://github.com/authzforce/server/issues). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...ervice/src/main/java/org/ow2/authzforce/rest/service/jaxrs/BadRequestExceptionMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.