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

manageacls.py could accidentally grant permissions to wrong document in case of name clash #1531

Closed
5 tasks done
pamelafox opened this issue Apr 12, 2024 · 0 comments · Fixed by #1535
Closed
5 tasks done
Assignees
Labels
open issue A validated issue that should be tackled. Comment if you'd like it assigned to you.

Comments

@pamelafox
Copy link
Collaborator

pamelafox commented Apr 12, 2024

This issue is for a: (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

  1. Upload document with name fileA.pdf using prepdocs.sh
  2. Upload different document with name fileA.pdf using user-upload feature from webapp
  3. Use manageacls.py to add ACL for fileA.pdf to user B. It'll search for all files named fileA.pdf, including ones that were user uploaded, since it doesn't have a way to distinguish user-uploaded from admin-uploaded.

Suggested resolution

  • Add a field "sourcepath" or "blobpath" in searchmanager setup that will will contain the full path of the document: storageaccount/container/directory
  • Add that field to manageacls.py enable_acls as well
  • Set that field from both user-upload and prepdocs ingestion path
  • Perhaps provide a script to auto-adjust existing paths?
  • Note in the login_and_acls doc that a longer path must be specified for manageacls. Though we could provide an argument or shortcut for saying "default".
@pamelafox pamelafox added the open issue A validated issue that should be tackled. Comment if you'd like it assigned to you. label Apr 12, 2024
@pamelafox pamelafox self-assigned this Apr 12, 2024
@pamelafox pamelafox pinned this issue Apr 13, 2024
@pamelafox pamelafox unpinned this issue Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open issue A validated issue that should be tackled. Comment if you'd like it assigned to you.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant