bcgov / entity

ServiceBC Registry Team working on Legal Entities
Apache License 2.0
23 stars 58 forks source link

COOP-UI: public URL not working correctly #1349

Closed severinbeauvais closed 4 years ago

severinbeauvais commented 4 years ago

Description:

There are a number of issues with the current public URL configuration:

  1. dev.bcregistry.ca/cooperatives is proxied to coops-dev.pathfinder.gov.bc.ca but the web app uses absolute paths (ie, dev.bcregistry.ca/) for its resources and so doesn't find them
  2. test.bcregistry.ca/cooperatives is proxied to coops-test.pathfinder.gov.bc.ca (same problem as above)
  3. bcregistry.ca/cooperatives is redirected to https://coops.pathfinder.gov.bc.ca because the proxy doesn't work
  4. misc issues with www.bcregistry.ca not redirecting to bcregistry.ca
  5. misc issues with http:// not redirecting to https:// (or https:// not working)

Dependencies We depend on GCPE (?) to configure some of this for us, ref: CITZ GDX Client Service Desk SDE-2595

We probably also need to update our web to use relative paths instead of absolute paths, or be aware of a different root URL, or something like that. The following Webpack config may work:

module.exports = {
   mode: 'development',
   output: {
      publicPath: '/cooperatives/'
   }
}

or maybe this: https://cli.vuejs.org/config/#baseurl.

Acceptance Criteria All URLs work according to validation rules below.

Validation Rules

  1. http should redirect to https
  2. long url 'www.url' and short url 'url' should both work
  3. dev.bcregistry.ca/cooperatives should work (Dev environment) (also test Auth and Pay URLs/APIs)
  4. test.bcregistry.ca/cooperatives should work (Test environment)
  5. bcregistry.ca/cooperatives should work (Prod environment)
  6. no URL should appear as a pathfinder.gov.bc.ca URL

Ready to Build (DoR):

Acceptance / DoD:

severinbeauvais commented 4 years ago

To: Roberts, David CITZ:EX David.Roberts@gov.bc.ca; Bott, Ian CITZ:EX Ian.Bott@gov.bc.ca; Gillani, Karim CITZ:EX Karim.Gillani@gov.bc.ca; Sparks, Kaine CITZ:EX Kaine.Sparks@gov.bc.ca Cc: Sutherland, Christine CITZ:EX Christine.Sutherland@gov.bc.ca; Beauvais, Severin Severin.Beauvais@quartech.com Subject: RE: CITZ GDX Client Service Desk SDE-2595 URL Approved

Hi David,

I already passed all this information on, but here it is again:

  1. Dev: dev.bcregistry.ca/cooperatives is being proxied to the dev pathfinder instance. However, the front end is using absolute paths for includes, and this is not working with the proxying. I assume that this cannot be handled at the proxy level, so the application needs to be corrected.
  2. Test: essentially the same as dev.
  3. Production: a redirect is in place so that the http://bcregistry.ca/cooperatives link isn’t dead. This is not what is desired, but until the application paths are corrected it will have to remain in place. There are problems with HTTPS and with www.bcregistry.ca/cooperatives, but I think those are handled at the proxy level, and I think the iStores should have included them as work to be done. Perhaps it is still outstanding given that proxying could not be set up.

Walter Moar Senior Application Developer – Strategic Services Service BC Ministry of Citizens' Services T: 778 698-1407 | Web: http://www.servicebc.gov.bc.ca “Access to government services made easy”

severinbeauvais commented 4 years ago

(updated on Oct 8/19)

Here is how we expect this to work:

Short URL to www URL

http://bcregistry.ca/cooperatives should redirect to http://www.bcregistry.ca/cooperatives https://bcregistry.ca/cooperatives should redirect to https://www.bcregistry.ca/cooperatives

HTTP to HTTPS

http://dev.bcregistry.ca/cooperatives should redirect to https://dev.bcregistry.ca/cooperatives http://test.bcregistry.ca/cooperatives should redirect to https://test.bcregistry.ca/cooperatives http://www.bcregistry.ca/cooperatives should redirect to https://www.bcregistry.ca/cooperatives

BCRegistry to Pathfinder

https://dev.bcregistry.ca/cooperatives should PROXY?/CNAME? to https://coops-dev.pathfinder.gov.bc.ca https://test.bcregistry.ca/cooperatives should REDIRECT to https://coops-test.pathfinder.gov.bc.ca redirect for now (will eventually be proxy) ^^^ https://www.bcregistry.ca/cooperatives should REDIRECT to https://coops.pathfinder.gov.bc.ca redirect for now (will eventually be proxy) ^^^^

severinbeauvais commented 4 years ago

Things to fix

severinbeauvais commented 4 years ago

Current status: the Dev environment (Openshift + ISB) and code (FE and common) have been updated and deployed, and Dev appears to be working fine.

We are blocked on ISB config before deploying to Test and ultimately Prod.

saravankumarpa commented 4 years ago

https://github.com/bcgov/entity/issues/1551 Is the new ticket related to deploying to Test and Prod re: new URLs

severinbeauvais commented 4 years ago

@Kaineatthelab, @lmullane, @saravankumarpa : Status as of Tue Oct 22: Saravan and I have reached out to other teams (and to the DevHub forum) to find out how they are configured for external URLs and applications running in OpenShift.

In particular, Saravan will be discussing this with a colleague at 5pm today. This other team is apparently successfully routing through WAM so it is expected that we (Cooperatives) can do the same thing.

If this configuration works successfully on Dev then we will ask WAM to configure it similarly on Test and be ready to update Prod accordingly. <<< The WAM Prod configuration and our deploy to Prod will have to be coordinated or there's a good chance external (and possibly internal) routing won't work.

severinbeauvais commented 4 years ago

@Kaineatthelab, @lmullane, @saravankumarpa Status as of Wed Oct 23:

Yesterday Saravan configured Openshift and Christine configured WAM and managed to make Dev work correctly on both https://dev.bcregistry.ca/cooperatives and https://coops-dev.pathfinder.gov.bc.ca/cooperatives ! I believe Christine also did the WAM config for Test at that time.

Tomorrow morning we will deploy to Test and Saravan will configure Openshift for it. It should work on both https://test.bcregistry.ca/cooperatives and https://coops-test.pathfinder.gov.bc.ca/cooperatives

Tomorrow (Thursday) evening Christine will configure WAM for Prod. This may cause the http://bcregistry.ca/cooperatives URL to break but https://coops.pathfinder.gov.bc.ca/auth/ should still work.

Friday or Monday we will deploy to Prod and Saravan will configure Openshift for it. It should work on both https://bcregistry.ca/cooperatives and https://coops.pathfinder.gov.bc.ca/cooperatives

saravankumarpa commented 4 years ago

@severinbeauvais @lmullane @Kaineatthelab

The correct url in Prod will be https://www.bcregistry.ca/cooperatives.. It need to have a www in place , since thats the only domain name which the server team has control over..
Even if the user doesn't type/or type http or https ,its fine , It will be redirected. But the key thing is to include 'www'