Commit 9232778f authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '348550-dast-site-profile-edit-password' into 'master'

Copy auth field objects when serializing values

See merge request gitlab-org/gitlab!76845
parents 1b73de6c 5eebc6b3
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
.map((url) => url.trim()); .map((url) => url.trim());
}, },
serializedAuthFields() { serializedAuthFields() {
const authFields = this.authSection.fields; const authFields = { ...this.authSection.fields };
// not to send password value if unchanged // not to send password value if unchanged
if (authFields.password === REDACTED_PASSWORD) { if (authFields.password === REDACTED_PASSWORD) {
delete authFields.password; delete authFields.password;
......
import {
REDACTED_PASSWORD,
REDACTED_REQUEST_HEADERS,
} from 'ee/security_configuration/dast_profiles/dast_site_profiles/constants';
export const policyScannerProfile = { export const policyScannerProfile = {
id: 'gid://gitlab/DastScannerProfile/3', id: 'gid://gitlab/DastScannerProfile/3',
profileName: 'Scanner profile #3', profileName: 'Scanner profile #3',
...@@ -25,10 +30,10 @@ export const siteProfiles = [ ...@@ -25,10 +30,10 @@ export const siteProfiles = [
usernameField: 'username', usernameField: 'username',
passwordField: 'password', passwordField: 'password',
username: 'admin', username: 'admin',
password: 'password', password: REDACTED_PASSWORD,
}, },
excludedUrls: ['https://foo.com/logout', 'https://foo.com/send_mail'], excludedUrls: ['https://foo.com/logout', 'https://foo.com/send_mail'],
requestHeaders: 'log-identifier: dast-active-scan', requestHeaders: REDACTED_REQUEST_HEADERS,
referencedInSecurityPolicies: [], referencedInSecurityPolicies: [],
}, },
{ {
...@@ -47,7 +52,7 @@ export const siteProfiles = [ ...@@ -47,7 +52,7 @@ export const siteProfiles = [
username: 'admin', username: 'admin',
}, },
excludedUrls: ['https://bar.com/logout'], excludedUrls: ['https://bar.com/logout'],
requestHeaders: 'auth: gitlab-dast', requestHeaders: REDACTED_REQUEST_HEADERS,
referencedInSecurityPolicies: [], referencedInSecurityPolicies: [],
}, },
]; ];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment