From bd3a4840329160a64c0cac25ed6c1d3b22f5bdb4 Mon Sep 17 00:00:00 2001 From: Imre Farkas Date: Sat, 24 Nov 2018 13:39:16 +0100 Subject: Add config to disable impersonation Adds gitlab.impersonation_enabled config option defaulting to true to keep the current default behaviour. Only the act of impersonation is modified, impersonation token management is not affected. --- doc/api/README.md | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/api/README.md b/doc/api/README.md index 0e8d1aaf86e..848a6e6b72b 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -225,6 +225,43 @@ For more information, refer to the Impersonation tokens are used exactly like regular personal access tokens, and can be passed in either the `private_token` parameter or the `Private-Token` header. +#### Disable impersonation + +> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/40385) in GitLab +11.6. + +By default, impersonation is enabled. To disable impersonation, GitLab must be +reconfigured: + +**For Omnibus installations** + +1. Edit `/etc/gitlab/gitlab.rb`: + + ```ruby + gitlab_rails['impersonation_enabled'] = false + ``` + +1. Save the file and [reconfigure](../administration/restart_gitlab.md#omnibus-gitlab-reconfigure) + GitLab for the changes to take effect. + +To re-enable impersonation, remove this configuration and reconfigure GitLab. + +--- + +**For installations from source** + +1. Edit `config/gitlab.yml`: + + ```yaml + gitlab: + impersonation_enabled: false + ``` + +1. Save the file and [restart](../administration/restart_gitlab.md#installations-from-source) + GitLab for the changes to take effect. + +To re-enable impersonation, remove this configuration and restart GitLab. + ### Sudo NOTE: **Note:** @@ -540,7 +577,7 @@ When you try to access an API URL that does not exist you will receive 404 Not F ``` HTTP/1.1 404 Not Found Content-Type: application/json -{ +{ f "error": "404 Not Found" } ``` -- cgit v1.2.3