Using ChatGPT to Generate Identity Test Data

Using ChatGPT to Generate Identity Test Data

A practical example of how to use ChatGPT as an Identity Security professional. It is crucial to have accurate and comprehensive test data to ensure that your systems function properly and securely. Test data is required to set up accurate dev and test environments populated with realistic numbers of users, attributes, and even group memberships. This test data allows you to test and validate your IGA policies, procedures, and controls. By leveraging the natural language processing capabilities of ChatGPT, you can quickly and easily generate large sets of test data that are realistic and representative of your actual user population. So if you're looking to improve the security and performance of your IGA systems, consider incorporating ChatGPT into your testing and validation process. Common examples of these systems include the following given the example of generating 10 new user records:

Active Directory:

A simple script using the Active Directory module for PowerShell could be used to create 10 new user accounts in AD. The script could take a list of 10 names and other information (e.g. username, password, email address) as inputs, and use that information to create the new user accounts.

Azure:

A similar script using Azure PowerShell or Azure CLI could be used to create 10 new users in an Azure Active Directory. The script could take a list of 10 names and other information (e.g. username, password, email address) as inputs, and use that information to create the new user accounts and assign them to the appropriate roles and groups in Azure.

SQL Databases:

A script using SQL statements can be written to create 10 new users in a SQL database with their respective information and privileges. For example, you can use SQL INSERT statements to add a new row to the Users table for each user, with columns for their name, username, password, and any other relevant information.

HR Systems like Workday:

Using Workday's API or SDK, we can create a script that can create 10 new users in the Workday HR system with their respective information like name, job title, employee ID, email, etc.

It's worth noting that these are just a few examples of how this could be done, and the specific implementation will depend on the systems you are working with and their capabilities.

Generating Test Data

Now let's look at a real interaction with ChatGPT to generate actual test data.

My first prompt was simply the following:

No alt text provided for this image

ChatGPT knew the Active Directory user object schema and was able to generate a file with interesting test data.

No alt text provided for this image

I was going to use the data for my joiner process and to automate role assignment, so I needed a little more data to allow my IGA product to sort and assign roles to these users, so I asked for a few more attributes. My prompt for this was simple enough.

No alt text provided for this image
No alt text provided for this image

I only asked for ten users in this example, but I've tested its ability to generate much larger data sets, and it performed well.

Importing the Data

Now that we have the data, the final step would be to import it into the system or systems we want to load up.

Let's ask it to give us a PowerShell script to create Active Directory users. My prompt was as follows:

No alt text provided for this image

The script it generated looked legitimate, although I would use a more complex default password.

No alt text provided for this image

If an admin preferred using the CSVDE command line tool instead of PowerShell, that can easily be done by ChatGPT, but it warns me that this tool is no longer supported.

No alt text provided for this image

That all seemed simple enough, and the scripts could be used as is or tweaked if desired. We'll give it one last test before wrapping this up. Let's have it try the same thing for Azure Active Directory, and I won't specify the tool or API for it to use so we can see what it tries.

My prompt was as follows:

No alt text provided for this image

Remember, the more descriptive, the better. chatGPT does best if it doesn't have to fill in the blanks and guess at information.

This generated what appears to be a valid PowerShell script to import these users in my Azure Active Directory.

No alt text provided for this image

As a professional in the Identity Security field, ChatGPT can be a valuable addition to your toolkit, as demonstrated by this simple example.

Stefan van Ingen

Product Manager Identity & Access Management @ Gemeente Rotterdam | Employee Identity | Non Employee Identity | Customer Identity | Machine Identity | Digital Identity Wallets

2y
Lance Peterman, CIDPRO

Digital Identity & InfoSec Professional - Adjunct Professor - IDPro Board Emeritus - Elections Official

2y

This is a terrific use of this platform, especially for educators.

Like
Reply
Salih Aksan

Cyber Security Consulting Manager at ISG | MBA | Msc

2y

Clear use cases!

Like
Reply
André Koot

IAM Strategist - all about access - at SonicBee

2y

Marvellous!

To view or add a comment, sign in

More articles by Patrick Parker

Insights from the community

Others also viewed

Explore topics