Bug 56009 - univention-run-diagnostic-checks cannot run with machine account
univention-run-diagnostic-checks cannot run with machine account
Status: NEW
Product: UCS
Classification: Unclassified
Component: UMC - System diagnostic
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
UMC maintainers
https://git.knut.univention.de/univen...
:
Depends on: 54515
Blocks:
  Show dependency treegraph
 
Reported: 2023-04-21 14:02 CEST by Christina Scheinig
Modified: 2023-06-21 14:44 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.051
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2023042021000631
Bug group (optional): bitesize, Usability
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christina Scheinig univentionstaff 2023-04-21 14:02:24 CEST
The univention-run-diagnostic-checks is still not executable on a memberserver without submitting credentials:

root@member:~ # univention-run-diagnostic-checks
Traceback (most recent call last):
  File "/usr/bin/univention-run-diagnostic-checks", line 168, in <module>
    sys.exit(CLIClient.main())
  File "/usr/bin/univention-run-diagnostic-checks", line 78, in main
    plugins = {plugin['id'] for plugin in client.umc_command('diagnostic/query').result}
  File "/usr/lib/python3/dist-packages/univention/lib/umc.py", line 452, in umc_command
    return self.request('POST', 'command/%s' % (path,), data, headers)
  File "/usr/lib/python3/dist-packages/univention/lib/umc.py", line 532, in request
    return self.send(request)
  File "/usr/lib/python3/dist-packages/univention/lib/umc.py", line 561, in send
    raise HTTPError(request, response, self.hostname)
univention.lib.umc.Forbidden: 403 on member.schein.ig (command/diagnostic/query): {'status': 403, 'message': 'Verboten', 'traceback': None, 'location': 'https://member.schein.ig/univention/command'}



+++ This bug was initially created as a clone of Bug #54515 +++

For support cases (and cron jobs) it would be nice if univention-run-diagnostic-checks could be run with just the machine account:

root@master60:~# /usr/bin/univention-run-diagnostic-checks \
                    --username "$(hostname)$" \
                    --bindpwdfile /etc/machine.secret
                    -t 44_well_known_sid_check.py
Traceback (most recent call last):
  File "/usr/bin/univention-run-diagnostic-checks", line 144, in <module>
    sys.exit(CLIClient.main())
  File "/usr/bin/univention-run-diagnostic-checks", line 80, in main
    plugins = [plugin['id'] for plugin in client.umc_command('diagnostic/query').result]
  File "/usr/lib/python2.7/dist-packages/univention/lib/umc.py", line 444, in umc_command
    return self.request('POST', 'command/%s' % (path,), data, headers)
  File "/usr/lib/python2.7/dist-packages/univention/lib/umc.py", line 524, in request
    return self.send(request)
  File "/usr/lib/python2.7/dist-packages/univention/lib/umc.py", line 553, in send
    raise HTTPError(request, response, self.hostname)
univention.lib.umc.Forbidden: 403 on master60.ucs447pt1.dev (command/diagnostic/query): {u'status': 403, u'message': u'Verboten', u'traceback': None, u'location': u'https://master60.ucs447pt1.dev/univention/command'}
Comment 1 Lukas Rettler univentionstaff 2023-06-21 14:44:23 CEST
+1 customer affected

Running on a member server without --username leads to the traceback in Comment 0