docker-is icon indicating copy to clipboard operation
docker-is copied to clipboard

Store java preferences in the intended location

Open NCMEC-daavendasora opened this issue 2 years ago • 1 comments

Purpose

Resolves:

  • #355
  • #356

Goals

Correct the Dockerfiles for Alpine, Centos, & Ubuntu to store both system and user java preferences in the intended location according to the code comments in the Dockerfiles: Dockerfile comment: https://github.com/wso2/docker-is/blob/d0d177a32d1f112f47d17122a19a98ea09bb10d2/dockerfiles/centos/is/Dockerfile#L87-L88

Approach

  1. For #355 followed the implementation (with changes) already implemented in Ubuntu Dockerfile, i.e., add system properties to the JAVA_OPTS environment variable and pass it to the image.
  2. For #356 removed redundant path elements so user preferences will be stored directly in /home/wso2carbon/.java/.userPrefs and not subdirectories.

Release note

Allow WSO2IS to successfully store java system and user preferences without needing to give wso2carbon user R/W permissions to /etc/.java

Documentation

https://github.com/wso2/docker-is/blob/d0d177a32d1f112f47d17122a19a98ea09bb10d2/dockerfiles/alpine/is/Dockerfile#L93-L94 https://github.com/wso2/docker-is/blob/d0d177a32d1f112f47d17122a19a98ea09bb10d2/dockerfiles/centos/is/Dockerfile#L87-L88 https://github.com/wso2/docker-is/blob/d0d177a32d1f112f47d17122a19a98ea09bb10d2/dockerfiles/ubuntu/is/Dockerfile#L92-L93

Certification

N/A - Code changes made only to implement the intended behavior.

Automation tests

  • Unit tests - none
  • Integration tests - none

Security checks

  • Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines? yes, followed pre-existing coding pattern
  • Ran FindSecurityBugs plugin and verified report? no - changes were entirely within Dockerfiles
  • Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? yes

Test environment

MacOS 12.5.1, Docker Desktop 4.12.0 (85629), Docker Engine: 20.10.17 WSO2 Identity Server release 6.0.0

NCMEC-daavendasora avatar Sep 08 '22 08:09 NCMEC-daavendasora