Skip to content

Feature: Add container environment setup and cleanup for browser auth…#1169

Open
billmcilhargey wants to merge 1 commit into
microsoft:devfrom
billmcilhargey:dev-feat-container-support
Open

Feature: Add container environment setup and cleanup for browser auth…#1169
billmcilhargey wants to merge 1 commit into
microsoft:devfrom
billmcilhargey:dev-feat-container-support

Conversation

@billmcilhargey
Copy link
Copy Markdown

@billmcilhargey billmcilhargey commented Apr 18, 2026

Add container environment setup and cleanup for browser authentication

  • Added functions to manage browser URL capture and cleanup in container environments.
  • Implemented Install-ZtBrowserUrlCapture to create a wrapper for capturing auth URLs.
  • Introduced Remove-ZtBrowserUrlCapture to clean up the wrapper and associated files.
  • Created Start-ZtBrowserUrlWatcher to monitor the captured URL and provide a fallback link.
  • Developed Initialize-ZtContainerEnvironment to set up necessary conditions for browser auth in containers.
  • Added checks for network connectivity, localhost resolution, and port forwarding capabilities.
  • Implemented Test-ZtContainerEnvironment to detect if running inside a container.
  • Enhanced report handling with Open-ZtReport and Start-ZtReportServer to serve reports via HTTP in containers.
  • Added Stop-ZtReportServer to manage the lifecycle of the report server.
  • Updated Disconnect-ZtAssessment to ensure proper cleanup of container modifications.
  • Refactored existing functions to improve error handling and logging.

(resubmit of a previous PR with submission to dev branch instead of main branch)

…entication

- Added functions to manage browser URL capture and cleanup in container environments.
- Implemented `Install-ZtBrowserUrlCapture` to create a wrapper for capturing auth URLs.
- Introduced `Remove-ZtBrowserUrlCapture` to clean up the wrapper and associated files.
- Created `Start-ZtBrowserUrlWatcher` to monitor the captured URL and provide a fallback link.
- Developed `Initialize-ZtContainerEnvironment` to set up necessary conditions for browser auth in containers.
- Added checks for network connectivity, localhost resolution, and port forwarding capabilities.
- Implemented `Test-ZtContainerEnvironment` to detect if running inside a container.
- Enhanced report handling with `Open-ZtReport` and `Start-ZtReportServer` to serve reports via HTTP in containers.
- Added `Stop-ZtReportServer` to manage the lifecycle of the report server.
- Updated `Disconnect-ZtAssessment` to ensure proper cleanup of container modifications.
- Refactored existing functions to improve error handling and logging.
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