You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "BewareMyPower (via GitHub)" <gi...@apache.org> on 2023/03/16 06:13:34 UTC

[GitHub] [pulsar-client-python] BewareMyPower opened a new pull request, #106: Support the base64 encoded credentials for OAuth2 authentication

BewareMyPower opened a new pull request, #106:
URL: https://github.com/apache/pulsar-client-python/pull/106

   Fixes https://github.com/apache/pulsar-client-python/issues/101
   
   ### Motivation
   
   Currently the `private_key` field of the JSON passed to `AuthenticationOauth2` only represents the path to the file, we need to support passing the base64 encoded JSON string.
   
   ### Modifications
   
   Since the C++ client supports reading the `client_id` and `client_secret` fields from the JSON, a `_convert` method, which converts the `private_key` field to the `client_id` and `client_secret` fields, is added to `AuthenticationOauth2`. Then, users can specify the base64 encoded value in the `private_key` field.
   
   Since the current workflow already uses a `tokenSecretKey` config for JWT authentication and this secret key cannot be used to verify the OAuth2 access token, a docker-compose YAML file is added to set up another Pulsar standalone with OAuth2 authentication configured. `oauth2_test.py` is added to run against this separated cluster.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-python] BewareMyPower commented on pull request #106: Support the base64 encoded credentials for OAuth2 authentication

Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower commented on PR #106:
URL: https://github.com/apache/pulsar-client-python/pull/106#issuecomment-1484357623

   I will implement this feature in C++ client first. Mark it as drafted


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-python] RobertIndie commented on pull request #106: Support the base64 encoded credentials for OAuth2 authentication

Posted by "RobertIndie (via GitHub)" <gi...@apache.org>.
RobertIndie commented on PR #106:
URL: https://github.com/apache/pulsar-client-python/pull/106#issuecomment-1474785391

   From my understanding, it's a missing feature in the C++ client. Right? If so, I suggest we implement it in the C++ client even though we need to cut a new release.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-python] BewareMyPower commented on pull request #106: Support the base64 encoded credentials for OAuth2 authentication

Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower commented on PR #106:
URL: https://github.com/apache/pulsar-client-python/pull/106#issuecomment-1474704905

   > I'm curious why don't we make these changes to the c++ client?
   
   Of course we can. But with this PR, we can have this feature without releasing a new version of the C++ client. If there is something wrong with the implementation of the C++ client, we have to raise a new release.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-python] shibd closed pull request #106: Support the base64 encoded credentials for OAuth2 authentication

Posted by "shibd (via GitHub)" <gi...@apache.org>.
shibd closed pull request #106: Support the base64 encoded credentials for OAuth2 authentication
URL: https://github.com/apache/pulsar-client-python/pull/106


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-python] shibd commented on pull request #106: Support the base64 encoded credentials for OAuth2 authentication

Posted by "shibd (via GitHub)" <gi...@apache.org>.
shibd commented on PR #106:
URL: https://github.com/apache/pulsar-client-python/pull/106#issuecomment-1475489799

   This PR of change is similar to the conversion of parameters, which is lightweight. So I think it can be implemented on the python side (it will be handed over to the user faster than the implementation on the cpp side)
   
   If the CPP client has the same problem, we should create the corresponding issue in the CPP repo. After CPP support it, maybe we can remove it on the Python side as well.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-python] shibd commented on pull request #106: Support the base64 encoded credentials for OAuth2 authentication

Posted by "shibd (via GitHub)" <gi...@apache.org>.
shibd commented on PR #106:
URL: https://github.com/apache/pulsar-client-python/pull/106#issuecomment-1519230529

   Fix by apache/pulsar-client-cpp#249


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-python] BewareMyPower commented on pull request #106: Support the base64 encoded credentials for OAuth2 authentication

Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower commented on PR #106:
URL: https://github.com/apache/pulsar-client-python/pull/106#issuecomment-1475557056

   @merlimat Could you share your point?


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-python] BewareMyPower commented on pull request #106: Support the base64 encoded credentials for OAuth2 authentication

Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower commented on PR #106:
URL: https://github.com/apache/pulsar-client-python/pull/106#issuecomment-1475110959

   >  If so, I suggest we implement it in the C++ client even though we need to cut a new release.
   
   We can implement it in the C++ client. But I think even if so, we don't have to reuse the C++ implementation from the Python side.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org