Skip to content

A bulk user/group importer/rollback utility library for Apache Guacamole instances

Notifications You must be signed in to change notification settings

mgrmtech/guacbui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GUACBUI?

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.

Usage

$ npm install guacbui

guacbui exposes three functions:

const {
	convertXlsxToObj,
	importer,
	rollback
} = require('guacbui');

convertXlsxToObj: (excelFilePathWithImportData) => importData

  • Please look at the template.xlsx file inside the example folder in this repo, to know how the data in the excel file should be structured.

importer: (baseURL, authToken, data) => void

  • 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 instance
  • authToken is the JSON token of a logged in user with enough administrator privileges to enable guacbui in doing what it does
  • importer can be safely run even if some of the entities, and associations from data have already been imported; importer will just update these

rollback: (baseURL, authToken, data) => void

  • This function does the opposite of what importer does — it deletes all entities (users, groups), and associations as specified in the data object

Example

  • 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

TODO

  • 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

About

A bulk user/group importer/rollback utility library for Apache Guacamole instances

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published