FrancescoCastaldi commented on PR #45186:
URL: https://github.com/apache/superset/pull/45186#issuecomment-6172118247
### PR Update: Hardened Snowflake Keypair DER Assertions and Passphrase Test
Coverage
Addressing review feedback from @sadpandajoe:
#### Changes Applied (Commit `af547897`)
1. **Strict DER Byte Verification
(`tests/unit_tests/db_engine_specs/test_snowflake.py`)**:
- Replaced loose `isinstance(bytes)` and `len > 0` checks with strict
equality against expected DER PKCS8 `NoEncryption` private bytes.
- Added anti-PEM assertion (`not startswith(b"-----BEGIN")`).
- Added round-trip validation using `serialization.load_der_private_key`
asserting mathematical equality with the original RSA key.
2. **Preemptive Passphrase Test Suite**:
- Added
`test_snowflake_update_params_from_encrypted_extra_keypair_passphrase` testing
decryption of password-protected PEM keys and verification that unencrypted DER
PKCS8 bytes are set in `connect_args`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]