Skip to content

Commit

Permalink
PII storage and analytics (#7375)
Browse files Browse the repository at this point in the history
  • Loading branch information
starswan committed Jan 17, 2025
1 parent 2aa4d35 commit 1601279
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 11 deletions.
5 changes: 4 additions & 1 deletion app/models/job_application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ class JobApplication < ApplicationRecord
has_encrypted :first_name, :last_name, :previous_names, :street_address, :city, :postcode,
:phone_number, :teacher_reference_number, :national_insurance_number,
:personal_statement, :support_needed_details, :close_relationships_details,
:further_instructions, :rejection_reasons, :gaps_in_employment_details
:further_instructions, :rejection_reasons, :gaps_in_employment_details,
:faith, :place_of_worship, :baptism_address, :ethos_and_aims,
:religious_referee_name, :religious_referee_address, :religious_referee_role, :religious_referee_email, :religious_referee_phone
has_encrypted :baptism_date, type: :date

belongs_to :jobseeker
belongs_to :vacancy
Expand Down
10 changes: 10 additions & 0 deletions config/analytics_blocklist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@
- in_progress_steps
- employment_history_section_completed
- qualifications_section_completed
- place_of_worship_ciphertext
- religious_referee_name_ciphertext
- religious_referee_address_ciphertext
- religious_referee_role_ciphertext
- religious_referee_email_ciphertext
- religious_referee_phone_ciphertext
- faith_ciphertext
- baptism_address_ciphertext
- baptism_date_ciphertext
- ethos_and_aims_ciphertext
:employments:
- organisation_ciphertext
- job_title_ciphertext
Expand Down
11 changes: 11 additions & 0 deletions config/analytics_hidden_pii.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ shared:
- rejection_reasons
- gaps_in_employment_details
- email_address
- religious_reference_type
- faith
- place_of_worship
- religious_referee_name
- religious_referee_address
- religious_referee_role
- religious_referee_email
- religious_referee_phone
- baptism_address
- baptism_date
- ethos_and_aims
jobseeker_profiles:
- id
- jobseeker_id
Expand Down
11 changes: 11 additions & 0 deletions config/initializers/filter_parameter_logging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@
contact_number
qualification_results_attributes
govuk_one_login_id
religious_reference_type
religious_referee_name
religious_referee_address
religious_referee_role
religious_referee_email
religious_referee_phone
ethos_and_aims
baptism_address
baptism_date
faith
place_of_worship
] + [
/^age$/i,
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ def change
add_column :job_applications, :following_religion, :boolean
# rubocop:enable Rails/ThreeStateBooleanColumn
add_column :job_applications, :religious_reference_type, :integer
add_column :job_applications, :faith, :string
add_column :job_applications, :place_of_worship, :string
add_column :job_applications, :religious_referee_name, :string
add_column :job_applications, :religious_referee_address, :string
add_column :job_applications, :religious_referee_role, :string
add_column :job_applications, :religious_referee_email, :string
add_column :job_applications, :religious_referee_phone, :string
add_column :job_applications, :baptism_address, :string
add_column :job_applications, :baptism_date, :date
add_column :job_applications, :faith_ciphertext, :string
add_column :job_applications, :place_of_worship_ciphertext, :string
add_column :job_applications, :religious_referee_name_ciphertext, :string
add_column :job_applications, :religious_referee_address_ciphertext, :string
add_column :job_applications, :religious_referee_role_ciphertext, :string
add_column :job_applications, :religious_referee_email_ciphertext, :string
add_column :job_applications, :religious_referee_phone_ciphertext, :string
add_column :job_applications, :baptism_address_ciphertext, :string
# This is a date, but lockbox needs all encrypted storage to be strings
add_column :job_applications, :baptism_date_ciphertext, :string
end
end
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class AddEthosAndAimsToJobApplication < ActiveRecord::Migration[7.1]
def change
add_column :job_applications, :ethos_and_aims, :string
add_column :job_applications, :ethos_and_aims_ciphertext, :string
end
end

0 comments on commit 1601279

Please sign in to comment.