Check and fix HAL-preprod `forbidden` error
When testing with hal-preprod, I get the following error on the interface page:
SWORD SWH response: Forbidden
Migrated from T2057 (view on Phabricator)
Designs
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Morane Otilia Gruenpeter mentioned in issue #2051 (closed)
mentioned in issue #2051 (closed)
- Morane Otilia Gruenpeter assigned to @ardumont
assigned to @ardumont
- Morane Otilia Gruenpeter added SWORD deposit label
added SWORD deposit label
- Morane Otilia Gruenpeter added priority:Normal label
added priority:Normal label
- Author Maintainer
I have tested today at 11.20 with the same error on HAL's platform. @ardumont : can you check what the logs say about that? I think it's about the client credentials, they use the HAL prod credentials and they are listed as HAL preprod client.
- Maintainer
logs confirm 403 responses (forbidden access) [1]. They are using the wrong credentials.
I did not remember exactly the detail so here is a quote [2]
HTTP 403 provides a distinct error case from HTTP 401; while HTTP 401 is returned when the client has not authenticated, and implies that a successful response may be returned following valid authentication, HTTP 403 is returned when the client is not permitted access to the resource despite providing authentication such as insufficient permissions of the authenticated account.
- [1] Logs excerpt coming from kibana:
Time message 2020-09-17T11:24:21.563 2020-09-17 09:24:21 [1015935] gunicorn.access:INFO 127.0.0.1 - hal-preprod [17/Sep/2020:09:24:21 +0000] "POST /1/hal/ HTTP/1.1" 403 285 "-" "-" 2020-09-17T11:24:21.562 [17/Sep/2020 09:24:21] WARNING [django.request:228] Forbidden: /1/hal/ 2020-09-17T11:24:21.562 2020-09-17 09:24:21 [1015935] django.request:WARNING Forbidden: /1/hal/ 2020-09-17T11:24:21.239 2020-09-17 09:24:21 [1015935] swh.core.config:INFO Loading config file /etc/softwareheritage/deposit/server.yml 2020-09-17T11:24:21.227 2020-09-17 09:24:21 [1015935] swh.core.config:INFO Loading config file /etc/softwareheritage/global.ini 2020-09-17T11:20:17.808 2020-09-17 09:20:17 [1015933] gunicorn.access:INFO 127.0.0.1 - hal-preprod [17/Sep/2020:09:20:17 +0000] "POST /1/hal/ HTTP/1.1" 403 285 "-" "-" 2020-09-17T11:20:17.806 2020-09-17 09:20:17 [1015933] django.request:WARNING Forbidden: /1/hal/ 2020-09-17T11:20:17.805 [17/Sep/2020 09:20:17] WARNING [django.request:228] Forbidden: /1/hal/ 2020-09-17T11:20:17.318 2020-09-17 09:20:17 [1015933] swh.core.config:INFO Loading config file /etc/softwareheritage/deposit/server.yml 2020-09-17T11:20:17.302 2020-09-17 09:20:17 [1015933] swh.core.config:INFO Loading config file /etc/softwareheritage/global.ini
source: http://kibana0.internal.softwareheritage.org:5601/goto/ba9cdc6e272f0183549ddede406b4ac8
- Phabricator Migration user marked this issue as related to #2611 (closed)
marked this issue as related to #2611 (closed)
- Author Maintainer
I've sent an email (@ardumont in CC) to Bruno and Yannick about this error and about #2611 (closed).
- Maintainer
The
hal-preprod
credentials are correct, we double checked with @moranegg.It hit me during the second pass... (but we can see it in the logs already
/1/hal/
)They are using the
hal-preprod
user but they try to access thehal
collection... That's forbidden.hal-preprod
user can access thehal-preprod
collection, not another client collection.The logs need to be improved so the error and the cause of the error are displayed because i'm pretty sure this behavior is coded in the deposit...
- Antoine R. Dumont added state:wip label
added state:wip label
- Maintainer
The logs need to be improved so the error and the cause of the error are displayed because i'm pretty sure this behavior is coded in the deposit...
- Morane Otilia Gruenpeter added priority:High label and removed priority:Normal label
added priority:High label and removed priority:Normal label
- Maintainer
heads up on this, we have nothing more to do on swh side.
And a priori, discussing with @moranegg yesterday about it, work has been done on the hal side.
- Antoine R. Dumont unassigned @ardumont
unassigned @ardumont
- Morane Otilia Gruenpeter removed state:wip label
removed state:wip label
- Morane Otilia Gruenpeter closed
closed