feat(acl): enhance ACL support#1003
Merged
Merged
Conversation
wakonig
force-pushed
the
fix/acl_support
branch
2 times, most recently
from
July 22, 2026 08:52
a88a0d8 to
e0253b0
Compare
wakonig
force-pushed
the
fix/acl_support
branch
3 times, most recently
from
July 22, 2026 12:06
945f1b3 to
361bf2e
Compare
wakonig
marked this pull request as ready for review
July 22, 2026 12:14
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances Redis ACL support across BEC services by forwarding active Redis ACL credentials to the ProcedureManager, reshaping several message endpoint namespaces to better match intended access levels, and adding an end-to-end ACL regression test.
Changes:
- Forward the ScanServer’s current Redis ACL credentials into the ProcedureManager and authenticate its connector accordingly.
- Add a
temporary_usercontext manager and improve service ACL login/config handling (includingACLConfig.password). - Add an ACL-focused e2e test and adjust the e2e GitHub Action to run it in an isolated (flush-redis) setup.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| bec_server/tests/tests_scan_server/test_procedures.py | Adds a unit test asserting ProcedureManager authenticates using forwarded credentials. |
| bec_server/bec_server/scan_server/scan_server.py | Passes current ACL credentials into ProcedureManager at startup. |
| bec_server/bec_server/procedures/manager.py | Adds redis_credentials support and authenticates the ProcedureManager Redis connector. |
| bec_lib/tests/test_bec_service.py | Updates CLI parsing tests for new ACL config shape/behavior. |
| bec_lib/tests/test_bec_logger.py | Updates expected log endpoint namespace (user/log). |
| bec_lib/tests/test_acl_login.py | Adds tests for temporary user switching and ACL demo helpers; expands config login tests. |
| bec_lib/bec_lib/utils/user_acls_test.py | Enhances ACL demo tooling (non_admin mode, admin detection/auth changes). |
| bec_lib/bec_lib/service_config.py | Extends ACLConfig with an optional password field. |
| bec_lib/bec_lib/endpoints.py | Reassigns several endpoints to different namespaces; removes/renames some endpoint helpers. |
| bec_lib/bec_lib/bec_service.py | Adjusts CLI ACL argument handling and passes the typed ACL model into login flow. |
| bec_lib/bec_lib/acl_login.py | Adds temporary_user, current_credentials, and refactors config-based login handling. |
| bec_ipython_client/tests/end-2-end/test_acl_e2e.py | New ACL end-to-end test that verifies non-admin behavior and temporary elevation. |
| .github/actions/bec_e2e_install/action.yml | Runs the ACL e2e test separately with --flush-redis, then runs remaining e2e tests with coverage append. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
wakonig
force-pushed
the
fix/acl_support
branch
2 times, most recently
from
July 22, 2026 13:22
24bf644 to
2455c30
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
cappel89
approved these changes
Jul 23, 2026
cappel89
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR improves the support for ACLs in BEC. In particular, it adds an e2e test for ensuring that they remain functional.
Type of Change
How to test
bec_lib/bec_lib/utils/user_acls_test.pymodule to set up your ACL environment and restart your server and clientPotential side effects
The renaming of the endpoints also means that certain data will be lost on redeployment
Additional Comments
The forwarding in the procedure manager is likely not needed. Instead, we should simply forward the entire connector.
Definition of Done