SkillSetz Appendix B – System Configuration Standards

Applicability

This appendix includes hardening and installation procedures for Magento 2 platform on the production environment. All installations of these operating systems and applications must adhere to these requirements.

 

B.1 UNIX Systems

B.1.1 Ubuntu Installation

The following general install procedures will be followed for all SkillSetz UNIX-based system deployments:

  1. Install operating system using default hosting provider interface:
    1. Choose server type and model
    2. Choose the image of the operating system (currently Ubuntu 20.10) 
  2. Update all operating system software per vendor recommendations.
    APT-upgrade is being used for upgrading the packages.
  3. Configure operating system parameters according to build document (OS hardening).
    1. Iptables - block all incoming connections except 80(HTTP), 443(HTTPS), 22(SSH), 2121 (FTPS), 2222 (SFTP), 65434-65534 (FTP Passive)
    2. Disable password authentication for SSH (public key only)
  4. Install software:
                   - vim
                   - bash-completion
                   - screen
                   - iptables-persistent
                   - unzip
                   - sysfsutils
                   - software-properties-common
                   - pv

    5. Update all application software per vendor recommendations.
               - All the packages are fresh during installation.

    6. Configure application parameters according to the build document (application hardening).

    7. Complete system-specific System Configuration Record (Appendix C) and maintain it on file.

    8. Ensure that any user does not have any password that can be used to log in to the system.

    9. Ensure that all default users do not have any shell for interaction with the system.

 

B.2 Server Application

B.2.1 Application Installation

The following general install procedures will be followed for all SkillSetz server application deployments:

  1. Install necessary software.
  2. Update application software per vendor recommendations.
  3. Configure application parameters according to build document (application hardening).
  4. Update system-specific System Configuration Record (Appendix C) and maintain it on file.

B.4.2 MySQL Database

4.2.1. Installation process.

4.2.1.1. Install repository of mariadb.

4.2.1.2. Install the following packages (using APT):

               - Mariadb-server

               - Mariadb-client

       Note: the root user has to connect to the database instance using UNIX-socket only.

4.2.1.3. Create a database.

4.2.1.4. Create a user (for example, ‘magento’) that has permissions to connect to the database described above.

4.2.1.5.1. Configure database instance:

               - Do not accept connections from outside
               - (Optional) Accept connections from local network (if multiple servers are used in infrastructure)

4.2.1.5.2. Additional configurations of the database instance have to be calculated before applying.

4.2.1.6. Ensure that service is enabled and will be restarted after reboot or failure etc.

4.2.1.7. Ensure that the user ‘mysql’ does not have a password.

4.2.1.8. Ensure that database user ‘magento’ has a password, that meets the following requirements:

               - A minimum password length of at least twelve characters.
               - Contain both numeric and alphabetic characters.
               - Alternatively, the passwords/passphrases must have complexity and strength at least equivalent to the parameters specified above.

B.4.3   PHP

4.3.1. Installation process. 

4.3.1.2. Install PHP repositories.

4.3.1.3. Install PHP of magento-compatible version (using APT). Install the PHP-modules that are described at  https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements.html. Install PHP-fpm.

4.3.1.4. Ensure that service is enabled and will be restarted after reboot or failure etc.

4.3.1.5. Additional configurations of PHP have to be calculated before applying.

B.4.4   Magento 2

4.4.1. Ensure that passwords of admin users are fresh. (Optional) Configure magento to use password expiration policy.

4.4.2. Configure magento to allow only one active session of any admin user.

4.4.3. Filesystem level:

4.4.3.1. Create users
               - ‘magento’
               - ‘builder

4.4.3.2. Add ‘magento’ to the group ‘www-data’.

4.4.3.3. Grant sudo rights to ‘builder’.

4.4.3.4. Ensure that no one from the users above has a password.

4.4.4. Additional requirements:

4.4.4.1. A minimum password length of at least seven characters.

4.4.4.2. Contain both numeric and alphabetic characters.

4.4.4.3. Alternatively, the passwords/passphrases must have complexity and strength at least equivalent to the parameters specified above.

B.4.5 Nginx Server

4.5.1. Installation process.

4.5.1.1. Install the following packages (using APT):
               - nginx 
               - nginx-full
               - Libnginx-mod-http-headers-more-filter
               - Snapd
               - Certbot (using snap)

4.5.1.2. Configure the website accessibility using the following parameters:
               - rate-limit
               - Geolocation
               - Level of access (customer page or admin page)

B.4.6  Redis Server

4.6.1. Installation process:

4.6.1.1. Install the following packages:
               - rate-limittcl8.6
               - rate-limitgcc
               - rate-limitmake
               - rate-limitbuild-essential

4.6.1.2. Download the redis package from https://download.redis.io/releases/redis-5.0.9.tar.gz

4.6.1.3. Unpack, compile and install the package.

4.6.1.4. Create a user named ‘redis’.

4.6.2. Configure Redis:

4.6.2.1 Prepare 2 services that will use sockets for accepting connections:
               - rate-limitRedis-cache
               - rate-limitRedis-session

4.6.2.2. Deny accepting connections from outside.

4.6.2.3. Configure eviction policies.

4.6.2.4. Ensure that services are enabled and will be restarted after reboot or failure etc.

4.6.2.5. Ensure that user ‘redis’ does not have a password.

B.4.7  Elasticsearch Server

4.7.1. Installation process:

4.7.1.1. Download the latest magento-compatible version of elasticsearch. 

4.7.1.2. Install elasticsearch.

4.7.1.3. Configure JAVA_OPTS.

4.7.1.4. Ensure that service is enabled and will be restarted after reboot or failure etc. 

4.7.1.5. Ensure that user ‘elasticsearch’ does not have a password.

 

Was this article helpful?

0 out of 0 found this helpful