Skip to content

Latest commit

 

History

History
91 lines (74 loc) · 3.98 KB

File metadata and controls

91 lines (74 loc) · 3.98 KB

Progress Log — Okta-PSModule Review

Session 1

What Was Done

  • Full read-through of Okta.psm1 (~5100 lines)
  • Identified 15 bugs in Round 1 review
  • Created task list (Tasks #1–#15)
  • Fixed 14 of 15 tasks (Task #13 confirmed intentional by user)
  • Conducted second review pass
  • Identified 10 additional issues (Round 2: A–J)
  • User asked for a planning-with-files writeup — creating these files now

Decisions Made

  • Task #13 ($after as [datetime]): User confirmed this is intentional. Left as-is.
  • oktaActivateFactorByUser merge strategy: uid/username optional, fid mandatory, passCode optional 5–20 chars

Files Modified

  • C:\workspace\Okta-PSModule\Okta.psm1 — 14 bug fixes applied

Files Created (this session)

  • task_plan.md
  • findings.md
  • progress.md

Round 2 Fixes Applied

All 10 Round 2 issues (A–J) resolved. See task_plan.md Phase 4 for full list.

Notable changes:

  • oktaAdminExpirePasswordbyID: parameter changed from [string]$tempPassword to [switch]$returnTempPassword
  • oktaCreateZone: now accepts $gateways and $proxies array parameters
  • oktaGetLogs: now delegates to oktaListLogs (no duplicate logic)
  • oktaListLogs: gained $q, $after, and [alias("sortOrder")] on the $order param

Outstanding Work

None known. Review and test authoring complete.


Session 3

What Was Done

  • Added 6 Group Rules API functions to Okta.psm1: oktaGetGroupRuleById, oktaCreateGroupRule, oktaUpdateGroupRule, oktaDeleteGroupRule, oktaActivateGroupRule, oktaDeactivateGroupRule
  • Added read-only Group Rules section to tests/Integration.Tests.ps1 (list all rules, get by ID — skips gracefully if prev org has no rules)
  • Created tests/GroupRule.Tests.ps1 — full end-to-end write test suite: BeforeAll creates a disposable group + rule; AfterAll deletes both. Covers: GetById, List, Update (rename while INACTIVE), Activate, Deactivate.

Files Modified/Created

  • Okta.psm1 — 6 new functions added before Export-ModuleMember
  • tests/Integration.Tests.ps1 — Group Rules read-only section added
  • tests/GroupRule.Tests.ps1 — new write/lifecycle test suite

Session 2

What Was Done

  • Validated prev org API token active (HTTP 200, org sentinelone-preview, status ACTIVE)
  • Discovered fixture IDs via live API calls to prev org
  • Updated tests/TestConfig.psd1 with confirmed prev fixture values
  • Created tests/Unit.Tests.ps1 — Pester 5 pure unit tests (no API):
    • oktaNewPassword: length, charset, complexity, missing-x regression
    • oktaRandLower: length, lowercase-only, missing-x regression
    • oktaExternalIdtoGUID: round-trip and error case
    • oktaProcessHeaderLink: single, comma-separated, string array, and empty inputs
    • oktaBuildURIQuery: single param, multiple params, return type
  • Created tests/Integration.Tests.ps1 — Pester 5 read-only integration tests (uses prev org):
    • Users: oktaGetUserbyID (by ID, by login), oktaGetprofilebyId, oktaListUsers (limit, q search), oktaGetGroupsbyUserId, oktaGetAppsbyUserId
    • Groups: oktaGetGroupbyId, oktaGetGroupStatsbyId, oktaGetGroupMembersbyId, oktaListGroups (list, query filter)
    • Apps: oktaGetAppbyId, oktaGetAppGroups, oktaListApps (list, ACTIVE filter), oktaGetAppLinksbyUserId
    • Logs: oktaListLogs (limit, sortOrder), oktaGetLogs (datetime wrapper)
    • Devices: oktaGetDevices (no-throw)

Fixture Values (prev org)

Field Value
OrgAlias prev
KnownUserId 00u1fcu6ofGaouXrO1d7
KnownUserLogin darlene.smith@test.sentinelone.dev
KnownGroupId 00g2xhsyqcxSNqvQ91d7 (ContingentProcessing)
KnownAppId 0oa1e0scxcfZCJlXB1d7 (Okta Admin Console/saasure)
KnownAppGroupId 00ghddtvit6Dcn3YB1d7

Files Modified/Created This Session

  • tests/TestConfig.psd1 — updated with prev fixture values
  • tests/Unit.Tests.ps1 — created (pure unit tests)
  • tests/Integration.Tests.ps1 — created (read-only API integration tests)