Repository navigation
feat(ipc): expose poll credential verification to embedders - #1215
Conversation
|
👋 Thanks for the contribution! I've retargeted this PR to
No action needed from you — the base branch has been switched. |
singaraiona
left a comment
There was a problem hiding this comment.
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:
- A feature macro for embedders. rayforce-q builds against several core refs (its
check-core-refcovers 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 ininclude/rayforce.h, e.g.#define RAY_POLL_AUTH_API 1, so an embedder can test#ifdef RAY_POLL_AUTH_API. - 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.
|
Addressed in a666b16:
Thank you for confirming the full suite and for the q compatibility review. |
singaraiona
left a comment
There was a problem hiding this comment.
Verified on a666b16: make test 5368/5372, 0 failed; the auth tests pin the shared verifier; merge gate clean.
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_setconfigures the optional secret and restricted role.ray_poll_auth_checkperforms the existing constant-time zero-padded comparison foruser:passwordor a bare password.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_edgesalso fails on unmodified 498f2aa, so this is not attributed to this change.