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

[HOLD][Tracking] CSP error related issues for newDot #15244

Closed
techievivek opened this issue Feb 17, 2023 · 33 comments
Closed

[HOLD][Tracking] CSP error related issues for newDot #15244

techievivek opened this issue Feb 17, 2023 · 33 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Internal Requires API changes or must be handled by Expensify staff Monthly KSv2

Comments

@techievivek
Copy link
Contributor

techievivek commented Feb 17, 2023

We currently send CSP (content security policy) related headers for newDot using Cloudflare workers, which are only set up for our staging and prod environments. Therefore, testing changes related to CSP on the DEV server is a bit cumbersome. However, we have good news that a whatsnext proposal is in progress, which involves moving the Cloudflare workers code for newDot to the App repo. Until this is done, we kindly request that we keep a pause on working on any issue related to CSP.

If you would like to learn more about CSP, please visit: https://content-security-policy.com/. Additionally, if you're interested in learning more about Cloudflare workers, please visit: https://developers.cloudflare.com/workers/.

For your reference, here are a couple of related issue lists:

Please feel free to add any issues to the list that are related to the CSP error.

Thank you!

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0109c13461109f87b5
  • Upwork Job ID: 1636794996814442496
  • Last Price Increase: 2023-03-17
@techievivek techievivek added Weekly KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 17, 2023
@techievivek techievivek self-assigned this Feb 17, 2023
@MelvinBot
Copy link

Triggered auto assignment to @davidcardoza (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot locked and limited conversation to collaborators Feb 17, 2023
@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Feb 17, 2023
@MelvinBot

This comment was marked as off-topic.

@techievivek
Copy link
Contributor Author

Sorry for the ping @davidcardoza, this is just a tracking issue.

@techievivek
Copy link
Contributor Author

Adding this to weekly until we have some movement in the whatsnext proposal.

@melvin-bot melvin-bot bot added the Overdue label Feb 28, 2023
@techievivek
Copy link
Contributor Author

@justinpersaud Hi, any updates on the proposal to move the newDot Cloudflare worker code to the App repo? Will you be working on the project?

@melvin-bot melvin-bot bot removed the Overdue label Mar 1, 2023
@MelvinBot
Copy link

@techievivek this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Mar 3, 2023
@techievivek
Copy link
Contributor Author

No update on the whatsnext proposal but given this is not a big issue for us it should be just fine to hold this for some time.

@melvin-bot melvin-bot bot removed the Overdue label Mar 6, 2023
@techievivek techievivek added Weekly KSv2 Monthly KSv2 and removed Daily KSv2 Weekly KSv2 labels Mar 6, 2023
@melvin-bot melvin-bot bot added the Overdue label Jul 7, 2023
@techievivek
Copy link
Contributor Author

Still on HOLD for migration newDot from Cloudflare to our own servers.

@rushatgabhane
Copy link
Member

@techievivek spotted a similar error here - #24084

@melvin-bot melvin-bot bot added the Overdue label Aug 11, 2023
@techievivek
Copy link
Contributor Author

I chatted with Amy last week about the progress on the project, but it looks like Justine has shifted focus to working on the command mode for the Expensify card project, so this could be a bit delayed for now.

@melvin-bot melvin-bot bot removed the Overdue label Aug 14, 2023
@melvin-bot melvin-bot bot added the Overdue label Sep 15, 2023
@techievivek
Copy link
Contributor Author

Still on HOLD.

@melvin-bot melvin-bot bot removed the Overdue label Sep 20, 2023
@melvin-bot melvin-bot bot added the Overdue label Oct 23, 2023
@techievivek
Copy link
Contributor Author

No progress seems to be coming from the infra team on switching from the AWS to our own server.

@melvin-bot melvin-bot bot removed the Overdue label Oct 25, 2023
@justinpersaud
Copy link
Contributor

@techievivek can you refresh my memory on why these specifically depend on the migration? Is there nothing we can do today to solve these?

@techievivek
Copy link
Contributor Author

@justinpersaud
I believe we encountered some CSP errors, as indicated in this GH. To address this, we generated a nonce and added it to our CSP rule in this PR. However, when we deployed these changes, they didn't have the desired effect, and there was no way to test them locally. Consequently, we decided to put all CSP-related issues on hold. The plan was to revisit and resolve these issues once we migrate to our own servers, at which point we'll have a more convenient way to test and rectify these problems.

Here is a current CSP issue that we haven't yet resolved.
Screenshot 2023-10-25 at 6 17 23 PM

@justinpersaud
Copy link
Contributor

there was no way to test them locally.

This isn't true anymore. There is a way to test them locally, we just haven't fully put together the instructions on how to do it because there wasn't a use case.

Also, we have a function now to generate a nonce and have a script that uses it and working today.

https://github.com/Expensify/Cloudflare-Workers/blob/main/new.expensify.com/index.js#L9-L17

It's not clear to me that this needs to be held on any migration and can't be solved another way.

@techievivek
Copy link
Contributor Author

It's not clear to me that this needs to be held on any migration and can't be solved another way.

This doesn't need to be held of any migration if there is an easy way to test changes made to CSP rule on DEV.

This isn't true anymore. There is a way to test them locally, we just haven't fully put together the instructions on how to do it because there wasn't a use case.

It will be great to have the instruction written on an SO, I can try fixing this once I have a way to test it locally.

Also, we have a function now to generate a nonce and have a script that uses it and working today.
https://github.com/Expensify/Cloudflare-Workers/blob/main/new.expensify.com/index.js#L9-L17

Wow this is cool CONTENT_SECURITY_POLICY.replace('nonce-random-value', nonce-${generateNonce()}). 👌

@techievivek techievivek changed the title [HOLD WHATSNEXT][Tracking] CSP error related issues for newDot [HOLD][Tracking] CSP error related issues for newDot Oct 25, 2023
@justinpersaud
Copy link
Contributor

It will be great to have the instruction written on an SO, I can try fixing this once I have a way to test it locally.

It's a bit more than that. Can you create a GH and assign me with all the requirements you need for your testing? Include details on how you specifically want to test and what you're expecting if possible.

@melvin-bot melvin-bot bot added the Overdue label Nov 27, 2023
@techievivek
Copy link
Contributor Author

Sorry, couldn't prioritize this I will take a dig into it and have a GH ready for you soon, thanks.

@melvin-bot melvin-bot bot removed the Overdue label Nov 28, 2023
@melvin-bot melvin-bot bot added the Overdue label Jan 1, 2024
@techievivek
Copy link
Contributor Author

Sorry, couldn't prioritize this since I have been working on 2 EOY projects.

@melvin-bot melvin-bot bot removed the Overdue label Jan 2, 2024
@melvin-bot melvin-bot bot added the Overdue label Feb 2, 2024
@techievivek
Copy link
Contributor Author

Closing CSP related bugs for now based on this comment #15042 (comment)

@melvin-bot melvin-bot bot removed the Overdue label Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Internal Requires API changes or must be handled by Expensify staff Monthly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants