| title | Providers |
|---|---|
| sidebar_label | Providers |
Providers in IdLE are responsible for interacting with external systems such as identity stores, directories, or resource systems. They form the boundary between the IdLE core engine and the outside world.
This document explains the conceptual role of providers, what is meant by "contracts" in IdLE, and how responsibilities are intentionally separated to keep the engine portable, testable, and host-agnostic.
A provider is an adapter to an external system.
Examples include:
- identity directories (Active Directory, Entra ID)
- account stores
- entitlement systems
- mock or file-based systems used for testing
The IdLE core engine does not know how a provider works. It only knows what it expects from it.
This allows the same workflow and plan to run:
- locally with mock providers
- in CI pipelines
- in production environments
without modification.
In IdLE, a contract is not a formal interface or class.
A contract is a shared expectation between:
- the engine
- steps
- providers
It defines:
- which capabilities are required
- which inputs are expected
- which outputs are returned
- how errors are represented
Contracts are intentionally implicit and lightweight, following PowerShell conventions rather than strict type systems.
IdLE favors implicit contracts because they:
- align with PowerShell's object-based pipeline model
- avoid rigid inheritance hierarchies
- keep providers easy to mock and test
- allow gradual evolution without breaking existing implementations
The contract is expressed through:
- documented behavior
- expected object shapes
- consistent naming and semantics
While IdLE does not enforce provider categories, common conceptual groupings exist:
-
Identity providers
- Manage identities, attributes, and lifecycle state
-
Resource or entitlement providers
- Manage group membership, permissions, or access rights
-
Mock and test providers
- Used for unit tests and demos
- Provide deterministic, side-effect-free behavior
These categories are descriptive, not prescriptive.
Providers are supplied by the host at execution time.
This enables:
- swapping implementations without changing workflows
- testing workflows with mock providers
- running the same plan in different environments
The engine treats providers as opaque objects and does not validate their implementation beyond contract usage.
Many providers require authenticated connections (tokens, API clients, remote sessions). IdLE keeps authentication out of the engine and out of individual providers by using a host-supplied broker.
The host injects an AuthSessionBroker into the providers map:
Providers.AuthSessionBroker
During execution, steps and providers may acquire sessions via the execution context:
Context.AcquireAuthSession(Name, Options)
Where:
Nameidentifies the requested session (e.g.Graph,ExchangeOnline,Ldap, ...).Optionsis an optional data-only hashtable.$nullis treated as an empty hashtable.- ScriptBlocks are rejected, including nested values.
The broker must expose a method:
AcquireAuthSession(Name, Options)
-
Engine
- Provides
Context.AcquireAuthSession()as a stable API. - Enforces the data-only boundary for
Options. - Does not implement authentication.
- Provides
-
Host
- Implements and configures the AuthSessionBroker.
- Decides how to authenticate (interactive, managed identity, certificate, secrets, ...).
- Must ensure secrets are not leaked into plans, events, or exports.
-
Providers / Steps
- Request sessions through the execution context.
- Must not perform their own authentication flows.
The execution context may enrich the broker request with common run metadata, such as:
CorrelationIdActor
Providers and steps should treat these values as optional.
IdLE step handlers can optionally accept a Context parameter.
To remain backwards compatible, the engine passes -Context $Context only if the
handler supports a Context parameter.
Guidance:
- New step handlers should accept
Contextto access providers, event sink, and auth session acquisition. - Existing handlers without
Contextcontinue to work unchanged.
Providers should have contract tests that verify behavior against a mock or test harness. Unit tests must not call live systems.
For testing guidance, see Testing (comes later).
Providers and the step registry are host-controlled extension points and should be treated as trusted code. Workflows and lifecycle requests are data-only and must not contain executable objects.
For details, see Security.
Providers must not be embedded into the core engine or steps.
Doing so would:
- break portability
- reduce testability
- tightly couple IdLE to specific environments
Introducing strict interfaces or class hierarchies for providers can quickly make implementations brittle.
Contracts should remain:
- behavior-focused
- documented
- enforced by tests and usage patterns
Steps must never rely on provider-specific behavior beyond the documented contract.
If a step requires provider-specific functionality, the contract itself should be clarified or refined.