You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Carlo Mazzaferro (Jira)" <ji...@apache.org> on 2020/11/02 12:25:00 UTC

[jira] [Updated] (ARROW-10460) FlightRPC authentication mechanism changed and is undocumented, breaking current working code

     [ https://issues.apache.org/jira/browse/ARROW-10460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carlo Mazzaferro updated ARROW-10460:
-------------------------------------
    Description: 
Authentication with FlightClient changed from version 1.0.1 to 2.0.0 and is undocumented. 

 

{{>>> from pyarrow import __version__}}{{>>> print(__version__}}{{'1.0.1'}}{{>>> from handlers import ApiKeyClientAuthHandler  # custom handler}}
{{ >>> from pyarrow.flight import (}}
{{ ... FlightClient)}}
{{ >>> client = FlightClient(location="grpc+tcp://xxxxxxxxxx.com")}}
{{ >>> client.authenticate(ApiKeyClientAuthHandler(api_key="xxxxx"))}}

 

And the exact same code in 2.0.0 breaks

 

>>> from pyarrow import __version__

>>> print(__version__)

'2.0.0'

>>> from handlers import ApiKeyClientAuthHandler  # custom handler
 >>> from pyarrow.flight import (
 ... FlightClient)
 >>> client = FlightClient(location="grpc+tcp://xxxxxxxxxx.com")
 >>> client.authenticate(ApiKeyClientAuthHandler(api_key="xxxxx"))

{{Traceback (most recent call last):}}
{{   File "scratch.py", line 15, in <module>}}
{{     client.authenticate(ApiKeyClientAuthHandler(api_key="c8669431-8172-4c24-8b17-300330e10f1b"))}}
{{   File "pyarrow/_flight.pyx", line 1149, in pyarrow._flight.FlightClient.authenticate}}
{{   File "pyarrow/_flight.pyx", line 70, in pyarrow._flight.check_flight_status}}
{{pyarrow._flight.FlightUnavailableError: gRPC returned unavailable error, with message: failed to connect to all addresses}}

 

What happened?

 

  was:
Authentication with FlightClient changed from version 1.0.1 to 2.0.0 and is undocumented. 

 

```

>>> from pyarrow import __version__

>>> print(__version__

'1.0.1'

>>> from handlers import ApiKeyClientAuthHandler  # custom handler
>>> from pyarrow.flight import (
... FlightClient)
>>> client = FlightClient(location="grpc+tcp://xxxxxxxxxx.com")
>>> client.authenticate(ApiKeyClientAuthHandler(api_key="xxxxx"))

```

And the exact same code in 2.0.0 breaks

 

```

```

>>> from pyarrow import __version__

>>> print(__version__)

'2.0.0'

>>> from handlers import ApiKeyClientAuthHandler  # custom handler
>>> from pyarrow.flight import (
... FlightClient)
>>> client = FlightClient(location="grpc+tcp://xxxxxxxxxx.com")
>>> client.authenticate(ApiKeyClientAuthHandler(api_key="xxxxx"))

```

What happened?

 


> FlightRPC authentication mechanism changed and is undocumented, breaking current working code
> ---------------------------------------------------------------------------------------------
>
>                 Key: ARROW-10460
>                 URL: https://issues.apache.org/jira/browse/ARROW-10460
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: FlightRPC, Python
>    Affects Versions: 2.0.0
>         Environment: MacOS Catalina, python 3.7.4
>            Reporter: Carlo Mazzaferro
>            Priority: Major
>             Fix For: 1.0.1
>
>
> Authentication with FlightClient changed from version 1.0.1 to 2.0.0 and is undocumented. 
>  
> {{>>> from pyarrow import __version__}}{{>>> print(__version__}}{{'1.0.1'}}{{>>> from handlers import ApiKeyClientAuthHandler  # custom handler}}
> {{ >>> from pyarrow.flight import (}}
> {{ ... FlightClient)}}
> {{ >>> client = FlightClient(location="grpc+tcp://xxxxxxxxxx.com")}}
> {{ >>> client.authenticate(ApiKeyClientAuthHandler(api_key="xxxxx"))}}
>  
> And the exact same code in 2.0.0 breaks
>  
> >>> from pyarrow import __version__
> >>> print(__version__)
> '2.0.0'
> >>> from handlers import ApiKeyClientAuthHandler  # custom handler
>  >>> from pyarrow.flight import (
>  ... FlightClient)
>  >>> client = FlightClient(location="grpc+tcp://xxxxxxxxxx.com")
>  >>> client.authenticate(ApiKeyClientAuthHandler(api_key="xxxxx"))
> {{Traceback (most recent call last):}}
> {{   File "scratch.py", line 15, in <module>}}
> {{     client.authenticate(ApiKeyClientAuthHandler(api_key="c8669431-8172-4c24-8b17-300330e10f1b"))}}
> {{   File "pyarrow/_flight.pyx", line 1149, in pyarrow._flight.FlightClient.authenticate}}
> {{   File "pyarrow/_flight.pyx", line 70, in pyarrow._flight.check_flight_status}}
> {{pyarrow._flight.FlightUnavailableError: gRPC returned unavailable error, with message: failed to connect to all addresses}}
>  
> What happened?
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)