- Sep 06, 2024
-
-
Christian Roessner authored
Removed Ansible roles and moved the geoip-policyd configuration and service file under the systemd directory. Updated the build workflows to include the new locations for packaging purposes. This refactoring simplifies the project structure and ensures consistent deployment configurations.
-
- Sep 05, 2024
-
-
Christian Roessner authored
Changed the release name field in the GitHub Actions workflow to use `github.ref_name` instead of `github.ref`. This ensures that the proper reference name is used during the release process.
-
Christian Roessner authored
Updated the GitHub Actions workflow to append a .tar.gz suffix to the artifact names and paths for stable builds. This change ensures that the artifacts are correctly identified as tar.gz files when uploaded.
-
Christian Roessner authored
Refactor the build matrix in the build-stable workflow to dynamically use both `goos` and `goarch`, reducing redundancy. This change modifies artifact name definitions and ensures the correct assets are uploaded.
-
Christian Roessner authored
Switch from actions/create-release@v1 to softprops/action-gh-release@v2 for creating releases. Updated token references to secrets.GEOIP_POLICYD_RELEASE for improved security. Adjusted repository and asset path settings accordingly.
-
Christian Roessner authored
Deleted the development build workflow file as it is no longer required. Updated the stable build workflow to use a unified GitHub token and improved release naming convention.
-
Christian Roessner authored
Inserted ls -l commands after checkout and changelog generation steps to help troubleshoot file presence and structure during the workflow execution.
-
Christian Roessner authored
Changed the tag pattern from '*' to 'v*' in the GitHub Actions build-stable workflow. This ensures that only tags starting with 'v' trigger the workflow, aligning with versioning conventions.
-
Christian Roessner authored
Introduce configuration for conventional changelog generation with GitHub style. Also, add a template to structure the changelog entries, segregating changes, reverts, pull requests, and notes.
-
Christian Roessner authored
Adjusted the filename format for the built binary to include the architecture specification, ensuring clarity and consistency across different architectures. This facilitates easier identification and management of binaries.
-
Christian Roessner authored
Add matrix strategy to support both amd64 and arm64 architectures for Linux builds. Update artifact names to differentiate by OS and architecture. Download artifacts for both architectures in subsequent steps to ensure proper handling.
-
Christian Roessner authored
Adjust artifact naming in build-stable.yaml to include both operating system and architecture. This change ensures that artifacts are clearly identified by their target environment, preventing any potential confusion during artifact handling and deployment.
-
Christian Roessner authored
The variable name used for the artifact has been changed from `matrix.os` to `matrix.goos` both in the upload and download steps of the GitHub Actions workflow. This ensures consistency and potentially corrects an issue with environment naming.
-
Christian Roessner authored
Revised the naming conventions for artifacts and binaries to include both OS and architecture in the path, ensuring better compatibility and organization. Corrected the directory structure for placing binaries in .debpkg and .rpmpkg folders.
-
Christian Roessner authored
Added a change to ensure the script navigates to the 'dist' directory before creating the tar.gz archive. This resolves issues with incorrect file paths during the compression process.
-
Christian Roessner authored
This commit introduces a comprehensive GitHub Actions workflow to automate the build, packaging, and release of the `geoip-policyd` project. It includes steps for building artifacts, creating Linux packages in both DEB and RPM formats, generating release changelogs, and uploading release assets to GitHub. This setup streamlines the release process and ensures consistency in the generated artifacts and release notes.
-
- Sep 04, 2024
-
-
Christian Roessner authored
Correct the token secret name from `geoip-policyd_RELEASE` to `geoip_policyd_RELEASE` in the GitHub Actions workflow. This ensures the release action uses the right secret for authentication.
-
Christian Roessner authored
Refactor the PATCHModify method to improve readability and error handling. Introduce helper functions for extracting and validating account data. Update the HTTP requests log to include new endpoints and payload structures.
-
Christian Roessner authored
Introduce two GitHub Actions workflows for building the project. The `build-stable.yaml` handles the release builds triggered by tag pushes, while the `build-features.yaml` manages feature branch builds. Both workflows support cross-compilation for `linux/amd64` and `linux/arm64` environments.
-
Christian Roessner authored
-
Christian Roessner authored
Updated the logPolicyResult function to accept dynamic policy limits for foreign and home IPs and countries as arguments, rather than using the values from the configuration directly. This enhances flexibility and allows easier adjustments to the policy parameters during runtime.
-
- Sep 03, 2024
-
-
Christian Roessner authored
Removed sed command from .gitlab-ci.yml and added Git metadata extraction in Dockerfile to embed version information in the build process. This ensures the built binaries include the latest Git tag and commit hash.
-
Christian Roessner authored
Changed the version variable in main.go from a constant to a variable for dynamic assignment during build. Updated the GitLab CI configurations, including the removal of the golangci-lint stage and upgrading specific tool versions. Modified the Makefile to streamline build and test commands, and removed the lint task.
-
Christian Roessner authored
Updated the RemoteClient struct to rename IP-related and Country-related fields to ForeignIPs and ForeignCountries. This ensures a clearer distinction between foreign and home properties, improving code readability and maintainability. Updated all related functions and comments accordingly.
-
Christian Roessner authored
Renamed multiple functions for clarity, such as `applyHomeSettings` to `checkHomeCountry` and `setCurrentValues` to `setCurrentClientInfo`. Introduced `updatePolicyResponse` to update policy data, adjusted policy checks to account for 'isHome', and enriched the HTTP response structure with new fields.
-
- Sep 01, 2024
-
-
Christian Roessner authored
This new option indicates that senders are already known by an upstream service. It is now documented with its default value set to false.
-
Christian Roessner authored
Switched to using alpine:3.20 for the final image to access essential utilities. Added installation of ca-certificates, bash, and curl to the final image to meet runtime dependencies.
-
Christian Roessner authored
Renamed functions for clarity and refactored the logic within `applyHomeSettings` and `evaluatePolicy`. Implemented a new `ForceUserKnown` flag in configuration to bypass user checks, with corresponding tests added.
-
- Aug 31, 2024
-
-
Christian Roessner authored
Ensure the functions `checkCountryPolicy` and `checkIPsPolicy` handle cases where the `countryCode` or `clientIP` are empty strings, respectively. This prevents potential issues from unvalidated or missing inputs.
-
- Aug 30, 2024
-
-
Christian Roessner authored
Enhanced logging by including current client IP and country code in the PolicyResponse. Updated relevant functions to set and log these new fields to better trace the client request details.
-
Christian Roessner authored
This commit significantly refactors `main.go`, introducing new functions to break down complex logic into more manageable parts. Functions like `initializeLogger`, `initializeSignalHandler`, and `configureRedis` enhance code readability and maintainability. Comments have been added to all functions to document their purpose and usage. Additionally, updates include enhanced error handling and structured setup of GeoIP and LDAP services.
-
- Aug 29, 2024
-
-
Christian Roessner authored
Separated Redis client creation logic into dedicated helper functions `createFailoverClient` and `createStandardClient`. This improves code readability and maintainability by avoiding redundancy and providing clearer abstraction. Updated the `.idea/httpRequests/http-requests-log.http` file with new request examples and removed outdated entries.
-
Christian Roessner authored
Introduced extensive test coverage for IP and country checking policies within the system. Unit tests for `checkIPsPolicy`, `checkCountryPolicy`, and auxiliary functions ensure accurate policy enforcement and error handling.
-
Christian Roessner authored
Split large functions into smaller, well-defined functions for better readability and maintainability. Created utility functions for logging and user checks, tidying up the main logic by abstracting repetitive tasks.
-
- Mar 18, 2024
-
-
Christian Roessner authored
The Golang version used in the GitLab CI/CD pipeline has been updated from 1.21 to 1.22. This change ensures our pipeline runs with the latest and more stable version of Golang.
-
Christian Roessner authored
-
Christian Roessner authored
-
Christian Roessner authored
-
Christian Roessner authored
Improved the Redis Sentinel configuration check in the NewRedisReplicaClient function. Now, it checks if there are any sentinels configured instead of requiring more than one. This provides better support for single sentinel configurations.
-
- Mar 14, 2024
-
-
Christian Roessner authored
The code changes add checks for the existence and accessibility of the GeoIP file. If the file does not exist or cannot be accessed, an error is logged and the program will quit with a panic call. This added validation prevents crashes and aids in quickly identifying configuration problems.
-