T0pCyber / hawk

Powershell Based tool for gathering information related to O365 intrusions and potential Breaches
https://cloudforensicator.com/
MIT License
716 stars 117 forks source link

Feature: Enhance GraphAPI Authentication Session and Token Management #163

Open jonnybottles opened 1 day ago

jonnybottles commented 1 day ago

What problem would this feature solve?

Currently, Hawk lacks robust session and token management, particularly for Microsoft Graph authentication. This leads to potential failures during long-running operations and requires manual intervention when sessions expire. A comprehensive session management system would eliminate these issues and improve reliability.

Proposed Solution

Implement an intelligent session/token management system that:

Key Session/Token Windows

Microsoft Graph Access Tokens

Exchange Online PowerShell (EXO V3)

Refresh Tokens

Technical Requirements

Token Monitoring

Session Management

Connection Handling

Implementation Approach

Session Tracking

Authentication Flow

Integration

Acceptance Criteria

jonnybottles commented 1 day ago

Useful token expiration details:

Access tokens: The default lifetime of an access token is variable. When issued, an access token's default lifetime is assigned a random value ranging between 60-90 minutes (75 minutes on average).

read more at: https://learn.microsoft.com/en-us/entra/identity-platform/configurable-token-lifetimes

ID Tokens: Default time is set to expire in 60 minutes

read more at: https://learn.microsoft.com/en-us/entra/identity-platform/id-tokens