Simplify EntraConnect DirectorySync auth flow: provider-managed PSRemoting with provider-specific step inputs#286
Conversation
Agent-Logs-Url: https://github.com/blindzero/IdentityLifecycleEngine/sessions/b70820fb-7961-4838-961b-84daf403564c Co-authored-by: ntt-matthias-fleschuetz <55826276+ntt-matthias-fleschuetz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/blindzero/IdentityLifecycleEngine/sessions/b70820fb-7961-4838-961b-84daf403564c Co-authored-by: ntt-matthias-fleschuetz <55826276+ntt-matthias-fleschuetz@users.noreply.github.com>
ComputerName + credential
…put bag Agent-Logs-Url: https://github.com/blindzero/IdentityLifecycleEngine/sessions/9b8fa8e3-45d0-45c6-abc2-984967098764 Co-authored-by: ntt-matthias-fleschuetz <55826276+ntt-matthias-fleschuetz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/blindzero/IdentityLifecycleEngine/sessions/9b8fa8e3-45d0-45c6-abc2-984967098764 Co-authored-by: ntt-matthias-fleschuetz <55826276+ntt-matthias-fleschuetz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/blindzero/IdentityLifecycleEngine/sessions/73833856-5f99-4ea9-92c2-88a8d0ab57ab Co-authored-by: ntt-matthias-fleschuetz <55826276+ntt-matthias-fleschuetz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/blindzero/IdentityLifecycleEngine/sessions/b84c0287-8b71-4286-a986-5d9f19e324fe Co-authored-by: ntt-matthias-fleschuetz <55826276+ntt-matthias-fleschuetz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/blindzero/IdentityLifecycleEngine/sessions/635b8c6e-5ebf-4a09-9f40-8192625d5bae Co-authored-by: ntt-matthias-fleschuetz <55826276+ntt-matthias-fleschuetz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/blindzero/IdentityLifecycleEngine/sessions/635b8c6e-5ebf-4a09-9f40-8192625d5bae Co-authored-by: ntt-matthias-fleschuetz <55826276+ntt-matthias-fleschuetz@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
ComputerName + credentialCo-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
src/IdLE.Provider.DirectorySync.EntraConnect/Public/New-IdleEntraConnectDirectorySyncProvider.ps1:148
- When
$AuthSessionis$null, the[ValidateNotNull()]attribute on the[object]parameter will throw first — good — but if it is a value type passed via the script-method invocation,$AuthSession.GetType().FullNameafter the-isnot [pscredential]check is safe. However, if$AuthSessionwere ever a hashtable or other non-credential reference type withoutGetTypeissues it's fine; consider also formatting the error to include the parameter name (e.g. "AuthSession parameter must be a [PSCredential]...") to keep parity with the more descriptive ComputerName binding error message. Minor wording suggestion only.
if ($AuthSession -isnot [pscredential]) {
$actualType = $AuthSession.GetType().FullName
throw "AuthSession must be a [PSCredential] for PSRemoting session creation. Received: [$actualType]"
}
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (1)
src/IdLE.Steps.DirectorySync/Public/Invoke-IdleStepTriggerDirectorySync.ps1:110
- The
DirectorySyncTriggeredevent data payload forwards$policyTypeand$computerNameverbatim. The Message text is guarded via[string]$policyType, but the structuredPolicyType/ComputerNamedata fields can still receive non-string objects (or$null) fromWith.*. Downstream event consumers/log sinks previously could rely on these being strings. Consider coercing the event-data fields to[string]as well for consistency. The same applies to thePolicyTypepayload at line 196 in the non-wait branch.
$Context.EventSink.WriteEvent('DirectorySyncTriggered', $triggerMessage, $stepName, @{
PolicyType = $policyType
ComputerName = $computerName
})
…tions example Agent-Logs-Url: https://github.com/blindzero/IdentityLifecycleEngine/sessions/5633de42-e667-431e-b4db-be20d1cf8f2a Co-authored-by: ntt-matthias-fleschuetz <55826276+ntt-matthias-fleschuetz@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
… provider methods Agent-Logs-Url: https://github.com/blindzero/IdentityLifecycleEngine/sessions/82a977ca-af34-4190-81ce-0a03cc4327f8 Co-authored-by: ntt-matthias-fleschuetz <55826276+ntt-matthias-fleschuetz@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This PR simplifies the TriggerDirectorySync contract and EntraConnect integration by keeping provider-specific sync inputs (
ComputerName,PolicyType) as directWith.*keys while making step-level input requirements provider-agnostic.What changed
WithSchemahas no required keys.With.Provider,With.AuthSessionName, andWith.AuthSessionOptionsoptional (default behavior applies when omitted).ComputerNameandPolicyTypeas provider-specific inputs (validated by provider implementations, not enforced at step schema level).With.AuthSessionOptionssupport (including provider docs).ComputerName/PolicyTypearguments.Follow-up review adjustments
With.*keys (instead of manually editing generated docs), then regenerated references.With.AuthSessionOptionsusage for EntraConnect routing.AuthSessionNamePolicyType='Initial'PolicyTypevia provider-side validation.Validation