Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e360673b
Commit
e360673b
authored
Jun 18, 2021
by
Marius Bobin
Committed by
Dylan Griffith
Jun 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature flag control builds token encryption [RUN ALL RSPEC] [RUN AS-IF-FOSS]
parent
581f7a4b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
app/models/ci/build.rb
app/models/ci/build.rb
+2
-1
config/feature_flags/development/ci_builds_tokens_required_encryption.yml
...lags/development/ci_builds_tokens_required_encryption.yml
+8
-0
lib/gitlab/ci/features.rb
lib/gitlab/ci/features.rb
+4
-0
No files found.
app/models/ci/build.rb
View file @
e360673b
...
@@ -212,7 +212,8 @@ module Ci
...
@@ -212,7 +212,8 @@ module Ci
acts_as_taggable
acts_as_taggable
add_authentication_token_field
:token
,
encrypted: :optional
add_authentication_token_field
:token
,
encrypted:
->
{
Gitlab
::
Ci
::
Features
.
require_builds_token_encryption?
?
:required
:
:optional
}
before_save
:ensure_token
before_save
:ensure_token
before_destroy
{
unscoped_project
}
before_destroy
{
unscoped_project
}
...
...
config/feature_flags/development/ci_builds_tokens_required_encryption.yml
0 → 100644
View file @
e360673b
---
name
:
ci_builds_tokens_required_encryption
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/63874
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/333566
milestone
:
'
14.0'
type
:
development
group
:
group::pipeline execution
default_enabled
:
false
lib/gitlab/ci/features.rb
View file @
e360673b
...
@@ -41,6 +41,10 @@ module Gitlab
...
@@ -41,6 +41,10 @@ module Gitlab
def
self
.
gldropdown_tags_enabled?
def
self
.
gldropdown_tags_enabled?
::
Feature
.
enabled?
(
:gldropdown_tags
,
default_enabled: :yaml
)
::
Feature
.
enabled?
(
:gldropdown_tags
,
default_enabled: :yaml
)
end
end
def
self
.
require_builds_token_encryption?
Feature
.
enabled?
(
:ci_builds_tokens_required_encryption
,
default_enabled: :yaml
)
end
end
end
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment