- 
                Notifications
    
You must be signed in to change notification settings  - Fork 32
 
🎨 Adds authentication for new style dynamic services and platform vendor services ⚠️ #6484
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
🎨 Adds authentication for new style dynamic services and platform vendor services ⚠️ #6484
Conversation
          Codecov ReportAttention: Patch coverage is  
 
 Additional details and impacted files@@            Coverage Diff            @@
##           master   #6484      +/-   ##
=========================================
+ Coverage    84.5%   88.1%    +3.5%     
=========================================
  Files          10    1540    +1530     
  Lines         214   63138   +62924     
  Branches       25    2058    +2033     
=========================================
+ Hits          181   55647   +55466     
- Misses         23    7176    +7153     
- Partials       10     315     +305     
 Flags with carried forward coverage won't be shown. Click here to find out more. 
  | 
    
…for-logged-in-users
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 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.
Thx. Looks real good. I left some suggestions
        
          
                services/web/server/src/simcore_service_webserver/login/_auth_handlers.py
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                services/web/server/src/simcore_service_webserver/session/plugin.py
              
                Outdated
          
            Show resolved
            Hide resolved
        
      …HK/osparc-simcore-forked into pr-osparc-manual-for-logged-in-users
          
 | 
    
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.
👍🏼
…dor services⚠️ (ITISFoundation#6484) Co-authored-by: Andrei Neagu <[email protected]>



What do these changes do?
Traefik's
forwardauthmiddleware is used to authenticate requests based on cookies. This allows for services under the same subdomain asosparc.ioto no longer be shown if the user is not logged in.webserverto share cookies with all it's subdomains to enable cookie authentication across subdomains (from my research this is safe since there is no way for a malicious actor to overwrite the cookie's domain)/v0/auth:checktowebserverwhich allows Traefik's middleware to check authentication of incoming requests with negligible impact on performanceSide effects for new style dynamic services
After a service is opened in a browser, users could typically copy the
UUID.services.osparc.ioaddress and open it somewhere else. Under the following conditions this is no longer possible:Side effect login behaviour change
This has no impact on any of our deployments.
Some tests were running on
http://127.0.0.1:9081. This no longer works, the cookie is not set because.127.0.0.1is not a valid domain name for the cookie.Instead use
http://127.0.0.1.nip.io:9081which sets the cookie's domain to.127.0.0.1.nip.iowhich is a valid domain.Related issue/s
How to test
Dev-ops checklist