Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and optimize AccessSessionUpdater and related methods #11

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

FrodeHus
Copy link
Owner

Refactor and optimize AccessSessionUpdater and related methods

Refactored AccessSessionUpdater to include Azure Function attributes
and optimized session ID retrieval. Improved readability and efficiency
of GetUserDetails and streamlined XML parsing logic. Added optional
offsetSeconds parameter to GetLastUpdatedTime. Removed unnecessary
timestamp adjustment in BeyondTrustService.

PR Classification

Code cleanup and feature enhancement to improve readability, efficiency, and accuracy of session updates.

PR Summary

Refactored AccessSessionUpdater to run as an Azure Function with improved session processing and user detail extraction.

  • AccessSessionUpdater: Added Function attribute and TimerTrigger to run every 15 minutes; optimized Run method to check for existing sessions.
  • GetUserDetails: Streamlined XML user detail extraction for better readability.
  • GetLastUpdatedTime: Added offsetSeconds parameter to ensure no events are missed.
  • BeyondTrustService: Adjusted unixTime calculation to align start time accurately with the report period.

Refactored AccessSessionUpdater to include Azure Function attributes
and optimized session ID retrieval. Improved readability and efficiency
of GetUserDetails and streamlined XML parsing logic. Added optional
offsetSeconds parameter to GetLastUpdatedTime. Removed unnecessary
timestamp adjustment in BeyondTrustService.
@FrodeHus FrodeHus merged commit 86df61f into main Dec 19, 2024
2 checks passed
@FrodeHus FrodeHus deleted the fix/avoid-duplicate-events branch December 19, 2024 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant