Conversation
…plication Insights
Dev refresh
…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>
* 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.
… 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.
… user input Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.