Skip to content
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

Support VA Enterprise Architecture Home team adding injected header #9524

Closed
1 of 11 tasks
jilladams opened this issue Jun 17, 2022 · 16 comments
Closed
1 of 11 tasks

Support VA Enterprise Architecture Home team adding injected header #9524

jilladams opened this issue Jun 17, 2022 · 16 comments
Assignees
Labels
Injected header Proxy-rewrite JS app to present header on TeamSites; owned by Public Websites team Public Websites Scrum team in the Sitewide crew sitewide VA.gov frontend CMS team practice area

Comments

@jilladams
Copy link
Contributor

jilladams commented Jun 17, 2022

Description

VA Enterprise Architecture Home plans to adopt the injected header / megamenu.

Our team will need to:

Additional context

DEPO teamsite overview - explains the mechanisms, and has notes on testing, for the implementing team

After our work, the team will need to test on Staging. Once they confirm that injected header works and they're ready to publish, we'll need to update code to cookieOnly: false . That is separately ticketed under

Acceptance Criteria

  • On http://ea.oit.va.gov, when setting cookie in the console (by running document.cookie = "proxyRewrite=true;") the global header is injected
  • Schedule meeting with EAH team to ensure support

CMS Team

Please check the team(s) that will do this work.

  • Program
  • Platform CMS Team
  • Sitewide Crew
  • ⭐️ Sitewide CMS
  • ⭐️ Public Websites
  • ⭐️ Facilities
  • ⭐️ User support
@allisonlu
Copy link
Contributor

PR opened on vets-website: department-of-veterans-affairs/vets-website#21423

I have a meeting with Elijah from DevOps today to confirm if I also need to add this hostname to Terraform (see second bullet on Considerations when editing and testing the allowlist). I will update later today.

@jilladams
Copy link
Contributor Author

@ElijahLynn Allison is out sick as of earlier this afternoon. Curious if you all were able to meet prior or if you know the answer re: adding a hostname to Terraform (comment above in thread)?

@ElijahLynn
Copy link
Contributor

Allison is out sick as of earlier this afternoon. Curious if you all were able to meet prior or if you know the answer re: adding a hostname to Terraform (comment above in thread)?

We weren't able to meet but our team can take this on. ccing @jkalexander7 @ENeal49 for prioritization.

@jilladams
Copy link
Contributor Author

Confirmed that we do need help to add this domain to 2 devops locations that PW team doesn't have write access to. CMS Platform team has time sensitive deadlines and can't help right now without some escalation, so we've asked for help from Platform team for now.

CMS-team channel thread re: capacity for Elijah: https://dsva.slack.com/archives/CT4GZBM8F/p1656009212359809
Platform help request: https://dsva.slack.com/archives/CBU0KDSB1/p1656015220936849

@jsgarmon
Copy link

@jilladams : anyone is free to put in a PR to the devops repo. If you know what changes need to be made there, putting in your own PR is the fastest way to get them in.

@jilladams
Copy link
Contributor Author

jilladams commented Jun 23, 2022

@jsgarmon thanks! The commit examples linked from https://depo-platform-documentation.scrollhelp.site/developer-docs/teamsite-overview#TeamSiteoverview-Considerationswheneditingandtestingtheallowlist are pointing at a commit hash version of the file. Links from that doc =

It looks like the file has been significantly refactored in master. Are you able to offer any pointers about the current state of the code that handles the TeamSite CORS allowed origins for bucket-prod-va-gov-assets and bucket-preview-va-gov-assets? Or: how that's done these days? (Searching the repo for CORS, and the bucket names, doesn't turn up any insights.)

@jsgarmon
Copy link

The buckets are now part of the vets-api module, so you just need to make sure any needed origins are in the local allowed_origins list: https://github.com/department-of-veterans-affairs/devops/blob/master/terraform/environments/dsva-vagov-prod/main.tf#L274

@jilladams
Copy link
Contributor Author

(Ticketed the docs update: department-of-veterans-affairs/va.gov-team#43364)

@jilladams
Copy link
Contributor Author

@ryguyk flagging that as this one is a sprint goal, we may need your help next week to pick it up if Allison's out longer. We can check in on Mon/Tues am, once we know either way.

@allisonlu
Copy link
Contributor

allisonlu commented Jun 27, 2022

PR opened on devops repo: https://github.com/department-of-veterans-affairs/devops/pull/11465

This PR has been merged as of 6/27/2022

@allisonlu
Copy link
Contributor

PR on vets-website has also been merged today.

After these changes get deployed, we'll be ready to check and set the cookie value in the browser

@jilladams
Copy link
Contributor Author

jilladams commented Jun 28, 2022

@allisonlu I wanted to confirm this before notifying Sagar it's ready but realized I don't know exactly how to help them know what to do next. I was under the impression we could modify the cookie in dev tools to get the injected header to show. Do you know if that's true, and if so, which one we're looking at?

Screen Shot 2022-06-28 at 4 01 12 PM

Screen Shot 2022-06-28 at 4 01 06 PM

@allisonlu
Copy link
Contributor

@jilladams
According to the documentation, we would have to click the Console tab, and paste this in: document.cookie = "proxyRewrite=true;", then press Enter. But when I do this, I'm expecting the header to be activated, but it doesn't display even after refreshing the page (the cookie is still there though).

@jsgarmon do you have any more insight on this? or who to contact?

@allisonlu
Copy link
Contributor

allisonlu commented Jun 29, 2022

Ah! Nevermind, I got it to show up. Be sure to turn off your CORS setting on your browser, folks!

Screen Shot 2022-06-29 at 5 20 24 PM

@allisonlu
Copy link
Contributor

allisonlu commented Jun 29, 2022

new PRs opened to add ea.oit.va.gov on top of the www version to ensure both get the injected header:

vets-website: department-of-veterans-affairs/vets-website#21523 - merged as of 7/1
devops: https://github.com/department-of-veterans-affairs/devops/pull/11489 - merged as of 6/30

edit (6/30/2022): fixing links

@allisonlu
Copy link
Contributor

Both https://www.ea.oit.va.gov/ and https://ea.oit.va.gov/ have the injected header with the proxyRewrite cookie set to true!

@jilladams jilladams added the Injected header Proxy-rewrite JS app to present header on TeamSites; owned by Public Websites team label May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Injected header Proxy-rewrite JS app to present header on TeamSites; owned by Public Websites team Public Websites Scrum team in the Sitewide crew sitewide VA.gov frontend CMS team practice area
Projects
None yet
Development

No branches or pull requests

4 participants