You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/02/15 12:39:40 UTC
[GitHub] [pulsar] tuteng opened a new pull request #9588: [feature][python]support python end to end encryption
tuteng opened a new pull request #9588:
URL: https://github.com/apache/pulsar/pull/9588
### Motivation
After supporting end-to-end encryption for nodejs, consider supporting end-to-end encryption for python clients.
### Modifications
* Add static method `create` for `DefaultCryptoKeyReader`
* Add `ConsumerConfiguration_setCryptoKeyReader` and `ProducerConfiguration_setCryptoKeyReader`
* Add class `CryptoKeyReader `
* Add python integration test
### Verifying this change
* Add test
*(Please pick either of the following options)*
This change is a trivial rework / code cleanup without any test coverage.
*(or)*
This change is already covered by existing tests, such as *(please describe tests)*.
*(or)*
This change added tests and can be verified as follows:
*(example:)*
- *Added integration tests for end-to-end deployment with large payloads (10MB)*
- *Extended integration test for recovery after broker failure*
### Does this pull request potentially affect one of the following parts:
*If `yes` was chosen, please highlight the changes*
- Dependencies (does it add or upgrade a dependency): (yes / no)
- The public API: (yes / no)
- The schema: (yes / no / don't know)
- The default values of configurations: (yes / no)
- The wire protocol: (yes / no)
- The rest endpoints: (yes / no)
- The admin cli options: (yes / no)
- Anything that affects deployment: (yes / no / don't know)
### Documentation
- Does this pull request introduce a new feature? (`yes` / no)
- If yes, how is the feature documented? (not applicable / `docs` / JavaDocs / not documented)
- If a feature is not applicable for documentation, explain why?
- If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tuteng commented on pull request #9588: [feature][python-client]support python end to end encryption
Posted by GitBox <gi...@apache.org>.
tuteng commented on pull request #9588:
URL: https://github.com/apache/pulsar/pull/9588#issuecomment-781311982
/pulsarbot run-failure-checks
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tuteng commented on pull request #9588: [feature][python-client]support python end to end encryption
Posted by GitBox <gi...@apache.org>.
tuteng commented on pull request #9588:
URL: https://github.com/apache/pulsar/pull/9588#issuecomment-779842102
cpp tls test failed
```
Handshake failed: certificate verify failed
Which is: Ok
[ FAILED ] AuthPluginTest.testTls (111 ms)
[----------] 1 test from AuthPluginTest (111 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (111 ms total)
[ PASSED ] 0 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] AuthPluginTest.testTls
[ FAILED ] AuthPluginTest.testTlsDetectPulsarSsl (128 ms)
[----------] 1 test from AuthPluginTest (128 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (128 ms total)
[ PASSED ] 0 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] AuthPluginTest.testTlsDetectPulsarSsl
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tuteng commented on pull request #9588: [feature][python-client]support python end to end encryption
Posted by GitBox <gi...@apache.org>.
tuteng commented on pull request #9588:
URL: https://github.com/apache/pulsar/pull/9588#issuecomment-780959605
@merlimat PTAL
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] merlimat commented on a change in pull request #9588: [feature][python-client]support python end to end encryption
Posted by GitBox <gi...@apache.org>.
merlimat commented on a change in pull request #9588:
URL: https://github.com/apache/pulsar/pull/9588#discussion_r576346093
##########
File path: pulsar-client-cpp/python/pulsar/__init__.py
##########
@@ -576,7 +584,8 @@ def subscribe(self, topic, subscription_name,
is_read_compacted=False,
properties=None,
pattern_auto_discovery_period=60,
- initial_position=InitialPosition.Latest
+ initial_position=InitialPosition.Latest,
+ crypto_key_reader=None
Review comment:
Add PyDoc for `crypto_key_reader`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] merlimat merged pull request #9588: [feature][python-client]support python end to end encryption
Posted by GitBox <gi...@apache.org>.
merlimat merged pull request #9588:
URL: https://github.com/apache/pulsar/pull/9588
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tuteng commented on pull request #9588: [feature][python-client]support python end to end encryption
Posted by GitBox <gi...@apache.org>.
tuteng commented on pull request #9588:
URL: https://github.com/apache/pulsar/pull/9588#issuecomment-779842704
/pulsarbot run-failure-checks
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tuteng commented on pull request #9588: [feature][python-client]support python end to end encryption
Posted by GitBox <gi...@apache.org>.
tuteng commented on pull request #9588:
URL: https://github.com/apache/pulsar/pull/9588#issuecomment-781342839
/pulsarbot run-failure-checks
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] tuteng commented on pull request #9588: [feature][python-client]support python end to end encryption
Posted by GitBox <gi...@apache.org>.
tuteng commented on pull request #9588:
URL: https://github.com/apache/pulsar/pull/9588#issuecomment-781359089
ping @merlimat PTAL
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] merlimat commented on a change in pull request #9588: [feature][python-client]support python end to end encryption
Posted by GitBox <gi...@apache.org>.
merlimat commented on a change in pull request #9588:
URL: https://github.com/apache/pulsar/pull/9588#discussion_r576345595
##########
File path: pulsar-client-cpp/python/pulsar/__init__.py
##########
@@ -452,6 +452,8 @@ def create_producer(self, topic,
message_routing_mode=PartitionsRoutingMode.RoundRobinDistribution,
properties=None,
batching_type=BatchingType.Default,
+ encryption_key=None,
+ crypto_key_reader=None
Review comment:
The new args should also be added to the PyDoc string below
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] sijie commented on pull request #9588: [feature][python-client]support python end to end encryption
Posted by GitBox <gi...@apache.org>.
sijie commented on pull request #9588:
URL: https://github.com/apache/pulsar/pull/9588#issuecomment-779679057
@BewareMyPower Can you also review this?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org