Project

Profile

Help

Issue #7888

closed

Can't update Fields through Rest API We pages (PUT requests)

Added by equipe_serveurs@exane.com over 3 years ago. Updated about 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
Master
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

Using rest api on pulp (PUT Request), I current Get the following error raised

{ "detail": "CSRF Failed: CSRF token missing or incorrect." }

Investigation

  1. The root cause of this issue comes from the X-CRRFToken been checked but not sent through the Ajax Call

  2. Source of this check comes from the authentication scheme in place (SessionAuthentication) (cf settings.py) 'DEFAULT_AUTHENTICATION_CLASSES': [ 'rest_framework.authentication.SessionAuthentication', 'rest_framework.authentication.BasicAuthentication', ]

Also available in: Atom PDF