## Amazon Quicksight Permission File And Random ldap Data Generator This repository contains code to generate random LDAP data, create Amazon Quicksight permissions file for the data, and create sample ticketing dataset. This repository is part of AWS blog to showcase how organizational LDAP hierarchy structure can be implemented in Quicksight to restrict end user's data access on the dashboard visualizations. ## Usage Run main.py file using command `python main.py` to generate all the necessary files. Input data can be found in /src/input/ directory and the output data will be written in /data/ directory. ## Contents There are three main generators that generate the required sample data. Those three generator can be executed through the main file. Details of the generators are given below. #### 1. LdapDataGenerator Input - number_of_employees The LdapDataGenerator reads sample names and departments from the files stored at /src/input/ location. It generates random names, date of births and departments for the employees. The output file created will have employee data and each employee will have a sequential Employee_id, a Manager_id, a name, a dob (date of birth), and a dept (department). The code uses treelib and pandas package to create hierarchical sample LDAP data. Output - leaves.txt - stores all the 'leaf' employees (employees that do not have any reportees) tree.txt - Prints out the hierarchical data as generated by the generator sample_ldap_data.csv - sample hierarchical ldap data #### 2. PermissionsFileGenerator Input - list_of_emp_ids, number_of_levels This generator generates a permission file based on the input employee IDs and the number of levels. Output - sample_permissions_file.csv - stores the permission file to be used in Amazon Quicksight to apply Row-Level Security #### 3. TicketingDataGenerator Input - num_of_tickets Based on the input number of tickets, this generator generates random tickets and assigns it to the 'leaf' employees. This generator also assigns random creation dates, status, category, TicketType, Severity, Priority and FiledAgainst to each tickets. Output - ticketing.csv - stores the sample output ticketing data ### Input In main.py users can update number_of_employees, number_of_levels, num_of_tickets acording to their needs. These input parameters along with the input data files generate the output files. ### Ouptut All files under /data/ directory are output files. ## Security See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information. ## License This library is licensed under the MIT-0 License. See the LICENSE file.