Skip to content

feat(ipc): expose poll credential verification to embedders - #1215

Merged
singaraiona merged 2 commits into
devfrom
mica/shared-poll-auth
Nov 18, 2026
Merged

singaraiona merged 2 commits into
devfrom
mica/shared-poll-auth

Conversation

@MicaTeneral

@MicaTeneral MicaTeneral commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Expose the poll's password verifier to embedders that implement another listener protocol, so they can use the native IPC password rules instead of copying them.

  • ray_poll_auth_set configures the optional secret and restricted role.
  • ray_poll_auth_check performs the existing constant-time zero-padded comparison for user:password or a bare password.
  • Native IPC now calls the shared verifier; existing credential acceptance and rejection paths are retained.
  • The next q-listener change will consume this API; it is not included here.

Tests:

  • make test TEST_FILTER=poll_auth TEST_JOBS=1: 2/2 passed, including native IPC accept/reject and empty/bare-password boundaries.
  • make test TEST_FILTER=ipc TEST_JOBS=4: 113/114 passed. rfl/io/ipc_transport_edges also fails on unmodified 498f2aa, so this is not attributed to this change.
  • Full suite attempted: 5342/5372 passed, 23 skipped. Failures are missing host tools (python3/xxd), inherited path expectations, and the same transport-edge failure; not presented as an all-green run.
  • No real q client tested here.

@github-actions
github-actions Bot changed the base branch from master to dev November 18, 2026 19:56
@github-actions

Copy link
Copy Markdown

👋 Thanks for the contribution! I've retargeted this PR to dev.

master is release-only — it only receives the dev -> master release
PR (titled vX.Y.Z). All feature and fix work lands on dev first and
ships to master when a release is cut. See
CONTRIBUTING.md and
RELEASE.md.

No action needed from you — the base branch has been switched.

@MicaTeneral MicaTeneral changed the title feat(ipc): expose poll credential verification to embedders [dev] feat(ipc): expose poll credential verification to embedders Nov 18, 2026

@singaraiona singaraiona left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verified on 3da6e27: make test passes 5368 of 5372 (4 skipped, 0 failed), including rfl/io/ipc_transport_edges, so the failure in the PR body comes from that environment, not this change. The extraction matches the old validate_creds rule for rule: colon split, bare password, trailing-NUL trim, 255-byte clamp, and the fixed 256-byte constant-time compare. Making ray_poll_auth_check accept everything fails both ipc/poll_auth_* tests, so the shared verifier is pinned.

Two small items:

  1. A feature macro for embedders. rayforce-q builds against several core refs (its check-core-ref covers v3.0.2), and the q listener change has to fail closed on a core that lacks this API instead of failing to link or silently skipping the check. Please define one next to the declarations in include/rayforce.h, e.g. #define RAY_POLL_AUTH_API 1, so an embedder can test #ifdef RAY_POLL_AUTH_API.
  2. Header comment wording. "A NUL before len, as on a q login, is excluded" reads as if any NUL is dropped; only one trailing NUL is. Something like: "A single trailing NUL (as on a q or native login) is ignored." Also say that ray_poll_auth_set(poll, NULL, true) still sets the restricted role with no password, since the setter does that.

The red check-version job is from when this PR targeted master (that guard requires a release-version title). It doesn't apply on dev and can be ignored or re-run.

@MicaTeneral

Copy link
Copy Markdown
Collaborator Author

Addressed in a666b16:

  • Added #define RAY_POLL_AUTH_API 1 beside the API declarations.
  • Clarified that only a single trailing NUL is ignored, and that ray_poll_auth_set(poll, NULL, true) retains the restricted role.
  • Focused native IPC credential tests remain 2/2 green.

Thank you for confirming the full suite and for the q compatibility review.

@singaraiona singaraiona changed the title [dev] feat(ipc): expose poll credential verification to embedders feat(ipc): expose poll credential verification to embedders Nov 18, 2026

@singaraiona singaraiona left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verified on a666b16: make test 5368/5372, 0 failed; the auth tests pin the shared verifier; merge gate clean.

@singaraiona
singaraiona merged commit 028e7d7 into dev Nov 18, 2026
11 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.

2 participants