-
Notifications
You must be signed in to change notification settings - Fork 27
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
🐛 Fixes auth product error in vendor services 🚨 #6512
🐛 Fixes auth product error in vendor services 🚨 #6512
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6512 +/- ##
=========================================
+ Coverage 84.5% 88.1% +3.5%
=========================================
Files 10 1548 +1538
Lines 214 63346 +63132
Branches 25 2059 +2034
=========================================
+ Hits 181 55822 +55641
- Misses 23 7207 +7184
- Partials 10 317 +307
Flags with carried forward coverage won't be shown. Click here to find out more.
|
0f1e4ad
to
157cc6d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are 2 things that will not work here.
Let's discuss about it.
services/web/server/src/simcore_service_webserver/session/_cookie_storage.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/session/_cookie_storage.py
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very nice PR I didnt catch anything it looks very reaosnable! thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good thanks for the changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pair reviewed. thanks!
What do these changes do?
The
Forward auth
Traefik middleware, introduced in this pull request, uses thewebserver
'sGET v0/auth:check
endpoint to authenticate vendor services, whether deployed dynamically (e.g., a Jupyter service started in a study) or statically (e.g., the S4L manual).The
GET v0/auth:check
endpoint relies on theproducts
middleware to determine which product is being requested. It then checks if the user is authenticated and authorized for that product. Since theForward auth
middleware handles the request, we needed to use theX-Forward-Host
header to identify the originating hostname instead of relying solely on the hostname itself.We also tried sending the
X-Simcore-Product
header from the front-end when loading the site in an iframe, but we ran into CORS issues. For now, we've abandoned this approach.Key Highlights
product
middlewareX-Forwarded-Host
header when used in the middleware.session
pluginsession._cookie_storage
module and added some robustness improvements.security
pluginproduct.login
permission key.IMPORTANT: This approach requires further testing, but we've committed it to unblock first the master-e2e deployments. Following PRs will address this #6522
Related issue/s
How to test
Manually
Vendor Manual (Fake)
(2) -> no accessDev-ops checklist
None