Commit Graph

19 Commits

Author SHA1 Message Date
Jamil
45bfe0f2a3 chore(infra): Deny connections from US-sanctioned countries with HTTP 403 (#7462)
Implementing the remainder of the legally required block. Will be
applied on Dec 9th, as we notified customers.
2024-12-06 20:26:30 +00:00
Jamil
3a62709c77 docs: Add restricted regions docs (#7395)
This will be referred to when we make our email announcement.
2024-11-24 17:20:06 +00:00
Jamil
5437c3e2df fix(infra): Block signups if expression matches (#7337) 2024-11-13 21:29:47 +00:00
Brian Manifold
50ba752d30 fix(infra): Update gcp cloud armor rules (#7293)
The expression for one of the rules was not able to be applied due to
invalid characters (`\n`) and even once the invalid characters were
removed there is a limit of 5 subexpressions, but the previous
expression contained 10.

Along with the expression change, the `deny(451)` is not allowed. The
only `deny` codes allowed are `403`, `404`, `502`
2024-11-09 15:09:16 +00:00
Jamil
83dfd3a98c fix(infra): Don't use macros for Cloud armor (#7285)
Fixes #6807 

Follow up to #7282
2024-11-06 21:06:21 -08:00
Jamil
1bd9a3e134 fix(infra): Use proper common expression language syntax (#7282)
https://github.com/firezone/firezone/actions/runs/11713228570/job/32626046819


Language reference:

https://github.com/google/cel-spec/blob/master/doc/langdef.md#macros
2024-11-06 23:59:34 +00:00
Andrew Dryga
0a79cd5045 chore(portal): Do not allow signing up from legally-restricted jurisdictions (#7088)
Related to #6807

---------

Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2024-11-06 22:40:20 +00:00
Andrew Dryga
c57a670dbb fix(devops): Create SSL certs before destroy (#6607) 2024-09-05 14:35:16 -07:00
Andrew Dryga
2ae5f921c8 fix(portal): Disable IP check for browser session tokens (#6598)
This PR reverts commit that moves out IPv6 address to a separate
subdomain (deploying that will cause a prod downtime) and simply removes
the check that causes redirect loops.
2024-09-05 11:07:40 -07:00
Andrew
14e3c379c1 Fix DNS cert replacement 2024-09-05 08:51:01 -07:00
Jamil
c581439ee2 fix(portal): Use app-ipv6.firezone.dev for IPv6 app to prevent websocket / http from using different stacks (#6522)
Based on testing and research it does not appear that Chrome will
reliably choose a consistent protocol stack for loading the initial web
page as it does for connecting the WebSocket when connecting over VPN
tunnels. If one or the other stacks experiences a slight delay or packet
loss causing retransmission, or QUIC simply doesn't play nicely with the
MTU (in our case 1280), it may fall back to IPv4 (which has less
per-packet overhead) or even a TCP connection.

Unfortunately this violates an assumption we have in token validation
logic. Namely, that the remote_ip used to create the token (via sign in)
is the same one used to the connect the WebSocket. I can see where this
logic comes from in a security context, but thinking through the attack
vector(s) that would be able to leverage this violation has me left
wondering if this check is worth the breakage we currently face in
#6511.

- Scenario 1: MITM - attacker steals token somehow via MITM (would need
to somehow break TLS) - the attacker is already in our network path and
can rewrite the remote_ip already with his/her own.
- Scenario 2: Malicious browser plugin stealing session token. It will
be harder to spoof the remote IP in this case, but if this is a
possibility, the plugin could presumably directly control the tab where
the user is logged in.
- Scenario 3: IdP is compromised leading to malicious redirect before
arriving to Firezone - if this is the case, the user could likely login
in directly and create his/her own valid session token anyhow.

Perhaps I'm missing other scenarios, open to feedback. If we want to
ensure the token used by the websocket originated from the same browser
as it was minted from, perhaps we could generate a small random key,
save it in local storage, and send that in a header when connecting the
WebSocket. I think cookies handle that for us already though.

Fixes #6511
2024-09-04 07:28:14 +00:00
Andrew Dryga
823b3cb276 fix(infra): Resolve capacity issues during rollouts (#6007)
I've managed to finally reserve enough e2 instances for our needs and
also used e2 for gateways to workaround the quota issues. The `web` app
still used n2 because quota doesn't allow additional n4's. Rollouts also
fixed to not go over the reservations/quotas.
2024-07-23 19:58:29 -06:00
Andrew Dryga
0b6e3564f3 chore(infra): Deploy relay and portal to more zones and use more modern CPU arch (#5921) 2024-07-19 15:15:28 -06:00
Andrew Dryga
fa15e1568f fix(portal): Use RESTRICTED SSL policy to remove weak cipher suites (#5358) 2024-06-13 11:31:47 -06:00
Andrew Dryga
33389969f5 hotfix: set project_id for log formatter 2024-04-11 19:40:37 -06:00
Andrew Dryga
45c644ec8a hotfix: fix reporter name 2024-04-10 15:12:15 -06:00
Andrew Dryga
b0590fa532 chore(portal): Send metrics to Google Cloud Monitoring (#4564) 2024-04-10 13:04:59 -06:00
Andrew Dryga
e3cbef7fe4 chore(portal): Enable CDN and WAF (#4450) 2024-04-01 19:36:47 -06:00
Andrew Dryga
114696c0ba chore(infra): Split terraform files into folders and add domain to production app (#4172) 2024-03-16 11:54:06 -06:00