guacbui aids in importing users, and groups (and their associations) at bulk, on guacamole instances. It also assigns permissions as specified, to users, and groups.
$ npm install guacbuiguacbui exposes three functions:
const {
convertXlsxToObj,
importer,
rollback
} = require('guacbui');- Please look at the
template.xlsxfile inside theexamplefolder in this repo, to know how the data in the excel file should be structured.
- This function imports all entities (users, groups), associations (users of a group); and approriately assign perms as specified in the
dataobject, which can be computed using a corresponding excel file, as follows:
const data = convertXlsxToObj(excelFilePathWithImportData);baseURLis the base URL of the Guacamole instanceauthTokenis the JSON token of a logged in user with enough administrator privileges to enable guacbui in doing what it doesimportercan be safely run even if some of the entities, and associations fromdatahave already been imported;importerwill just update these
- This function does the opposite of what
importerdoes — it deletes all entities (users, groups), and associations as specified in thedataobject
- The code inside
examplefolder can be perused, to gain a better understanding on consuming guacbui's api. - Ensure appropriate values are populated inside
example/config.js, before running the following:
$ cd example
$ node index.js
- Fix the bug at race condition step in login.js due to incorrect username/password
- Fix DATA CONVERSION ERROR bug due to wrong (incorrect template) excel file imports