Skip to content

Enable ci_scoped_job_token by default

Fabio Pitino requested to merge enable-ff-ci-scoped-job-token into master

What does this MR do?

Related to #332272 (closed)

In this MR we:

  • enable the feature flag ci_scoped_job_token by default - This will start tracking authentications via from CI_JOB_TOKEN and will use the Ci::JobToken::Scope to validate permissions.
  • enable the project setting job_token_scope_enabled by default - When enabled we only allow projects in the job token scope to be accessible, otherwise all projects are accessible as long as the job user has access to.
  • fix any specs that were temporarily changed while we disabled the job_token_scope_enabled in !64962 (merged)

Database migration

rails db:migrate:redo VERSION=20210709132707

== 20210709132707 ChangeDefaultJobTokenScopeEnabled: reverting ================
-- change_column_default(:project_ci_cd_settings, :job_token_scope_enabled, {:from=>true, :to=>false})
   -> 0.0036s
== 20210709132707 ChangeDefaultJobTokenScopeEnabled: reverted (0.0123s) =======

== 20210709132707 ChangeDefaultJobTokenScopeEnabled: migrating ================
-- change_column_default(:project_ci_cd_settings, :job_token_scope_enabled, {:from=>false, :to=>true})
   -> 0.0101s
== 20210709132707 ChangeDefaultJobTokenScopeEnabled: migrated (0.0163s) =======

Screenshots or Screencasts (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • 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
Edited by Fabio Pitino

Merge request reports