cisagov / crossfeed

External monitoring for organization assets
https://docs.crossfeed.cyber.dhs.gov
Creative Commons Zero v1.0 Universal
364 stars 54 forks source link

Update backend tasks to check for cognito user expiration #2510

Closed cduhn17 closed 6 months ago

cduhn17 commented 7 months ago

Enhance Inactive User Account Management

🗣 Description

This update introduces a systematic approach to managing user inactivity within our AWS Lambda function. It implements a tiered strategy for user notifications and account deactivation/removal based on inactivity duration thresholds: 30, 45, and 90 days. Addresses issue #2458

💭 Motivation and Context

The need for this enhancement arises from our commitment to maintaining a secure, active user base and adhering to data management best practices. By proactively managing inactive accounts through notifications, password resets, and eventual removal, we mitigate security risks and comply with data protection standards.

🧪 Testing

Testing was conducted in a controlled environment to simulate user inactivity scenarios. The updated function was verified to:

The function accurately identifies inactive users based on the lastLoggedIn timestamp and performs actions without affecting active users. Unit tests were added for the new logic, and integration tests were updated accordingly.

✅ Pre-approval Checklist

✅ Pre-merge Checklist

✅ Post-merge Checklist

schmelz21 commented 6 months ago

check and update line 90 of checkuserexpiration.ts

It looks as this request has been satisfied, and PR is approved.