Problem/Motivation

The json api schema differs in many ways from rest's. JsonAPI schema does not define security or schemes for paths. These lists are not just left blank, but are left off completely. JsonAPI also does not define and root level securityDefinitions in schema either even when core's rest has basic_auth and csrf_token.

Proposed resolution

This should be standardized between rest and jsonapi. we may need to look at how jsonapi handles auth and lists controls valid auth options.

Comments

richgerdes created an issue. See original summary.

wim leers’s picture

Following! :)

richgerdes’s picture

StatusFileSize
new12.83 KB

Posting an initial patch for this, so tests can run.

richgerdes’s picture

Title: Paths in JsonAPI schema don't have security or scheme data. » Schema don't have security definitions.
StatusFileSize
new12.83 KB

I hate functions...

richgerdes’s picture

StatusFileSize
new12.96 KB
richgerdes’s picture

StatusFileSize
new13.13 KB

Retest

richgerdes’s picture

StatusFileSize
new13.13 KB

Fixed lint error

richgerdes’s picture

Title: Schema don't have security definitions. » Schema don't have security definitions
richgerdes’s picture

StatusFileSize
new16.14 KB

Taking another pass at the patch.

richgerdes’s picture

StatusFileSize
new1.14 KB
new15.95 KB

Fix invalid index for jsonurls

richgerdes’s picture

StatusFileSize
new3.56 KB
new16.73 KB

CSRF token needs to be handled differently then other auth collectors since its not one....

richgerdes’s picture

Status: Active » Needs review
StatusFileSize
new839 bytes
new0 bytes

Match keys

Status: Needs review » Needs work

The last submitted patch, 12: 2940412-12-security-definitions.patch, failed testing. View results

richgerdes’s picture

Status: Needs work » Needs review
StatusFileSize
new16.73 KB

Correct version of #12.

Status: Needs review » Needs work

The last submitted patch, 14: 2940412-12-security-definitions.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

richgerdes’s picture

Status: Needs work » Needs review
StatusFileSize
new17.53 KB

Status: Needs review » Needs work

The last submitted patch, 16: 2940412-16-security-definitions.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

richgerdes’s picture

Status: Needs work » Needs review
StatusFileSize
new897 bytes
new17.92 KB

Using basic_auth apparently was a bad idea.... It enables nodes for rest, which is not desired and causes tests to fail. We will use csrf for routes then....

Status: Needs review » Needs work

The last submitted patch, 18: 2940412-18-security-definitions.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

  • richgerdes authored 6d2f4c6 on 8.x-1.x
    Issue #2940412 by richgerdes: Schema don't have security definitions
    
richgerdes’s picture

Status: Needs work » Needs review

Tests failed as the result of other issues. See #2978465: Tests Fail.... Again.

richgerdes’s picture

Status: Needs review » Fixed

Patch has been committed and pushed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.