Bug 51881 - schoolimport/jobs/query: PermissionError: Received status_code=403 with reason='Forbidden'
schoolimport/jobs/query: PermissionError: Received status_code=403 with reaso...
Status: NEW
Product: UCS@school
Classification: Unclassified
Component: HTTP-API (Kelvin)
UCS@school 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS@school maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-08-21 12:59 CEST by Christian Castens
Modified: 2023-07-07 16:45 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2020082821000017, 2021030121000191, 2020081821000643, 2021111221000235, 2021111521000104, 2021090321000284, 2023050521000355, 2022122021000485
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Castens univentionstaff 2020-08-21 12:59:25 CEST
Version: 4.4-5 errata710 (Blumenthal) - UCS@school 4.4 v6

Remark: Diese oder ähnliche Fehlermeldungen kommen momentan häufiger, trotzdem scheint der Import durchgelaufen zu sein.

Error:
Internal server error during "schoolimport/jobs/query".
Request: schoolimport/jobs/query

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 359, in __error_handling
    six.reraise(etype, exc, etraceback)
  File "%PY2.7%/univention/management/console/base.py", line 262, in execute
    function.__func__(self, request, *args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 641, in _decorated
    return function(self, request, *args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 321, in _response
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 181, in _response
    return function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 443, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 289, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/schoolimport/__init__.py", line 224, in jobs
    } for job in self._jobs()]
  File "%PY2.7%/ucsschool/http_api/client.py", line 183, in next
    self._paginated_resource_list = self._resource_client._resource_from_url(url, **params)
  File "%PY2.7%/ucsschool/http_api/client.py", line 541, in _resource_from_url
    return self.client.call_api("get", url, params=params)
  File "%PY2.7%/ucsschool/http_api/client.py", line 522, in call_api
    raise exc(msg, status_code=response.status_code)
PermissionError: Received status_code=403 with reason='Forbidden' for requests.get(**files=None, url=u'https://**********/api/v1/imports/users/',
auth=(u'Administrator', u'**********'), headers={u'Accept': u'application/json'}, params={u'ordering': [u'date_created'], u'limit': [u'20'], u'dryrun': [u'False'], u'offset':
[u'280']}, data=None).

Role: domaincontroller_master
Comment 1 Maximilian Janßen univentionstaff 2021-11-24 14:16:40 CET
Reported again:

Version: 4.4-8 errata1036 (Blumenthal) - UCS@school 4.4 v9

Error: 
Interner Server-Fehler in "schoolimport/jobs/query".
Request: schoolimport/jobs/query

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 359, in __error_handling
    six.reraise(etype, exc, etraceback)
  File "%PY2.7%/univention/management/console/base.py", line 262, in execute
    function.__func__(self, request, *args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 641, in _decorated
    return function(self, request, *args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 321, in _response
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 181, in _response
    return function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 443, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 289, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/schoolimport/__init__.py", line 265, in jobs
    for job in self._jobs()
  File "%PY2.7%/ucsschool/http_api/client.py", line 326, in school
    self._resource_client, self._resource_client._resource_from_url(self._resource["school"])
  File "%PY2.7%/ucsschool/http_api/client.py", line 543, in _resource_from_url
    return self.client.call_api("get", url, params=params)
  File "%PY2.7%/ucsschool/http_api/client.py", line 524, in call_api
    raise exc(msg, status_code=response.status_code)
PermissionError: Received status_code=403 with reason='Forbidden' for requests.get(**files=None, url=u'https://****/api/v1/schools/tes/',
auth=(u'Administrator', u'****************'), headers={u'Accept': u'application/json'}, params={}, data=None).

Role: domaincontroller_master
Comment 2 Maximilian Janßen univentionstaff 2021-11-26 15:41:16 CET
Version: 4.4-7 errata901 (Blumenthal) - UCS@school 4.4 v8

Error: 
Interner Server-Fehler in "schoolimport/ping".
Request: schoolimport/ping

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 359, in __error_handling
    six.reraise(etype, exc, etraceback)
  File "%PY2.7%/univention/management/console/protocol/modserver.py", line 202, in _recv
    self.handle(msg)
  File "%PY2.7%/univention/management/console/protocol/modserver.py", line 272, in handle
    six.reraise(self.__init_etype, self.__init_exc, self.__init_etraceback)
  File "%PY2.7%/univention/management/console/protocol/modserver.py", line 313, in handle
    self.__handler.init()
  File "%PY2.7%/univention/management/console/modules/schoolimport/__init__.py", line 69, in init
    ssl_verify=ssl_verify,
  File "%PY2.7%/ucsschool/http_api/client.py", line 413, in __init__
    setattr(self, cls_name, kls(self))
  File "%PY2.7%/ucsschool/http_api/client.py", line 533, in __init__
    self.resource_url = self.client.resource_urls[self.resource_name]
  File "%PY2.7%/ucsschool/http_api/client.py", line 429, in resource_urls
    self._resource_urls = self.call_api("get", ".")
  File "%PY2.7%/ucsschool/http_api/client.py", line 524, in call_api
    raise exc(msg, status_code=response.status_code)
PermissionError: Received status_code=403 with reason='Forbidden' for requests.get(**files=None, url=u'https://****/api/v1/', auth=(u'Administrator',
u'****************'), headers={u'Accept': u'application/json'}, params=None, data=None).

Role: domaincontroller_master
Comment 3 Maximilian Janßen univentionstaff 2023-06-20 15:40:15 CEST
Version: 4.4-9 errata1401 (Blumenthal) - UCS@school 4.4 v9
Comment 4 Maximilian Janßen univentionstaff 2023-07-07 16:45:55 CEST
Version: 5.0-2 errata505 - UCS@school 5.0 v3