-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add latest changes from gitlab-org/security/gitlab@12-9-stable-ee
- Loading branch information
GitLab Bot
committed
May 26, 2020
1 parent
29c12f7
commit 631b4ce
Showing
7 changed files
with
87 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
changelogs/unreleased/security-132-remove-eks-details-from-admin-form.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Hide EKS secret key in admin integrations settings | ||
merge_request: | ||
author: | ||
type: security |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
spec/views/admin/application_settings/_eks.html.haml_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper' | ||
|
||
describe 'admin/application_settings/_eks' do | ||
let_it_be(:admin) { create(:admin) } | ||
let(:page) { Capybara::Node::Simple.new(rendered) } | ||
|
||
before do | ||
assign(:application_setting, application_setting) | ||
allow(view).to receive(:current_user) { admin } | ||
allow(view).to receive(:expanded) { true } | ||
end | ||
|
||
shared_examples 'EKS secret access key input' do | ||
it 'renders an empty password field' do | ||
render | ||
expect(rendered).to have_field('Secret access key', type: 'password') | ||
expect(page.find_field('Secret access key').value).to be_blank | ||
end | ||
end | ||
|
||
context 'when eks_secret_access_key is not set' do | ||
let(:application_setting) { build(:application_setting) } | ||
|
||
include_examples 'EKS secret access key input' | ||
end | ||
|
||
context 'when eks_secret_access_key is set' do | ||
let(:application_setting) { build(:application_setting, eks_secret_access_key: 'eks_secret_access_key') } | ||
|
||
include_examples 'EKS secret access key input' | ||
end | ||
end |
Empty file.
Empty file.