Merge critical IAM token refresh bug fix and test improvements from upstream#72
Merge critical IAM token refresh bug fix and test improvements from upstream#72
Conversation
…n permissions (#24) Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…in permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Bumps [github.com/golang-jwt/jwt/v5](https://github.com/golang-jwt/jwt) from 5.2.1 to 5.2.2. - [Release notes](https://github.com/golang-jwt/jwt/releases) - [Changelog](https://github.com/golang-jwt/jwt/blob/main/VERSION_HISTORY.md) - [Commits](golang-jwt/jwt@v5.2.1...v5.2.2) --- updated-dependencies: - dependency-name: github.com/golang-jwt/jwt/v5 dependency-version: 5.2.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.37.0 to 0.38.0. - [Commits](golang/net@v0.37.0...v0.38.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-version: 0.38.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…27) Bumps [github.com/go-chi/chi/v5](https://github.com/go-chi/chi) from 5.2.1 to 5.2.2. - [Release notes](https://github.com/go-chi/chi/releases) - [Changelog](https://github.com/go-chi/chi/blob/master/CHANGELOG.md) - [Commits](go-chi/chi@v5.2.1...v5.2.2) --- updated-dependencies: - dependency-name: github.com/go-chi/chi/v5 dependency-version: 5.2.2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.31.0 to 0.35.0. - [Commits](golang/crypto@v0.31.0...v0.35.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-version: 0.35.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/go-chi/chi/v5](https://github.com/go-chi/chi) from 5.2.1 to 5.2.2. - [Release notes](https://github.com/go-chi/chi/releases) - [Changelog](https://github.com/go-chi/chi/blob/master/CHANGELOG.md) - [Commits](go-chi/chi@v5.2.1...v5.2.2) --- updated-dependencies: - dependency-name: github.com/go-chi/chi/v5 dependency-version: 5.2.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…n permissions (#30) Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…in permissions (#31) Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…n permissions (#32) Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…app (#33) Bumps [github.com/go-chi/chi/v5](https://github.com/go-chi/chi) from 5.2.1 to 5.2.2. - [Release notes](https://github.com/go-chi/chi/releases) - [Changelog](https://github.com/go-chi/chi/blob/master/CHANGELOG.md) - [Commits](go-chi/chi@v5.2.1...v5.2.2) --- updated-dependencies: - dependency-name: github.com/go-chi/chi/v5 dependency-version: 5.2.2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/go-chi/chi/v5](https://github.com/go-chi/chi) from 5.2.1 to 5.2.2. - [Release notes](https://github.com/go-chi/chi/releases) - [Changelog](https://github.com/go-chi/chi/blob/master/CHANGELOG.md) - [Commits](go-chi/chi@v5.2.1...v5.2.2) --- updated-dependencies: - dependency-name: github.com/go-chi/chi/v5 dependency-version: 5.2.2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Initial plan * Fix MockApplication missing IsVerboseConfig and SetVerboseConfig methods Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Fix MockApplication missing methods across all modules Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Fix SimpleMockApplication missing IsVerboseConfig and SetVerboseConfig methods in httpserver module Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
--- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ework modules (#39) * Initial plan * Merge fork changes and replace CrisisTextLine references with GoCodeAlone Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Run go mod tidy on all components and fix module dependencies Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Replace all remaining CrisisTextLine references and complete migration Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Fix auth module linting issues and improve eventlogger test coverage Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Complete test coverage improvements and linting fixes Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Fix security issue and linting violations in multiple modules - Security: Remove authorization and set-cookie headers from httpclient logging to prevent credential leakage - Auth module: Fix all testifylint violations (bool-compare, require-error issues) - Database module: Fix noctx violation by using BeginTx instead of deprecated Begin - Cache module: Fix errcheck, testifylint issues (len, require-error, float-compare) Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Fix linting issues in eventlogger, letsencrypt, and eventbus modules - EventLogger: Fix err113 and errcheck violations, format code - LetsEncrypt: Fix gofmt formatting issue - EventBus: Comprehensive fixes: - Created static errors to replace dynamic fmt.Errorf calls - Fixed noctx violations using ErrorContext instead of Error - Fixed testifylint len assertion - Added proper error wrapping for all interface method calls - Removed unused fmt import Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Fix security vulnerability and resolve linting violations in httpserver and scheduler modules Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Fix remaining linting issues in httpserver and scheduler modules Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
…on, and resolve example failures (#41) * Initial plan * Fix CI workflow and add auth-demo example Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Add cache-demo and scheduler-demo examples Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Add missing eventbus, jsonschema, and letsencrypt demo examples with CI integration Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Fix service dependencies for eventbus and letsencrypt demos, partial fix for jsonschema demo Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Potential fix for code scanning alert no. 34: Slice memory allocation with excessive size value Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 35: Reflected cross-site scripting Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 32: Uncontrolled data used in path expression Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Fix all example application failures - auth-demo, cache-demo, scheduler-demo, jsonschema-demo, observer-demo Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Fix missing health endpoints in demo applications Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> Co-authored-by: Jonathan Langevin <codingsloth@pm.me> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v4...v5) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Merged fork/main with significant new features and improvements - Resolved all merge conflicts by accepting fork versions - Ready to update references from CrisisTextLine to GoCodeAlone
…eAlone - Successfully merged all changes from CrisisTextLine/modular fork - Updated all repository references from CrisisTextLine to GoCodeAlone - Updated copyright from CrisisTextLine to GoCodeAlone in LICENSE - Added replace directives to all modules for local development - Added inter-module replace directives (letsencrypt -> httpserver) - Ran go mod tidy for root project, all modules, examples, and CLI - Linter passes with 0 issues - All core tests pass (270+ tests running successfully) - Repository is now fully migrated to GoCodeAlone organization Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Merge and update latest changes from CrisisTextLine/modular fork
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.10.0 to 1.11.0. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](stretchr/testify@v1.10.0...v1.11.0) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-version: 1.11.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
…com/stretchr/testify-1.11.0 Bump github.com/stretchr/testify from 1.10.0 to 1.11.0
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.11.0 to 1.11.1. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](stretchr/testify@v1.11.0...v1.11.1) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-version: 1.11.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…etsencrypt) + stabilize config accumulation test
- Introduced isolation tests for environment variable management in `isolation_test.go`. - Added tests for event handling and backoff logic in `reload_orchestrator_additional_test.go`. - Implemented tests for the Memguard secret provider lifecycle in `secret_provider_memguard_test.go`. - Created tests for secret value handling and error scenarios in `secret_value_additional_test.go`. - Developed tests for service registry functionalities in `service_registry_core_test.go`. - Added tenant configuration loading tests in `tenant_config_file_loader_additional_test.go`. - Implemented additional tests for tenant configuration provider behavior in `tenant_config_provider_additional_test.go`. - Created tests for tenant service registration and notification mechanisms in `tenant_service_additional_test.go`.
… timestamp behavior refactor: enhance logging to redact sensitive information in testLogger chore: update permissions in doc-drift workflow
… data races occur refactor: enhance violation retrieval to return deep copies for better isolation chore: update .gitignore to include additional temporary files and backup patterns
Baseline spec introduction
chore: bump module dependencies to v1.4.3
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
📋 API Contract Changes Summary✅ No API surface changes detected relative to main. This automated check examined exported types, functions, methods, and interfaces for the core framework and all modules. If you expected API changes, ensure exported identifiers have the correct casing and that the contract extraction tool supports the new patterns. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
modules/database/aws_iam_auth.go
Outdated
| if r := recover(); r != nil { | ||
| // Log the panic but don't fail the token refresh process | ||
| // The actual logging will be handled by the callback implementation if available | ||
| fmt.Printf("Database token refresh callback panic recovered: %v\n", r) |
There was a problem hiding this comment.
@copilot Use the logger service rather than resorting to printf.
There was a problem hiding this comment.
Fixed in commit a3e1dc5. The AWSIAMTokenProvider now accepts a logger parameter and uses the logger service instead of fmt.Printf for panic recovery reporting.
… recovery Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
This PR merges critical bug fixes and improvements from the CrisisTextLine upstream fork while preserving all GoCodeAlone enhancements and functionality.
Key Changes
🔧 IAM Token Refresh Bug Fix
Merged the critical IAM token refresh fix from upstream (commit 75708cc) that prevents database disconnection after AWS IAM token expiration:
TokenRefreshCallbackinterface: Enables automatic notification when IAM tokens are refreshedAWSIAMTokenProvider: Now includes token refresh callbacks with panic recovery and proper logger integrationonTokenRefreshmethod recreates database connections with new tokensConnectionTimeoutfield inAWSIAMAuthConfig🛡️ Nil Pointer Panic Protection
Verified that the nil pointer panic fix from upstream (commit 486711f) is already present and working in our codebase. All interface matching scenarios pass without panics.
🧪 Test Coverage Improvements
Added comprehensive test coverage for the new IAM token refresh functionality:
MockLoggerfor consistent testing across database module🔄 Database Module Enhancements
Updated the database module to support the new IAM token refresh functionality:
NewDatabaseServiceto accept logger parameterinitializeConnectionsto pass application loggerfmt.Printffor panic recoveryTesting
All tests pass including:
Example Usage
The IAM token refresh now works automatically:
This merge ensures users benefit from both the critical upstream bug fixes and all GoCodeAlone improvements, providing a robust and stable database connection experience with AWS IAM authentication.
Fixes #69.
Recent Updates
fmt.Printfwith logger service in IAM token refresh panic recoveryAWSIAMTokenProviderconstructor to accept logger parameter✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.