architecture

Explain safeguard-ps module internals for authentication and REST request dispatch.

24|35|Updated Sep 14, 2017
One-click install
npx skills add https://github.com/OneIdentity/safeguard-ps --skill architecture-oneidentity
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architecture
Source: https://github.com/OneIdentity/safeguard-ps/tree/main/.agents/skills/architecture
Command: npx skills add https://github.com/OneIdentity/safeguard-ps --skill architecture-oneidentity

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you reason about how the safeguard-ps PowerShell module is wired internally so you can make correct, low-risk changes to module composition, session/auth flows, and event/stream behavior without breaking the public cmdlet surface.

Core Features & Use Cases

  • Module internals mapping: Explain how the module manifest (src/safeguard-ps.psd1) composes nested modules and exports public cmdlets, so you know where a change must be made to be visible.
  • Root-module execution flow tracing: Track how Connect-Safeguard and Invoke-SafeguardMethod build URLs, manage global session state, and dispatch REST requests (including retries and long-running task polling).
  • SignalR/SSE and dynamic group comprehension: Understand negotiate → handshake → event dispatch for streaming listeners, and review dynamic group rule parsing/serialization gotchas and constraints.

Quick Start

Use the architecture skill to trace how your intended change flows through safeguard-ps internals, then validate the right module/utility boundary before editing.

Frequently Asked Questions about architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does the safeguard-ps PowerShell module handle authentication and REST request dispatch internally?

The safeguard-ps module uses Connect-Safeguard and Invoke-SafeguardMethod to build URLs, manage global session state, and dispatch REST requests with retries and long-running task polling. The root module coordinates these flows while nested modules implement specific features.

How do I trace SignalR and SSE event streaming connections in safeguard-ps?

SignalR and SSE streaming in safeguard-ps follows a negotiate, handshake, and event dispatch sequence. You can trace this execution flow through the module's listener utilities to understand how streaming events are received and processed during active sessions.

What's the best way to modify safeguard-ps module wiring without breaking public cmdlets?

To modify safeguard-ps module wiring safely, review how the module manifest composes nested modules and exports public cmdlets. Validate the correct module or utility boundary before editing to ensure changes remain visible without breaking the public cmdlet surface.

Why are my dynamic group rules not parsing correctly in safeguard-ps?

Dynamic group rule parsing in safeguard-ps has specific serialization gotchas and constraints. Review the dynamic group rule handling logic to ensure your rule definitions match the expected serialization format and parsing constraints within the module internals.

Can I use custom platform script parameters with safeguard-ps on PowerShell 5.1?

safeguard-ps supports custom platform script parameters with PowerShell 5.1-compatible architectural reasoning. The module internals handle these parameters through specific dispatch guardrails that maintain compatibility with the PowerShell 5.1 runtime environment.

What are the limitations when changing global session state coupling in safeguard-ps?

Changing global session state coupling in safeguard-ps requires adherence to low-level REST dispatch guardrails. You must maintain PS 5.1 compatibility and ensure correct YAML frontmatter discovery metadata, as improper modifications to global state can break authentication flows and request dispatch.