Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Debian11 and log4shell patch #46

Merged
merged 8 commits into from
Jan 11, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ install:
env:
jobs:
- MOLECULE_DISTRO=idealista/jdk:8u252-stretch-openjdk-headless
- MOLECULE_DISTRO=idealista/jdk:8u922-bullseye-adoptopenjdk-headless
script:
- pipenv run molecule test

Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a changelog](https://github.com/olivierlacan/keep-a-changelog).

## [Unreleased](https://github.com/idealista/wildfly_role/tree/develop)
### Added
- *[#44](https://github.com/idealista/wildfly_role/issues/44) Add log4shell prevention flag by default* @vicsufer
### Changed
- *[#45](https://github.com/idealista/wildfly_role/issues/45) Upgrade role dev dependencies* @vicsufer
- *[#45](https://github.com/idealista/wildfly_role/issues/45) Dropped debian8 (jessie) support in favour of debian11 (bullseye)* @vicsufer

## [1.6.2](https://github.com/idealista/wildfly_role/tree/1.6.0) (2021-06-03)
[Full Changelog](https://github.com/idealista/wildfly_role/compare/1.6.1...1.6.2)
Expand Down
18 changes: 10 additions & 8 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
name = "pypi"

[packages]
ansible = "==2.9.14"
ansible-lint = "==4.2.0"
molecule = "==3.0.4"
docker = "==4.2.2"
ansible = "==4.6.0"
ansible-lint = "==5.3.2"
molecule = "==3.5.2"
docker = "==5.0.3"
molecule-containers = "==1.0.0"
yamllint = "==1.26.3"

[dev-packages]

[requires]
python_version = "3.7"
python_version = "3.9"
718 changes: 404 additions & 314 deletions Pipfile.lock

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
galaxy_info:
role_name: wildfly_role
namespace: idealista
company: Idealista S.A.U.
author: Idealista S.A.U.
description: wildfly role to install and configure this server
Expand All @@ -8,7 +10,7 @@ galaxy_info:
platforms:
- name: Debian
versions:
- jessie
- bullseye
- stretch
galaxy_tags:
- container
10 changes: 8 additions & 2 deletions molecule/default/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ FROM {{ item.registry.url }}/{{ item.image }}
FROM {{ item.image }}
{% endif %}

# install minimal packages for debian slim images
{% if item.image == 'idealista/jdk:8u292-bullseye-adoptopenjdk-headless' %}
RUN apt-get update && \
apt-get install -y python3 sudo bash ca-certificates iproute2 systemd systemd-sysv python3-pip && \
update-alternatives --install /usr/bin/python python /usr/bin/python3 0 &&\
apt-get clean
{% else %}
RUN apt-get update && \
apt-get install -y python sudo bash ca-certificates iproute2 systemd systemd-sysv python-pip curl && \
apt-get clean
apt-get clean
{% endif %}
1 change: 0 additions & 1 deletion molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
- name: Converge
hosts: all
roles:
- role: java
- role: wildfly_role
3 changes: 0 additions & 3 deletions molecule/default/group_vars/wildfly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,3 @@ wildfly_agents_config:

wildfly_agents_required_libs:
- unzip

## JAVA
java_jdk_vendor: openjdk
2 changes: 1 addition & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ platforms:
- name: wildfly
groups:
- wildfly
image: ${MOLECULE_DISTRO:-idealista/jdk:8u252-stretch-openjdk-headless}
image: ${MOLECULE_DISTRO:-idealista/jdk:8u292-bullseye-adoptopenjdk-headless}
privileged: false
command: '/lib/systemd/systemd'
capabilities:
Expand Down
4 changes: 0 additions & 4 deletions molecule/default/requirements.yml

This file was deleted.

2 changes: 2 additions & 0 deletions molecule/default/templates/wildfly/conf/standalone.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManage
JAVA_OPTS="$JAVA_OPTS {{ option }}"
{% endfor %}
{% endif%}
# Prevent log4shell
JAVA_OPTS="$JAVA_OPTS -Dlog4j2.formatMsgNoLookups=true -Djava.security.egd=file:///dev/urandom"

jboss.http.port={{ wildfly_port }}
jboss.bind.address={{ wildfly_bind }}
2 changes: 2 additions & 0 deletions templates/standalone.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Dj
JAVA_OPTS="$JAVA_OPTS {{ option }}"
{% endfor %}
{% endif%}
# Prevent log4shell
JAVA_OPTS="$JAVA_OPTS -Dlog4j2.formatMsgNoLookups=true -Djava.security.egd=file:///dev/urandom"


jboss.http.port={{ wildfly_port }}
Expand Down
10 changes: 6 additions & 4 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
ansible==2.9.14
ansible-lint==4.2.0
molecule==3.0.4
docker==4.2.2
ansible==4.6.0
ansible-lint==5.3.2
molecule==3.5.2
docker==5.0.3
molecule-containers==1.0.0
yamllint==1.26.3