Skip to content

Commit

Permalink
Set mutual_auth as optional [RHELDST-24814]
Browse files Browse the repository at this point in the history
The mutual_auth for kerberos was set as REQUIRED, but this
was too demanding on auth. servers. Let's ease that a bit and set
that as OPTIONAL.
  • Loading branch information
rbikar committed Jul 15, 2024
1 parent 3f66afc commit 870f0a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/test_ubi_manifest_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def test_kerberos_auth(kerb_mock, requests_mock):
with Client("https://foo-bar.com") as client:
_ = client._do_request(method="GET", url=url)
kerb_mock.assert_called_once_with(
mutual_authentication=1,
mutual_authentication=2,
force_preemptive=True,
principal="[email protected]",
)
Expand Down
4 changes: 2 additions & 2 deletions ubipop/ubi_manifest_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import threading
from concurrent.futures import as_completed
from requests_kerberos import HTTPKerberosAuth, REQUIRED
from requests_kerberos import HTTPKerberosAuth, OPTIONAL

import requests
from more_executors import Executors, f_map, f_proxy
Expand Down Expand Up @@ -69,7 +69,7 @@ def _session(self):
"Please set 'UBIPOP_KERBEROS_PRINCIPAL_UBI_MANIFEST' environment variable"
)
self._tls.session.auth = HTTPKerberosAuth(
mutual_authentication=REQUIRED,
mutual_authentication=OPTIONAL,
force_preemptive=True,
principal=self.krb_principal,
)
Expand Down

0 comments on commit 870f0a9

Please sign in to comment.