Skip to content

[BB-835] Use a sub-domain instead of a prefixed domain for Studio, Preview etc.

Boros Gábor requested to merge guruprasad/studio-auth-domain-changes into master

Created by: lgp171188

Description From the Ironwood release, it is a requirement to serve the LMS and Studio from cookie-compatible domains. So the studio domain is now a sub-domain of the LMS domain. To allow session sharing, the EDXAPP_SESSION_COOKIE_DOMAIN ansible variable has been set to .<LMS domain>. For consistency, all the other domains - preview, discovery, ecommerce are updated to be sub-domains of the LMS domain.

This also adds a new ansible variable EDXAPP_LOGIN_REDIRECT_WHITELIST which allows the redirect to Studio after logging in via the LMS.

Testing instructions

  1. Run Ocim with the PR branch.
  2. Apply the migrations.
  3. Create a new instance. Verify that the internal domains for Studio, Preview, Discovery and E-Commerce are now sub-domains of the internal LMS domain and that the enable_prefix_domains_redirect field is set to False.
  4. Launch a new appserver for the instance and activate it after the provisioning completes successfully.
  5. Verify that the load-balancer configuration is added correctly for the internal domains and that there are no redirects setup for the instance.
  6. Add external domains for the same instance and launch a new appserver. Verify that the configuration is added correctly for the internal and external domains and that there are no redirects setup for the instance.
  7. Create a new instance and set the enable_prefix_domains_redirect field to True.
  8. Launch a new appserver for the instance and activate it after the provisioning completes successfully.
  9. Verify that the load-balancer configuration is added correctly for the internal domains and that there are redirects from the prefix domains to the corresponding sub-domains. Verify that the DNS records have been added for the prefix domains and that the redirect works as expected.
  10. Add external domains for the same instance and launch a new appserver. Verify that the configuration is added correctly for the internal and external domains and that the redirects are setup only for the prefix domains to the corresponding internal sub-domains. Verify that the internal domains, prefix domains and the external domains work as expected.
  11. Optionally, repeat the same steps for the previous instance on an existing instance after updating its internal domains to be sub-domains.
  12. Archive the instance and verify that the DNS records for the prefix domains are deleted.
  13. Optionally, verify that these changes do not impact the existing hawthorn instances.

Reviewers

  • @viadanna

Merge request reports