Skip to content

Roles & administration

mganuci edited this page Oct 9, 2017 · 6 revisions

To guarantee Grapes database and configuration integrity different roles have been implemented:

  • administrator
  • contributor
  • viewer

N.B: Authentication is handled via basic HTTP authentication protocol.

Administrator

The administrator is the only one role able to modify at runtime the configuration of Grapes. An administrator is able to:

  • create, update users
  • attribute roles to users
  • set Grapes in maintenance mode
  • perform a garbage collection
  • run database migration scripts
  • refresh commercial deliveries
  • test email notifications
  • dispaly and update the current promotion validations

An administrator is created while running Grapes. The name and the password are defined in the server configuration file.

http:
  adminUsername: test
  adminPassword: test

For more information about the server configuration see the page Installation from sources.

####Create & update users

Method URL Query Parameters
POST http://dm-url:admin-port/tasks/addUser
  • user: name of the created or updated user

  • password: password of the created or updated user

####Attribute a role to a user

Method URL Query Parameters
POST http://dm-url:admin-port/tasks/addRole
  • user: name an existing user

  • role: role to give to the user

####Remove a role to a user

Method URL Query Parameters
POST http://dm-url:admin-port/tasks/removeRole
  • user: name an existing user

  • role: role to remove to the user

####Set or disable Grapes in maintenance mode

Method URL
POST http://dm-url:admin-port/tasks/maintenance

####Run database migration scripts

From a version of Grapes to another, the data model could change. Migration task is here to make sure that the version of the data model of your database works with the current version of your application

Method URL
POST http://dm-url:admin-port/tasks/migration

####Perform a java garbage collection

Method URL
POST http://dm-url:admin-port/tasks/gc

####Refresh commercial deliveries

Method URL Params Type Name Optional Description
POST http://dm-url:admin-port/tasks/refreshDeliveries x-www-form-urlencoded product Yes Name of the product to refresh the commercial deliveries dependencies for
Does a refresh for commercial deliveries of a product or for all registered products. The refresh brings all the delivery dependencies under a single unified property called allArtifactDependencies. In case the product param is not present, the refresh will be performed against all the products registered in the database.

####Test email notifications

Method URL Param Type Name Optional Description
POST http://dm-url:admin-port/tasks/testEmail x-www-form-urlencoded to no Destination address
subject no Message subject
message no Message content
contentType no Message content type
mail.smtp.auth yes Overrides performing authentication
mail.smtp.password yes Overrides value of password
Sends out a notification email for validating all configuration related to email notification system are correct.

####Display the release validations

Method URL
POST http://dm-url:admin-port/tasks/showValidations
Displays the current validation related settings. It will show up which of the validations are considered warnings and which are errors. Application admins can configure the errors by using configuration file (promotionValidation) field or using a runtime update mechanism via validations task. The response will finish with a list of available validations.

####Change the release validations

Method URL Param Type Name Optional Description
POST http://dm-url:admin-port/tasks/validations x-www-form-urlencoded error no Validation name
Updates the release validations by modifying their category to either warning or error. The error parameter can show up multiple times, in order to express which of the validation are erorrs. The expected strings must be entries returned by the invocations of showValidations task. If you need to set all the validations as warnings use the special value NONE (case sensitive). Include one error value set to NONE will make all the validation become warnings.

Contributor

Contributor users have to be created by an administrator. The aim of this profile is to enhance the information. Contributors provide information via the REST API or the Data-Browser.

A contributor can have different roles:

  • dependency_notifier: create and update modules and artifacts
  • data_updater: update information fields of artifacts, create and update license information
  • data_deleter: able delete database objects
  • license_checker: approve or reject licenses
  • artifact_checker: able to update "DO_NOT_USE" artifact field
  • license_setter: able to update artifact associations to licenses

These roles are attributed by the administrator.

Viewer

The viewers are anonymous users that can get information from Grapes via the REST API, the Data-Browser or via Sequoia.

Clone this wiki locally