Skip to content

feat(hyperv): add auth_method, kerberos_keytab, kerberos_principal config options - #430

Merged
cnsnyder merged 1 commit into
feat-kerberos-authfrom
jlocash/kerberos-config
Jul 29, 2026
Merged

feat(hyperv): add auth_method, kerberos_keytab, kerberos_principal config options#430
cnsnyder merged 1 commit into
feat-kerberos-authfrom
jlocash/kerberos-config

Conversation

@jlocash

@jlocash jlocash commented Jul 20, 2026

Copy link
Copy Markdown

Add Kerberos authentication support to the HyperV config section.

New config keys on HypervConfigSection:

  • auth_method (basic|kerberos, default: basic)
  • kerberos_keytab (optional filesystem path to a keytab file)
  • kerberos_principal (optional Kerberos principal string)

Behavior:

  • auth_method=basic: preserves existing behavior; username and password remain required.
  • auth_method=kerberos: username and password become optional. If provided, a warning is logged that they are ignored.
  • kerberos_keytab/kerberos_principal set with auth_method=basic are removed with a warning.
  • kerberos_keytab validates the file exists and is readable.
  • Invalid auth_method values produce a clear validation error.

NOTE: These changes do not fully implement kerberos authentication in virt-who. Rather, this PR includes only changes to the config file. As such, there is not an easy way to test these changes, hence the feature branch. I will follow up with another PR with the remaining work

Assisted-by: Claude Sonnet 4.6 noreply@anthropic.com

Comment thread tests/test_config_section_hyperv.py Outdated
@jlocash
jlocash changed the base branch from main to feat-kerberos-auth July 23, 2026 13:08
@jlocash
jlocash force-pushed the jlocash/kerberos-config branch 2 times, most recently from 6a97484 to b8b6ef6 Compare July 23, 2026 13:26
@jlocash
jlocash requested a review from cnsnyder July 23, 2026 13:27
@jlocash
jlocash marked this pull request as ready for review July 23, 2026 13:28

@cnsnyder cnsnyder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me! Just a few things for discussion below! I don't think any are worth blocking this PR long on but if they are considered useful suggestions, I'd vote we take them and proceed!

Comment thread virtwho/virt/hyperv/hyperv.py Outdated
Comment thread tests/test_config_section_hyperv.py Outdated
Comment thread tests/test_config_section_hyperv.py
@jlocash
jlocash force-pushed the jlocash/kerberos-config branch 3 times, most recently from 5ae8676 to 2030773 Compare July 29, 2026 13:56
…nfig options

Add Kerberos authentication support to the HyperV config section.

New config keys on HypervConfigSection:
- auth_method (basic|kerberos, default: basic)
- kerberos_keytab (optional filesystem path to a keytab file)
- kerberos_principal (optional Kerberos principal string)

Behavior:
- auth_method=basic: preserves existing behavior; username and password
  remain required.
- auth_method=kerberos: username and password become optional. If
  provided, a warning is logged that they are ignored.
- kerberos_keytab/kerberos_principal set with auth_method=basic are
  removed with a warning.
- kerberos_keytab validates the file exists and is readable.
- Invalid auth_method values produce a clear validation error.

Signed-off-by: Joshua Locash <jlocash@redhat.com>
Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@jlocash
jlocash force-pushed the jlocash/kerberos-config branch from 2030773 to b069e11 Compare July 29, 2026 14:12

@cnsnyder cnsnyder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

@cnsnyder
cnsnyder merged commit 1362662 into feat-kerberos-auth Jul 29, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants