Skip to content

Dev#5

Merged
MWG-Logan merged 8 commits into
mainfrom
dev
Oct 23, 2025
Merged

Dev#5
MWG-Logan merged 8 commits into
mainfrom
dev

Conversation

@MWG-Logan
Copy link
Copy Markdown
Member

No description provided.

MWG-Logan and others added 5 commits July 28, 2025 10:56
…eval to prevent rate limit errors (#2)

* Initial plan

* Implement caching for Unifi API IP retrieval

Co-authored-by: MWGMorningwood <2997336+MWGMorningwood@users.noreply.github.com>

* Fix log forging vulnerability by removing user input from error logs

Co-authored-by: MWGMorningwood <2997336+MWGMorningwood@users.noreply.github.com>

* Replace in-memory cache with Azure Redis for distributed caching with managed identity

Co-authored-by: MWGMorningwood <2997336+MWGMorningwood@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: MWGMorningwood <2997336+MWGMorningwood@users.noreply.github.com>
* Add GitHub Actions workflow for Azure Function deployment

* Remove publish package
* Github Actions and Codebase touchups

Added `dev-publish-function.yml` for automating .NET project deployment to Azure Function App on the `dev` branch using GitHub Actions. Updated `prod-publish-function.yml` for `main` branch deployment and environment change to `prod`. Refactored `IntuneTLSDotNet.csproj` to update package references, focusing on Application Insights integration. Updated `IntuneTLSDotNet.sln` for Visual Studio 18. Modified `Program.cs` for improved configuration loading and Redis setup. Refactored `IUnifiService.cs` to use a primary constructor. Enhanced `Verify.cs` with concise dependency injection and logging. Removed `azure-pipelines.yml`, transitioning CI/CD from Azure Pipelines to GitHub Actions.

* Switch build environment to dev in YAML config

Changed the environment for the `build-and-deploy` job in the `dev-publish-function.yml` file from `prod` to `dev`. This update redirects the deployment process to the development environment, facilitating testing and development before production deployment.
Comment thread Verify.cs Fixed
Comment thread Verify.cs Fixed
Comment thread Verify.cs Fixed
… user input

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Introduced new Azure Function endpoints for managing authorized IPs:
- Added `AdminstuffAddIp`, `AdminstuffListIps`, and `AdminstuffRefreshIps` endpoints.
- Secured endpoints with `AuthorizationLevel.Function`.

Enhanced `IUnifiService` and `UnifiService`:
- Added methods for retrieving, appending, and refreshing IP lists.
- Implemented caching for both API and manual IPs using `IDistributedCache`.
- Improved IP validation and filtering to prioritize public IPv4 addresses.

Refactored Unifi API response handling:
- Updated models to include additional fields for detailed IP data.
- Improved parsing and logging of API responses.

Improved caching logic:
- Introduced separate cache keys for API and manual IPs.
- Configured default cache durations for better performance.

Updated `Verify.cs` to sanitize client IPs by removing port numbers.

Enhanced logging, code readability, and maintainability throughout.
Comment thread Services/IUnifiService.cs Fixed
… user input

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@MWG-Logan MWG-Logan marked this pull request as ready for review October 23, 2025 21:29
@MWG-Logan MWG-Logan merged commit 76676bc into main Oct 23, 2025
3 checks passed
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.

3 participants