KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ using .z.w to call python Re: using .z.w to call python

  • matt_moore

    Member
    July 26, 2022 at 12:00 am

    This does not seem like a good idea for handling entitlements. Sending a sync call back down the just opened handle with .z.w runs the risk of a dead-lock between processes.  There is also a dedicated message handler for user/pass checks (.z.pw).  This happens first before .z.po and by default returns 1b or your permissions code can return 0b to not grant access. E.g.

    .perm.users:(),`matm; 
    .z.pw:{[user;pass] $[user in .perm.users;1b;0b]}; // client session pass hopen 
    `::12345:matm:abc 
    5i // client session fail hopen 
    `::12345:user:abc 
    'access

    qPython supports user/pass in the connection so these users will need to adjust how they are connecting to the Python APIs once this change is in place.

    Existing kdb processes should authenticate themselves this way as well.

    the .z namespace | Reference | kdb+ and q documentation – Kdb+ and q documentation (kx.com)