feat: add filters to support logistration integration - #337
Conversation
0fa2f77 to
8651fc4
Compare
5ebe0d6 to
c0c46d4
Compare
There was a problem hiding this comment.
Pull request overview
This PR extends the openedx_filters.learning public filter surface to support “logistration” (combined login/registration) and related auth flows, aligning the filters library with new integration points in edx-platform/enterprise.
Changes:
- Added six new learning filters for logistration context/response customization, MFE redirect control, post-login redirect override, and TPA form overrides.
- Added two structural
Protocoltypes (FormDescriptionProtocol,ProviderConfigProtocol) to document the minimal interface passed to pipeline steps. - Added/updated test coverage for the new filters, and bumped package version + changelog entry.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| openedx_filters/learning/filters.py | Adds new logistration/auth-related filters and protocol structural types. |
| openedx_filters/learning/tests/test_filters.py | Adds unit tests validating new filters’ filter_type values and passthrough/exception behavior. |
| openedx_filters/init.py | Bumps package version to 3.9.0. |
| CHANGELOG.rst | Adds a 3.9.0 changelog entry describing the new filters and protocols. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0c4ee36 to
2f95918
Compare
57a747a to
6d579f6
Compare
iloveagent57
left a comment
There was a problem hiding this comment.
Looks good, one small suggestion to DRY things up a tiny bit.
6d579f6 to
5602d20
Compare
|
@felipemontoya or @feanil could use one of your eyes on this big one. The full ADR may be the best way to catch up, and there's a diagram in there too: https://github.com/openedx/edx-enterprise/blob/abd13d1be582e5c51f57373608d67032c96d4056/docs/decisions/0016-logistration-filters.md |
felipemontoya
left a comment
There was a problem hiding this comment.
I think this work is good and overall very needed in the login/registration extensibility story. Thanks for putting this together @pwnage101. Now that I understand the context, new review should be quicker.
5602d20 to
fc89cc1
Compare
|
@felipemontoya Awesome feedback! I just updated this PR to incorporate all of your feedback, with the exception of one: I opted not to create a consolidated ContextGenerated filter. The reality of the two "context" dictionaries is that the shape differs between the legacy template context and the AuthN MFE context, so their processing cannot be safely collapsed under one filter. With extra work on the MFE, we could bring the two context dicts into alignment, but that is out of scope. But, that did make me realize that I was completely missing an Additionally I created a new architecture subdomain called "Authentication", and added a new ADR (0008) to justify it. Here's a quick overview of the 6 new authentication filters, plus the 2 pre-existing ones which still live under the "Learning" subdomain:
For the platform reference, you'll need to refer to edx/edx-platform#407 |
fc89cc1 to
7daae2b
Compare
b633447 to
c88bcdf
Compare
* Added new `authentication` architecture subdomain
* Added six new authentication-related filters:
* `LogistrationViewContextGenerated`
* `AuthnMFEContextGenerated`
* `LoginAltRedirectURLRequested`
* `LoginFormGenerated`
* `RegistrationFormGenerated`
* `LogistrationViewRenderCompleted`
* Added one new structural type:
* `FormDescriptionProtocol` - declares the minimal surface the form filters
pass to pipeline steps.
* `ProviderConfigProtocol` - declares the minimal surface of the third-party
auth provider configuration that the form filters pass to pipeline steps.
ENT-11568
c88bcdf to
aebe588
Compare
| 'sphinx_copybutton', | ||
| 'sphinx.ext.graphviz', | ||
| 'sphinxcontrib.mermaid', | ||
| 'myst_parser', |
There was a problem hiding this comment.
markdown support for docs is needed because on Github only markdown supports mermaid rendering.
| should not rely on anything beyond this protocol. | ||
| """ | ||
|
|
||
| def override_field_properties( |
There was a problem hiding this comment.
could one use this to add a new field?
My understanding is that it would not work because it only works on existing fields, but adding the capacity to add a filter to the protocol would be a killer feature for anyone trying to have their own logistration logic.
|
|
||
| ## Decision | ||
|
|
||
| We will introduce a new "Authentication" architecture subdomain, implemented in |
There was a problem hiding this comment.
@mariajgrimaldi this makes sense to me, but I'll like to know your thoughs. Should this mean that we also add a similar subdomain in events?
authenticationarchitecture subdomain, and ADR to explain why it is needed.LogistrationViewContextGeneratedAuthnMFEContextGeneratedLoginAltRedirectURLRequestedLoginFormGeneratedRegistrationFormGeneratedLogistrationViewRenderCompletedFormDescriptionProtocol- declares the minimal surface the form filters pass to pipeline steps.ENT-11568
Integration Testing
See openedx/edx-enterprise#2551 (comment)
Related: