Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC-30037 Check legacy DZ physical permission in ESP services #17658

Merged
merged 1 commit into from
Oct 4, 2023

Commits on Sep 22, 2023

  1. HPCC-30037 Check legacy DZ physical permission in ESP services

    1. In checkPlaneFilePermissions() (dfurun.cpp), check legacy
    physical permission only if the plane name is set.
    2. Add getLegacyDZPhysicalPerms() in ESP SMCLib.
    3. Call getLegacyDZPhysicalPerms() in validateDropZoneAccess()
    which is used by ESP WsFileIO service.
    4. In ESP FileSpray service, check legacy physical permission
    if plane exists.
    
    Revise based on review
    1. Add queryDistributedFileDirectory().getFScopePermissions() and
    call it in the getLegacyDZPhysicalPerms().
    2. Move validateDropZoneReq(), validateDZFileScopePermission()
    and getDZPathScopePermissionsEx()) into TpCommon.cpp.
    Rename the getDZPathScopePermissionsEx() to
    getDZPathScopePermsAndLegacyPhysicalPerms().
    Rename the validateDZFileScopePermission() to
    validateDZFileScopePermissions(). Also revise
    them.
    3. The following 3 files are not called from outside. Change them
    from extern to static: getDZPathScopePermissions(),
    getDZFileScopePermissions() and getLegacyDZPhysicalPerms().
    4. Add comments.
    5. Fix a bug in the message for the throwOrLogDropZoneLookUpError().
    6. Rename the validateDropZoneHostAndPath() to getDropZoneAndValidateHostAndPath()
    and revise it. It is called when uploading/downloading dropzone file and in
    WsFileSprayEx::onFileList(). There are 2 issues in the existing code: a. some
    code are duplicated with the code in FileSprayEx::onFileList(). b. the
    isDropZoneRestrictionEnabled is not used.
    7. Rename the validateDZFileScopePermissions() to
       validateDZFileScopePermsAndLegacyPhysicalPerms()
    8. Consoliate the code in FileSprayEx::onFileList() by using the
    getDropZoneAndValidateHostAndPath().
    9. Add validateDZPathScopePermsAndLegacyPhysicalPerms() which contains the common
    code for the validateDropZoneReq() and WsFileSprayEx.
    10. Revise the code in validateDropZoneReq().
    11. Move the addPathSepChar() line, fix an intent bug, and fix a message bug.
    12. Add more comments.
    
    Signed-off-by: wangkx <[email protected]>
    wangkx committed Sep 22, 2023
    Configuration menu
    Copy the full SHA
    f2e53c0 View commit details
    Browse the repository at this point in the history