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

Remove 'timestamp' argument, include all rulesets in repo #14

Merged
merged 1 commit into from
Oct 6, 2020

Conversation

maeve-fpf
Copy link
Contributor

Status

Ready for review

In the initial version of this container we specifically only included the rulesets files with a specified timestamp (in CI this was read out of latest-rulesets-timestamp). This isn't necessary, and is actually a change from the current git-based deployment which checks out the entire repo.

I don't think it's likely that a client would request an old file (maybe it failed to fetch the timestamp), but it's probably safest to keep the existing behavior in case it does and would fail open on a 404.

If we don't pass in an arg that depends on the repo content, it would simplify our build logic and enable some deduplication of CI config between various containers.

Review Checklist

  • No changes to onboarded.txt
  • No changes to default.rulesets.TIMESTAMP.gz
  • The ruleset has been verified by modifying the HTTPS Everywhere configuration in a Tor Browser instance
  • No changes to index.html

Additional check: curl -I https://securedrop.org/https-everywhere/default.rulesets.1588004096.gz returns a 200, so make serve should show the same result from localhost:4080.

@emkll
Copy link
Contributor

emkll commented Oct 6, 2020

It seems like I missed this in the initial review of the container, my apologies. make serve completes successfully, but get a 404 error when clicking on a link, for example:

http://127.0.0.1:4080/rulesets-signature.1596120728.sha256

Seems like the index.html will need to be updated to include https-everywhere in the URL path before the filename?

@maeve-fpf
Copy link
Contributor Author

Hm, the index.html is unchanged - it has relative links (to the files in the same directory), not absolute paths.

When I run it locally, on http://localhost:4080/https-everywhere/ I see links to http://localhost:4080/https-everywhere/rulesets-signature.1596120728.sha256 etc.

Copy link
Contributor

@emkll emkll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this happens if you go to http://localhost:4080/https-everywhere (without the trailing slash, the links will point to the folder above https-everywhere ).

Given that is is occurring only in the dev env through make serve, that the URL shown after the container is built has the trailing slack, and not on the deployed server, good to merge. Thanks @maeve-fpf !

@emkll emkll merged commit a4a758a into main Oct 6, 2020
@emkll emkll deleted the no-docker-build-arg branch October 6, 2020 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants