Skip to content

[PROPOSAL] Replace requests_kerberos package with requests_gssapi #976

@spapadop

Description

@spapadop

What are you proposing?

Kerberos authentication can be achieved by using either request_kerberos or requests_gssapi.

Currently, the former is listed as dependency, on setup.py.

As per redhat release notes python-kerberos is suggested to be replaced by python-gssapi.

What problems are you trying to solve?

User authentication with Kerberos.

What is the developer/user experience going to be?

Instead of this:

from opensearchpy import OpenSearch, RequestsHttpConnection
from requests_kerberos import HTTPKerberosAuth, OPTIONAL

client = OpenSearch(
    hosts=['https://...'],
    use_ssl=True,
    verify_certs=True,
    http_auth=HTTPKerberosAuth(mutual_authentication=OPTIONAL)
)

health = client.cluster.health()

people need to do this:

from opensearchpy import OpenSearch, RequestsHttpConnection
from requests_gssapi import HTTPSPNEGOAuth, OPTIONAL

client = OpenSearch(
    hosts=['https://...'],
    use_ssl=True,
    verify_certs=True,
    connection_class=RequestsHttpConnection,
    http_auth=HTTPSPNEGOAuth(mutual_authentication=OPTIONAL),
)

health = client.cluster.health()

If you agree, I can raise a PR to implement this change on the codebase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions