Skip to content

Commit 9fd1144

Browse files
jaggerclaude
andcommitted
Add AD validation, case-insensitive usernames, and update docs (v0.4.0)
- Add-ROUser validates AD account exists via Get-ADUser before insertion - All username lookups are case-insensitive (COLLATE NOCASE) - Update command docs, user management guide, getting started, and troubleshooting to reflect AD validation and case-insensitive behavior - Bump module version to 0.4.0 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent fb1a20c commit 9fd1144

6 files changed

Lines changed: 14 additions & 8 deletions

File tree

Docs/commands/Add-ROUser.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ Add-ROUser [-Username] <String> [-Password] <String> [-Domain] <String>
1111

1212
## Description
1313
Adds a new simulated Active Directory user to the RobOtters SQLite database. The
14-
password is encrypted via DPAPI before storage. Action weights are automatically
14+
AD account is validated via Get-ADUser before insertion -- the command fails if the
15+
account does not exist in Active Directory. The password is encrypted before storage
16+
(DPAPI by default, AES-256 if RO_ENCRYPT_KEY is set). Action weights are automatically
1517
seeded from the SeedActionWeights.psd1 data file so the user is ready to participate
16-
in simulation cycles immediately.
18+
in simulation cycles immediately. Username lookups are case-insensitive.
1719

1820
## Parameters
1921

Docs/getting-started.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- PSSQLite module (Install-Module PSSQLite -Scope CurrentUser, or manual copy)
77
- Delinea Secret Server instance with REST API enabled (/api/v1/*)
88
- Secrets and folders that simulated users have access to
9+
- AD user accounts must exist before adding them to RobOtters
910

1011
## Installation
1112

Docs/troubleshooting.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
| "RO_ENCRYPT_KEY is not set" | AES passwords but env var missing | Set `RO_ENCRYPT_KEY` at Machine level and restart PowerShell |
1818
| All users show empty username/password | Stale module loaded in session | Close PowerShell and reimport in a fresh window |
1919
| "API_SecretTypeCannotBeCreatedByUser" | User lacks template permissions | Fixed in v0.3.0; CreateSecret now queries available templates dynamically |
20+
| "AD account 'X' not found" | AD account doesn't exist | Create the AD account before running `Add-ROUser` |
2021

2122
## Diagnostic Steps
2223

Docs/user-management.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# User Management
22

3-
Simulated users are AD accounts whose credentials are stored in the RobOtters SQLite database.
3+
Simulated users are AD accounts whose credentials are stored in the RobOtters SQLite database. All username lookups are case-insensitive.
44

55
## Adding Users
66
```powershell
@@ -9,7 +9,7 @@ Add-ROUser -Username 'svc.sim01' -Password 'P@ssw0rd!' -Domain 'LAB'
99
# With custom active hours
1010
Add-ROUser -Username 'svc.sim02' -Password 'S3cret!' -Domain 'LAB' -ActiveHourStart '09:00' -ActiveHourEnd '21:00'
1111
```
12-
Passwords are encrypted before storage (DPAPI by default, or AES-256 if `RO_ENCRYPT_KEY` is set). Default action weights are seeded automatically.
12+
The AD account is validated via `Get-ADUser` before insertion -- the command fails if the account does not exist in Active Directory. Passwords are encrypted before storage (DPAPI by default, or AES-256 if `RO_ENCRYPT_KEY` is set). Default action weights are seeded automatically.
1313

1414
## Listing Users
1515
```powershell

Public/Add-ROUser.ps1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ function Add-ROUser {
33
.SYNOPSIS
44
Register a simulated AD user in the RobOtters database
55
.DESCRIPTION
6-
Adds a new simulated user. The password is encrypted via DPAPI before
7-
storage. Action weights are automatically seeded from
8-
Data/SeedActionWeights.psd1. Returns the new user object.
6+
Adds a new simulated user. Validates the AD account exists via
7+
Get-ADUser before insertion. The password is encrypted before storage
8+
(DPAPI by default, AES-256 if RO_ENCRYPT_KEY is set). Action weights
9+
are automatically seeded from Data/SeedActionWeights.psd1. Username
10+
lookups are case-insensitive. Returns the new user object.
911
.PARAMETER Username
1012
AD username for the simulated user.
1113
.PARAMETER Password

RobOtters.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@{
22
RootModule = 'RobOtters.psm1'
3-
ModuleVersion = '0.3.0'
3+
ModuleVersion = '0.4.0'
44
GUID = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'
55
Author = 'jagger'
66
Description = 'Secret Server user activity simulator for lab environments'

0 commit comments

Comments
 (0)