ministryofjustice / operations-engineering

This repository is home to the Operations Engineering's tools and utilities for managing, monitoring, and optimising software development processes at the Ministry of Justice. • This repository is defined and managed in Terraform
https://user-guide.operations-engineering.service.justice.gov.uk/
MIT License
12 stars 5 forks source link

Github Joiners Process PoC #3598

Closed AntonyBishop closed 8 months ago

AntonyBishop commented 10 months ago

User Need

PoC to trail Github joiners

Jamboard for reference - https://jamboard.google.com/d/1gCWabJAF3iZTkmOdgt6OWbYZonzXDBw5FRQNKfOggOY/edit?usp=sharing

Value

To get feedback to help next design phase. To better understand any constraints/challenges around scaling.

Functional Requirements:

In PoC we should consider: a) What user data to capture b) how to structure data c) How to manage state d) Solution must be able to scale

Non-Functional Requirements:

  1. Process should be easy for users to access. We should aim for process to be as easy as current manual process.
  2. Repository must be Internal or Private due to nature of data used in PoC
  3. PoC should cover Ops and and CP Team users
  4. PoC excludes collaborators

Acceptance Criteria:

  1. PoC created
  2. We can demo for users to gain feedback

Notes:

NickWalt01 commented 9 months ago

Created a Python Flask webpage hosted on the CP (env folder) that can allow pre-approved emails to send out invites to the GitHub Organisation.

See repo and releases for more info.

Requires the SLACK and OPS ENG BOT Token, these are stored in secret manager on the CP AWS account.

A Slack message is raised when a non-approved email address user requests access to the Organisation or wants to rejoin the Organisation.

Website link.

NickWalt01 commented 9 months ago

Security improvements are in development for this ticket.

NickWalt01 commented 9 months ago

Rate limiting applied to the application. See PR.

NickWalt01 commented 9 months ago

Get removed users from audit log. See PR.

NickWalt01 commented 9 months ago

Check audit log when user rejoins Org. See PR.

NickWalt01 commented 9 months ago

See PR

NickWalt01 commented 9 months ago

Add recaptcha to Form. See PR.

NickWalt01 commented 8 months ago

Meeting planned with AP team on how they use Azure AD with Auth0 on their service, the goal is to replicate this feature in our Auth0 account so that we can make use of the non digital justice email domains.

NickWalt01 commented 8 months ago

The Data upload team use AWS SES with Auth0 for passwordless / magic link emails to authenticate a user has said email. This is another option to consider in hardening the form against abuse.

NickWalt01 commented 8 months ago

There is a VPN / IP address option on CP (where the application is hosted.) https://user-guide.cloud-platform.service.justice.gov.uk/documentation/networking/ip-filtering.html#inbound-ip-filtering. Not sure what this offers yet.

NickWalt01 commented 8 months ago

We had a meeting with the AP team, we now have a connection to Azure AD in Auth0 settings

NickWalt01 commented 8 months ago

Connor and Tamsin have access to the Azure AD connection. Other team members will need to be added manually to the connection to get access.

The Azure AD connection covers the entire MoJ email address db, when used with Auth0, the email address of the user will need to be filtered so that the application only allows the expected email addresses ie @justice.gov.uk, @digital.justice.gov.uk

NickWalt01 commented 8 months ago

Connor and Tamsin have access to the Azure AD connection. Other team members will need to be added manually to the connection to get access.

The Azure AD connection covers the entire MoJ email address db, when used with Auth0, the email address of the user will need to be filtered so that the application only allows the expected email addresses ie @justice.gov.uk, @digital.justice.gov.uk

NickWalt01 commented 8 months ago

Meeting with Auth0 to fix the AzureAD enterprise connection, enabled a button in second tab of the enterprise connection, tested app could open the Microsoft login page when run application locally.

Finished unit tests.

NickWalt01 commented 8 months ago

Additional info about the application: https://docs.google.com/document/d/1MbafY04NI3UcoduOruP6KKgurnAwfrRxYQ0onICq2Nc

NickWalt01 commented 8 months ago

Remove Slack, use Auth0, use different configurations, redesign user form, remove non needed functions + files.

See PR.

connormaglynn commented 8 months ago

Closing and continuing the work under https://github.com/ministryofjustice/operations-engineering/issues/3890