diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-30 15:09:15 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-30 15:09:15 +0000 |
commit | 536aa3a1f4b96abc4ca34489bf2cbe503afcded7 (patch) | |
tree | 88d08f7dfa29a32d6526773c4fe0fefd9f2bc7d1 /doc/security | |
parent | 50ae4065530c4eafbeb7c5ff2c462c48c02947ca (diff) | |
download | gitlab-ce-536aa3a1f4b96abc4ca34489bf2cbe503afcded7.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/security')
-rw-r--r-- | doc/security/asset_proxy.md | 2 | ||||
-rw-r--r-- | doc/security/password_length_limits.md | 2 | ||||
-rw-r--r-- | doc/security/rack_attack.md | 6 | ||||
-rw-r--r-- | doc/security/reset_root_password.md | 10 | ||||
-rw-r--r-- | doc/security/two_factor_authentication.md | 2 | ||||
-rw-r--r-- | doc/security/unlock_user.md | 2 |
6 files changed, 12 insertions, 12 deletions
diff --git a/doc/security/asset_proxy.md b/doc/security/asset_proxy.md index 5522a41ff01..d042fb3efe7 100644 --- a/doc/security/asset_proxy.md +++ b/doc/security/asset_proxy.md @@ -30,7 +30,7 @@ To install a Camo server as an asset proxy: 1. Make sure your instance of GitLab is running, and that you have created a private API token. Using the API, configure the asset proxy settings on your GitLab instance. For example: - ```sh + ```shell curl --request "PUT" "https://gitlab.example.com/api/v4/application/settings?\ asset_proxy_enabled=true&\ asset_proxy_url=https://proxy.gitlab.example.com&\ diff --git a/doc/security/password_length_limits.md b/doc/security/password_length_limits.md index c00fd78c4d3..8fc799faff0 100644 --- a/doc/security/password_length_limits.md +++ b/doc/security/password_length_limits.md @@ -21,7 +21,7 @@ To change that for installations from source: 1. Edit `devise_password_length.rb`: - ```sh + ```shell cd /home/git/gitlab sudo -u git -H cp config/initializers/devise_password_length.rb.example config/initializers/devise_password_length.rb sudo -u git -H editor config/initializers/devise_password_length.rb diff --git a/doc/security/rack_attack.md b/doc/security/rack_attack.md index 9cbb296338a..bb51fc38e61 100644 --- a/doc/security/rack_attack.md +++ b/doc/security/rack_attack.md @@ -146,7 +146,7 @@ taken in order to enable protection for your GitLab instance: `paths_to_be_protected`, and add any other path you need protecting 1. Restart GitLab: - ```sh + ```shell sudo service gitlab restart ``` @@ -164,13 +164,13 @@ In case you want to remove a blocked IP, follow these steps: 1. Find the IPs that have been blocked in the production log: - ```sh + ```shell grep "Rack_Attack" /var/log/gitlab/gitlab-rails/auth.log ``` 1. Since the blacklist is stored in Redis, you need to open up `redis-cli`: - ```sh + ```shell /opt/gitlab/embedded/bin/redis-cli -s /var/opt/gitlab/redis/redis.socket ``` diff --git a/doc/security/reset_root_password.md b/doc/security/reset_root_password.md index 00c9dc1407d..cd2144698f6 100644 --- a/doc/security/reset_root_password.md +++ b/doc/security/reset_root_password.md @@ -8,7 +8,7 @@ To reset your root password, first log into your server with root privileges. Start a Ruby on Rails console with this command: -```bash +```shell gitlab-rails console -e production ``` @@ -16,19 +16,19 @@ Wait until the console has loaded. There are multiple ways to find your user. You can search for email or username. -```bash +```shell user = User.where(id: 1).first ``` or -```bash +```shell user = User.find_by(email: 'admin@example.com') ``` Now you can change your password: -```bash +```shell user.password = 'secret_pass' user.password_confirmation = 'secret_pass' ``` @@ -37,7 +37,7 @@ It's important that you change both password and password_confirmation to make i Don't forget to save the changes. -```bash +```shell user.save! ``` diff --git a/doc/security/two_factor_authentication.md b/doc/security/two_factor_authentication.md index 39f92f95ba1..e51ef00a1fa 100644 --- a/doc/security/two_factor_authentication.md +++ b/doc/security/two_factor_authentication.md @@ -66,7 +66,7 @@ The following are important notes about 2FA: There may be some special situations where you want to disable 2FA for everyone even when forced 2FA is disabled. There is a rake task for that: -```sh +```shell # Omnibus installations sudo gitlab-rake gitlab:two_factor:disable_for_all_users diff --git a/doc/security/unlock_user.md b/doc/security/unlock_user.md index d34826c853c..fdf7ba90a3b 100644 --- a/doc/security/unlock_user.md +++ b/doc/security/unlock_user.md @@ -11,7 +11,7 @@ To unlock a locked user: 1. SSH into your GitLab server. 1. Start a Ruby on Rails console: - ```sh + ```shell ## For Omnibus GitLab sudo gitlab-rails console production |