bamaer commented on PR #8702:
URL: https://github.com/apache/hop/pull/8702#issuecomment-5932668859

   **Blockers**
   
   - **"All projects" search ignores `ProjectsAccessControl`.** 
`AllProjectsSearchablesIterator` loops over every `ProjectConfig` 
(`AllProjectsSearchablesIterator.java:57`) without 
`ProjectsAccessControl.isProjectAllowed()`. Every other project entry point 
checks it (`ProjectsGuiPlugin`, `SelectProjectsDialog`, 
`HopGuiStartProjectLoad`). A restricted Hop Web user can read pipelines, 
connection metadata and environment variables of projects they aren't allowed 
to open. Opening a metadata hit also lets them edit and save it into that 
project.
   
     Suggested fix: filter the projects with `isProjectAllowed`. Do it on the 
UI thread when the location is built, and pass the allowed list in, because the 
search runs on a background thread where the session-bound security context may 
not resolve.
   
   **Should fix**
   
   - **The normal search now includes every environment's config files.** 
`ProjectSearchablesIterator` used to search the first environment's config 
files only. It now uses all environments of the project 
(`environmentConfigurationFiles`, `ProjectSearchablesIterator.java:66`). This 
applies to Ctrl+F and `hop-search` too, not only "All projects", so values from 
prod or test config files, including secrets, show up while you work in dev.
   
     Suggested fix: keep the default search on the active environment, and 
search all environments only under "All projects".
   
   - **Variable hits from another project open the wrong file.** 
`HopGuiDescribedVariableSearchable` gets the unresolved config path 
(`ProjectSearchablesIterator.java:162`), and the click handler resolves it with 
the active project's variables. For a hit in project B, a path like 
`${PROJECT_HOME}/../env/dev.json` then opens project A's file, or nothing. The 
same raw path is used in `searchableKey`, so identically named variables from 
different projects that share a relative path are deduplicated away.
   
     Suggested fix: pass `realConfigurationFile`, which is already computed on 
the line before. For the active project the result is the same.
   
   - **Hits from another project open inside the active project.** Pipelines 
and workflows from project B are loaded with B's metadata provider, then opened 
in project A's explorer without switching project. Editing or running them 
mixes B's metadata with A's variables and run configurations. Metadata hits are 
edited with A's variables against B's metadata folder.
   
     Suggested fix: ask to switch to the hit's project before opening it, or 
open hits from other projects read-only.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to