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 guacbui
guacbui exposes three functions:
const {
convertXlsxToObj,
importer,
rollback
} = require('guacbui');
- Please look at the
template.xlsx
file inside theexample
folder 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
data
object, which can be computed using a corresponding excel file, as follows:
const data = convertXlsxToObj(excelFilePathWithImportData);
baseURL
is the base URL of the Guacamole instanceauthToken
is the JSON token of a logged in user with enough administrator privileges to enable guacbui in doing what it doesimporter
can be safely run even if some of the entities, and associations fromdata
have already been imported;importer
will just update these
- This function does the opposite of what
importer
does — it deletes all entities (users, groups), and associations as specified in thedata
object
- The code inside
example
folder 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