Skip to content

Provide option to disable project access tokens

What does this MR do?

Customers with strong internal access controls may not want the option to use project access tokens, as they obfuscate which user performed a task. This MR adds the option to enable/disable project access tokens on the group level.

Enabling and disabling of project access tokens can only be done in root groups. All subgroups under them will follow the setting of their group ancestor. Projects in personal namespaces will be able to use project access tokens.

Migration output:

% rails db:migrate
== 20210308195708 AddResourceAccessTokensEnabledToNamespaceSettings: migrating 
-- add_column(:namespace_settings, :resource_access_tokens_enabled, :boolean, {:default=>true, :null=>false})
   -> 0.0075s
== 20210308195708 AddResourceAccessTokensEnabledToNamespaceSettings: migrated (0.0137s) 


% rails db:rollback STEP=1
== 20210308195708 AddResourceAccessTokensEnabledToNamespaceSettings: reverting 
-- remove_column(:namespace_settings, :resource_access_tokens_enabled)
   -> 0.0019s
== 20210308195708 AddResourceAccessTokensEnabledToNamespaceSettings: reverted (0.0084s) 

Screenshots (strongly suggested)

Under Group > Settings > General > Permissions, LFS, 2FA:

image

At the very bottom of the Project access tokens docs page: (help/user/project/settings/project_access_tokens)

image

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #287707 (closed)

Edited by Serena Fang

Merge request reports