Skip to content

feat(pam): enable Windows RDP access#6132

Merged
bernie-g merged 12 commits into
mainfrom
feat/pam-rdp-mvp
May 5, 2026
Merged

feat(pam): enable Windows RDP access#6132
bernie-g merged 12 commits into
mainfrom
feat/pam-rdp-mvp

Conversation

@bernie-g
Copy link
Copy Markdown
Contributor

Context

Unblocks the Windows PAM resource type so users can start RDP sessions against it from the CLI. Removes the temporary "Windows resources cannot be accessed" throw on the access endpoint, adds the Windows variant to the access / session-credentials response schemas, and remaps the schema's `hostname` to `host` on the session-credentials wire so the gateway's handler dispatch can share one code path with every other resource type.

Frontend: un-disables the Access button on Windows accounts and adds the Windows case to the CLI-command generator in the access modal (`infisical pam rdp access ...`). No browser RDP viewer — native client only for MVP.

Pairs with the RDP implementation PR on the cli repo: Infisical/cli#191

Screenshots

(N/A — only surface change is the Access button becoming clickable for Windows accounts and the access modal now generating the `infisical pam rdp access` command for them.)

Steps to verify the change

  1. Create a Windows Server PAM resource + account.
  2. Click the Access button → modal now shows the RDP CLI command (no longer disabled).
  3. Run the generated command with a cli built from feat(pam): native RDP client support cli#191 → system RDP client opens to the target desktop.

Type

  • Fix
  • Feature
  • Improvement
  • Breaking
  • Docs
  • Chore

Checklist

Phase 5 of the native RDP client architecture. Unblocks the Windows
resource type that was previously disabled pending RDP client work
(now landed in the CLI repo as Phases 1-4).

Backend:
- Remove the temporary BadRequestError throw that blocked Windows
  resources from creating access sessions.
- Add WindowsSessionCredentialsSchema to the session-credentials
  route's response union.
- Add PamResource.Windows to the access route's discriminated union
  so GatewayAccessResponseSchema is returned for Windows sessions.
- In getSessionCredentials, remap the Windows connection-details
  hostname field to host before responding. Every other resource
  type already returns host; this lets the gateway's handler
  dispatch share one code path instead of special-casing Windows.
- Redefine WindowsSessionCredentialsSchema with host to match the
  wire format (it was previously an unused alias of the
  resource-facing schema with hostname).

Frontend:
- Remove the Windows/RDP guard on the Access button in
  PamResourceAccountsSection and PamAccountByIDPage; domain (AD)
  accounts remain disabled pending a future AD phase.
- Add PamResourceType.Windows case in the access modal's CLI-command
  switch, producing the infisical pam rdp access command. The
  browser-access option remains hidden for Windows since there is
  no browser RDP viewer in the MVP.
- Add TWindowsSessionCredentials type mirroring the backend schema.

Out of scope for this phase (explicitly not ported from the POC):
browser RDP viewer (ironrdp-web, PamWindowsRdpPage), session
recording / event batches, Active Directory resource type, any
WinRM-specific rotation changes beyond what already exists on main.
@maidul98
Copy link
Copy Markdown
Collaborator

maidul98 commented Apr 22, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

# Conflicts:
#	backend/src/ee/routes/v1/pam-account-routers/pam-account-router.ts
#	frontend/src/pages/pam/PamAccountsPage/components/PamAccessAccountModal.tsx
Comment thread backend/src/ee/services/pam-account/pam-account-service.ts Outdated
@bernie-g bernie-g marked this pull request as ready for review April 24, 2026 19:38
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization's overage spend limit has been reached.

Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.

Once credits are available, reopen this pull request to trigger a review.

@bernie-g
Copy link
Copy Markdown
Contributor Author

@claude review once

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 72259a99d5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread backend/src/ee/services/pam-account/pam-account-service.ts Outdated
Comment thread backend/src/ee/services/pam-account/pam-account-service.ts
@bernie-g bernie-g requested a review from x032205 April 29, 2026 17:07
@infisical-review-police
Copy link
Copy Markdown

💬 Discussion in Slack: #pr-review-infisical-6132-feat-pam-enable-windows-rdp-access

Posted by Review Police — reviews, comments, new commits, and CI failures will stream into this channel.

Adds accountName to the Windows session credentials response so the
gateway's RDP MITM bridge can configure its CredSSP acceptor to expect
the PAM account name as the username, separate from the actual Windows
username injected to the target.
Comment thread backend/src/ee/services/pam-account/pam-account-service.ts Outdated
Comment thread backend/src/ee/services/pam-account/pam-account-service.ts Outdated
Comment thread frontend/src/hooks/api/pam/types/windows-server-resource.ts Outdated
bernie-g added 4 commits May 4, 2026 14:15
…chema

Adds a Windows case to the access endpoint's metadata switch so the
CLI can pre-fill the username field in the generated .rdp file
(matching the SSH/Postgres pattern). Drops the dedicated accountName
field from the session credentials response since the gateway can use
the existing username from the credentials. Reuses the connection
details schema and trims an over-long comment.
The frontend never calls the gateway-only /credentials endpoint, so
this type was dead code.
# Conflicts:
#	backend/src/ee/services/pam-account/pam-account-service.ts
main added gatewayPool to TFeatureSet; without it in
getDefaultOnPremFeatures, type:check fails after the merge.
Comment thread backend/src/ee/services/pam-account/pam-account-service.ts
bernie-g added 5 commits May 4, 2026 20:43
Adds recording: sessionRecordingSecrets to the Windows return so RDP
sessions support recording, matching the SSH and default branches.
Also drops the loose inline cast on connectionDetails — the
resourceType discriminator narrows the union without it.
Reverts the un-disable from this PR. We don't want to ship Windows
RDP access until session recording is fully implemented; restoring the
hard block keeps that off the release path. The rest of the wiring
(schemas, gateway, FFI, bridge) stays in place so the block can be
flipped back off cleanly when recording lands.
Removed when the recording-config-required check on the access
endpoint was reverted in favor of the temporary Windows disable.
Keeping these blocks in place under the temporary Windows disable so
they don't need to be re-added when the disable is lifted. The disable
uses a cast to avoid narrowing resourceType, so the recording-config
check and switch case below stay typecheck-valid.
@bernie-g bernie-g merged commit ed98d85 into main May 5, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants