Skip to content

Controlling API / Webservices access #44668

@BrainforgeUK

Description

@BrainforgeUK

Steps to reproduce the issue

Create a component providing webservice (in /api).
Create webservices plugin for that component.
Create a user for accessing that webservice component.
... to obtain a token this user has to have superuser access.

Expected result

(a) Webservice for that token / user returns required information.

(b) The token can only be used to access webservices from my component. Cannot be used to access other webservices.

(c) If that user logs into the site they only have access to my webservice component (or any other component I give them access to).

Actual result

(a) Works OK.

(b) The token can access all system webservices.

(c) As this is a superuser this user has full access to the site.
I only want them to be able to see their user details (including token) and the administration areas of my component.

System information (as much as possible)

I have a 3rd party application which does not provide webservices. My component provides webservice access to part of that component and has a dashboard so administrator can see a status summary (e.g. items in webservice queue).

Additional comments

(b) Can be overcome by adding an OnUserLogin function to the webservices plugin.
This allows me to check who the user is and the component they want to webservice access to.

(c) Requires two users 'myuser-api' to use token access and 'myuser' for normal administrator login.
Unnecessary complication with need to remember two accounts and two passwsord.
Just want one account 'myuser' who can see / reset their token and be an administrator of my component.

Have I overlooked something? Something for the future? Or a good reason for not being able to implement with a single non-superuser login?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions