Search

Home

Home

Service Permissions

Service Permissions

The system allows two types of user authentication when calling a REST API service:

  • Basic auth
  • In this case, the Webservice user and Webservice password fields in the Configuration tab must be filled in, and every request sent to the server must include an Authorization header of type Basic.

    ❗
    Remember that in this mode, any user with valid credentials has access to all services exposed by the system as WebService triggers.
  • Bearer token
  • In this case, authentication is performed using a token, so each request sent to the server must include an Authorizationheader of type Bearer.

    When using this authentication method, you can create any number of users. Each user has their own token, which can be linked to predefined roles in the system, and those roles can be linked to triggers. This setup allows granting access to specific services only to users who possess the assigned token.

When you use Bearer Token authentication in the service server configuration options, the Web Services permissions tab becomes active, allowing you to flexibly manage access to defined web services (WebService triggers).

image

Permissions management is carried out by:

  • Defining users
  • Each user created in GRAVITY has a private token generated for them. This token should be shared confidentially with the organization or user you are granting access to a selected part of the web services defined in the GRAVITY system.

    Tokens do not have an expiration date, so a partner who possesses one can use it indefinitely.

    If necessary, you can generate a new token for a user, which will invalidate the token previously shared with a business partner.

  • Defining system roles
  • You can define any number of system roles.

    Each role can be assigned any number of WebService-type triggers, and each trigger can be linked to multiple roles.

    Assigning a trigger to a role means that any user with that role will have access to the web service represented by that trigger—that is, they will be able to call the corresponding service.

  • Assigning roles to users
  • Creating a user and defining a role does not automatically grant the organization using the user's token access to defined services. The key step is assigning the role to the user.

    Each user can be assigned any number of roles, which grants them access to all web services linked to those roles.

Defining usersDefining rolesAssigning roles to users