default['gitlab']['nginx']['ssl_ciphers']="ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384"# settings from by https://ssl-config.mozilla.org/#server=nginx&version=1.17.7&config=intermediate&openssl=1.1.1d&ocsp=false&guideline=5.6
default['gitlab']['nginx']['ssl_prefer_server_ciphers']="off"# settings from by https://ssl-config.mozilla.org/#server=nginx&version=1.17.7&config=intermediate&openssl=1.1.1d&ocsp=false&guideline=5.6
default['gitlab']['nginx']['ssl_protocols']="TLSv1.2 TLSv1.3"# recommended by https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html & https://cipherli.st/
default['gitlab']['nginx']['ssl_session_timeout']="1d"# settings from by https://ssl-config.mozilla.org/#server=nginx&version=1.17.7&config=intermediate&openssl=1.1.1d&ocsp=false&guideline=5.6
default['gitlab']['nginx']['ssl_dhparam']=nil# Path to dhparam.pem
default['gitlab']['nginx']['hsts_max_age']=63072000# settings from by https://ssl-config.mozilla.org/#server=nginx&version=1.17.7&config=intermediate&openssl=1.1.1d&ocsp=false&guideline=5.6
default['gitlab']['logging']['logrotate_maxsize']=nil# rotate logs when they grow bigger than size bytes even before the specified time interval (daily, weekly, monthly, or yearly)
default['gitlab']['logging']['logrotate_size']=nil# do not rotate by size by default
default['gitlab']['logging']['logrotate_compress']="compress"# see 'man logrotate'
default['gitlab']['logging']['logrotate_method']="copytruncate"# see 'man logrotate'
default['gitlab']['logging']['logrotate_postrotate']=nil# no postrotate command by default
default['gitlab']['logging']['logrotate_dateformat']=nil# use date extensions for rotated files rather than numbers e.g. a value of "-%Y-%m-%d" would give rotated files like production.log-2016-03-09.gz
default['gitlab']['logging']['log_group']=nil# log group for logs (svlogd only at this time)
# By default, Chef's bash resource prints out the environment variables
# upon failure, but the environment may contain sensitive information. This
# resource suppresses that output.
require'chef/resource'
require'chef/resource/script'
classChef
classResource
classBashHideEnv<Chef::Resource::Bash
provides:bash_hide_env
property:environment,Hash,sensitive: true,
description: "A Hash of environment variables in the form of `({'ENV_VARIABLE' => 'VALUE'})`. **Note**: These variables must exist for a command to be run successfully."
LoggingHelper.warning("Writing secrets to `gitlab-secrets.json` file is disabled. Hence, not automatically registering Mattermost as an Oauth App. So, GitLab SSO will not be available as a login option.")
"The value of Gitlab['gitlab_ci']['db_key_base'] (#{ci_db_key_base}) does not match the value of Gitlab['gitlab_rails']['db_key_base'] (#{rails_db_key_base}).",
"Please back up both secrets, set Gitlab['gitlab_rails']['db_key_base'] to the value of Gitlab['gitlab_ci']['db_key_base'], and try again.",
"For more information, see <https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/update/README.md#migrating-legacy-secrets>"
]
raisemessage.join("\n\n")
end
raise'initial_root_password: Length is too short, minimum is 8 characters'ifGitlab['gitlab_rails']['initial_root_password']&&Gitlab['gitlab_rails']['initial_root_password'].length<8