DAST Site profile - add support for Authentication, Request headers & Excluded Urls - Backend
- Parent issue: &3766 (closed)
- frontend counterpart: #225378 (closed)
Summary
This is the second backend iteration for building the DAST site profile form MVC. At this point, we should have a basic form already done, and we're going to add the Authentication section, as well as the Request headers field.
Flow
-
usercreates a newdast_site_profile- secret variables are base64 encoded and stored in associated table called
dast_site_profile_secret_variables - non-secret variables stored on
dast_site_profile
- secret variables are base64 encoded and stored in associated table called
-
userupdatesdast_site_profile:-
DastSiteProfiles::CreateServiceupdates:dast_site_profile- corresponding
dast_site_profile_secret_variables
-
-
userdeletesdast_site_profile:-
DastSiteProfiles::CreateServicedeletes:dast_site_profile- corresponding
dast_site_profile_secret_variables
-
-
userruns a new on-demand dast scan-
Contexablefetches associateddast_site_profile_secret_variables
-
-
dastruns new scan:- decodes
base64encoded fields
- decodes
Implementation Plan
-
define the explicit relationship between CI pipeline model and DAST profile model. -
allow users to register auth secrets in DAST site profile. -
inject the auth secrets into job variables.
Contract
--- proposal_iteration1.graphl
+++ proposal_iteration2.graphl
@@ -2,12 +2,26 @@ mutation dastSiteProfileCreate(
$fullPath: ID!
$profileName: String!
$targetUrl: String
+ $authEnabled: Boolean!
+ $authUsername: String
+ $authUrl: String
+ $authUsernameField: String
+ $authPasswordField: String
+ $authPassword: String
+ $excludedUrls: String
+ $requestHeaders: String
) {
dastSiteProfileCreate(
input: {
fullPath: $fullPath
profileName: $profileName
targetUrl: $targetUrl
+ auth: {
+ enabled: $authEnabled
+ url: $authUrl
+ usernameField: $authUsernameField
+ passwordField: $authPasswordField
+ username: $authUsername
+ password: $authPassword
+ }
+ excludedUrls: $excludedUrls
+ requestHeaders: $requestHeaders
}
) {
id
Edited by Philip Cunningham