Skip to content

webapi admin authentication #9138

@jaykobi

Description

@jaykobi

Preconditions

magento 2.4-develop

The devdocs clearly state that authenticated admin users can access the rest api.

http://devdocs.magento.com/guides/v2.0/get-started/authentication/gs-authentication.html

Resources for which administrators or integrators are authorized. For example, if administrators are authorized for the Magento_Customer::group resource, they can make a GET /V1/customerGroups/:id call.

But this does not work.

Steps to reproduce

  1. Install magento 2.1.5 from composer archive
  2. Log into you new admin account
  3. Open domain.com/rest/V1/customers/1 in the same browser in a new tab.

Expected result

A response saying that this customer does not exist.

Actual result

A response saying me I have no acccess rights.

<response> <message>Consumer is not authorized to access %resources</message> <parameters> <resources>Magento_Customer::customer</resources> </parameters> </response>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: ApiUse with concrete module component label E.g. "Component: Api" + "Catalog"Component: AuthorizationIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentProgress: doneReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions