Skip to content

Conversation

@GermanBluefox
Copy link
Contributor

Some adapters, like "email" have complex attribute paths, like transportOptions.auth.pass it is not possible to use protectedNative and encryptedNative for that.

For Features:

Tests

  • I have added tests to test this feature
  • It is not possible to test this feature

Documentation
No documentation required

@GermanBluefox GermanBluefox requested a review from Copilot March 14, 2025 20:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces changes to support complex attribute names for the encrypted and protected native configuration properties by updating how attributes are accessed, set, and deleted. Key changes include replacing direct property access with helper functions (getObjectAttribute, setObjectAttribute, deleteObjectAttribute) and updating tests to verify that complex attributes (such as "complex.password") are handled correctly.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

File Description
packages/adapter/src/lib/adapter/utils.ts Updated helper functions to support complex attribute names by adding wrapper functions for get, set, and delete operations.
packages/adapter/src/lib/adapter/adapter.ts Revised usage of attribute access in encryption/decryption flows and protected native deletion to use the new helper functions.
packages/controller/test/lib/testObjectsFunctions.ts
packages/controller/test/lib/testAdapterHelpers.ts
Updated tests to include complex attribute scenarios for encryption and protection.

@mcm1957
Copy link
Contributor

mcm1957 commented Mar 14, 2025

This PR looks like a solution to #846 (or at least as related to that issue). @GermanBluefox please confirm and check that this issue is covered by the PR changes.

Especially encryption of array related elements liek table fileds should be implemented too when changes are made to this area.

@GermanBluefox GermanBluefox marked this pull request as draft March 14, 2025 20:44
@GermanBluefox GermanBluefox marked this pull request as ready for review March 14, 2025 21:48
@GermanBluefox
Copy link
Contributor Author

This PR looks like a solution to #846 (or at least as related to that issue). @GermanBluefox please confirm and check that this issue is covered by the PR changes.

Especially encryption of array related elements liek table fileds should be implemented too when changes are made to this area.

This solves only second part of requirement

@GermanBluefox
Copy link
Contributor Author

This PR can now encrypt passwords in arrays

@GermanBluefox GermanBluefox merged commit 16f7418 into master Apr 17, 2025
15 checks passed
@GermanBluefox GermanBluefox deleted the complex-encrypted branch April 17, 2025 11:58
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.

4 participants