Skip to content

Add auth_type to LivyHook #25179

@bdsoha

Description

@bdsoha

Apache Airflow Provider(s)

apache-livy

Versions of Apache Airflow Providers

apache-airflow-providers-apache-livy==3.0.0

Apache Airflow version

2.3.3 (latest released)

Operating System

Ubuntu 18.04

Deployment

Other 3rd-party Helm chart

Deployment details

No response

What happened

This is a feature request as apposed to an issue.

I want to use the LivyHook to communicate with a Kerberized cluster.
As such, I am using requests_kerberos.HTTPKerberosAuth as the authentication type.
Currently, I am implementing this as follows:

from airflow.providers.apache.livy.hooks.livy import LivyHook as NativeHook
from requests_kerberos import HTTPKerberosAuth as NativeAuth

class HTTPKerberosAuth(NativeAuth):
    def __init__(self, *ignore_args, **kwargs):
        super().__init__(**kwargs)

class LivyHook(NativeHook):
    def __init__(self, auth_type=HTTPKerberosAuth, **kwargs):
        super().__init__(**kwargs)
        self.auth_type = auth_type

What you think should happen instead

No response

How to reproduce

No response

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions