#7793 ipa service-del service fails with internal error
Opened 5 years ago by cheimes. Modified 5 years ago

Issue

ipa service-del service without a hostname fails with an internal error. Internally IPA expects a name of format service/hostname.

Steps to Reproduce

  1. ipa service-del service

Actual behavior

# ipa service-del service
ipa: ERROR: an internal error has occurred

Expected behavior

ipa: ERROR: invalid 'canonical_principal': Service principal is required

Version/Release/Distribution

FreeIPA 4.7.2 and earlier

Additional info:

The code fails in ipaserver.plugins.service.check_required because the line host_is_master(ldap, principal.hostname) raises a ValueError.

...
  File "/usr/lib/python3.7/site-packages/ipapython/kerberos.py", line 174, in hostname
    "hostname is defined for host and service principals")
ValueError: hostname is defined for host and service principal

Feature request https://pagure.io//freeipa/issue/7695 can be fixed the together with this fix.

Metadata Update from @cheimes:
- Issue assigned to cheimes
- Issue set to the milestone: FreeIPA 4.6.5

5 years ago

service-mod fails with an unexpected error message. IMO it should also fail with invalid 'canonical_principal': Service principal is required

$ ipa service-mod service
ipa: ERROR: service@IPA.EXAMPLE: service not found

Metadata Update from @cheimes:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1648265

5 years ago

Metadata Update from @cheimes:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/2640

5 years ago

master:

  • c09927d Handle service_del with bad service name

ipa-4-7:

  • fc6b949 Handle service_del with bad service name

Login to comment on this ticket.

Metadata