Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 18, 2025

  • Add encryption/decryption methods to TestHarness class
  • Implement XOR encryption logic as specified in issue
  • Modify changeAdapterConfig to automatically encrypt encryptedNative fields
  • Add manual encrypt/decrypt methods for developer use
  • Add logging for encrypted/decrypted fields for transparency
  • Create tests for the new functionality
  • Update changelog with breaking change entry
  • Build and test the implementation
  • Fix linting issues
  • Address review feedback: use obj.encryptedNative instead of loadAdapterCommon
  • Address review feedback: add private getSystemSecret method with caching

Changes made:

  • Added encryptValue() and decryptValue() public methods to TestHarness class for manual use
  • Modified changeAdapterConfig() to automatically encrypt fields listed in adapter's encryptedNative array
  • Implemented XOR encryption/decryption using the system config secret as specified in the issue
  • Added debug logging when fields are encrypted for transparency
  • Created comprehensive tests validating the XOR encryption algorithm
  • Updated changelog marking this as a breaking change

Review feedback addressed:

  • Changed to use obj.common?.encryptedNative instead of loadAdapterCommon() for better flexibility with different adapter names
  • Added private getSystemSecret() method with caching to prevent duplicate system config reads and eliminate code duplication
  • Removed unused loadAdapterCommon import

Key Features:

  • Automatic encryption of encryptedNative fields during config changes
  • Manual encryption/decryption methods for developer use
  • Uses system config secret for encryption key with caching
  • Symmetric XOR encryption (encrypt and decrypt use same operation)
  • Logging shows which fields were encrypted for transparency
  • Works with any field names listed in adapter's encryptedNative array

Fixes #671.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Contributor Author

Copilot AI commented Sep 18, 2025

@Apollon77 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

Copilot AI changed the title [WIP] Encrypt/Decrypt adapterconfig fields automatically for Intergation tests Add encryption/decryption functionality for adapter config fields in integration tests Sep 18, 2025
Copilot AI requested a review from Apollon77 September 18, 2025 21:46
Updated changelog to reflect breaking changes and new methods.
Refactor to access encryptedNative directly from obj.
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.

Encrypt/Decrypt adapterconfig fields automatically for Intergation tests

2 participants