diff --git a/.github/ISSUE_TEMPLATE/account_management_request_form.yaml b/.github/ISSUE_TEMPLATE/account_management_request_form.yaml index d53b0ac..0a7e551 100644 --- a/.github/ISSUE_TEMPLATE/account_management_request_form.yaml +++ b/.github/ISSUE_TEMPLATE/account_management_request_form.yaml @@ -106,6 +106,14 @@ body: multiple: false validations: required: true + - type: input + id: ssp-file-path + attributes: + label: File path of SSP + description: Type in the file path of the SSP to update + placeholder: .sims/ + validations: + required: true - type: checkboxes id: attestation attributes: diff --git a/.github/workflows/account_request_approve.yaml b/.github/workflows/account_request_approve.yaml index cf85589..569b7a9 100644 --- a/.github/workflows/account_request_approve.yaml +++ b/.github/workflows/account_request_approve.yaml @@ -35,6 +35,7 @@ jobs: user-username: ${{ steps.issue-parser.outputs.issueparser_user-username }} user-email: ${{ steps.issue-parser.outputs.issueparser_user-email }} account-type: ${{ steps.issue-parser.outputs.issueparser_account-type }} + ssp-file-path: ${{ steps.issue-parser.outputs.issueparser_ssp-file-path }} steps: - name: Checkout repo uses: actions/checkout@v4 @@ -72,8 +73,9 @@ jobs: USER_EMAIL: ${{ needs.parse-issue.outputs.user-email }} USER_ROLE: ${{ needs.parse-issue.outputs.account-type }} ISSUE_NUMBER: ${{ github.event.issue.number }} + SSP_FILE_PATH: ${{ needs.parse-issue.outputs.ssp-file-path }} run: | - python ato/secops/create_user.py --user-name "$USER_NAME" --user-username "$USER_USERNAME" --user-email "$USER_EMAIL" --user-role "$USER_ROLE" --issue-number "$ISSUE_NUMBER" + python ato/secops/create_user.py --user-name "$USER_NAME" --user-username "$USER_USERNAME" --user-email "$USER_EMAIL" --user-role "$USER_ROLE" --issue-number "$ISSUE_NUMBER" --ssp-path "$SSP_FILE_PATH" - name: Store user yaml in repo run: | @@ -86,7 +88,7 @@ jobs: git push origin "$BRANCH_NAME" env: ISSUE_NUMBER: ${{ github.event.issue.number }} - BRANCH_NAME: "account-request-${{ github.event.issue.number }}" + BRANCH_NAME: "account-request" - name: Configure AWS CLI uses: aws-actions/configure-aws-credentials@8c3f20df09ac63af7b3ae3d7c91f105f857d8497 # v4 diff --git a/ato/secops/create_user.py b/ato/secops/create_user.py index 4867c02..d8daad6 100644 --- a/ato/secops/create_user.py +++ b/ato/secops/create_user.py @@ -10,7 +10,8 @@ @click.option('--location-uuid', help='UUID of physical location of user') @click.option('--org-member', help='UUID of organization that user is member of') @click.option('--issue-number', help='Issue number of user account request') -def create_user(user_name, user_username, user_email, user_role, location_uuid, org_member, issue_number): +@click.option('--ssp-path', help='File path of SSP to update') +def create_user(user_name, user_username, user_email, user_role, location_uuid, org_member, issue_number, ssp_path): """ Creates a yaml file containing information about a new user @@ -22,6 +23,7 @@ def create_user(user_name, user_username, user_email, user_role, location_uuid, location_uuid (string): String containing UUID of physical location of user org_member (string): String containing UUID of organization that user is member of issue_number (string): String containing issue number of user account request + ssp_path (string): String containing file path of SSP to update """ # Structure of yaml file @@ -34,6 +36,7 @@ def create_user(user_name, user_username, user_email, user_role, location_uuid, "role":f"{user_role}", "location-uuid":f"{location_uuid}", "member-of-organization":f"{org_member}", + "ssp-path": f"{ssp_path}", }, }