Adds a minimal supervision tree for making DB changes from the
`FzHttp.Release` module. This allows the `bin/create-or-reset-admin` and
`bin/create-api-token` commands to be with `docker compose exec` or
`docker compose run --rm` indiscriminately.
Starting the FzHttp.Repo directly is more involved it's not compiled
into the release as an OTP app.
The migration is edited in place. Otherwise, the users that partially
upgraded to 0.7 won't be able to proceed.
Another migration is added to add default values for every table that
did not have it to make things consistent and make sure that both users
that have failed migration executed and the ones that executed it
successfully will end up with the same schema.
Closes#1295
1. The test data is taken from tests, you can override attributes by
adding keyword params to `doc` macro;
2. Additionally, you can add a section title using a `@moduledoc` in a
controller and a controller action title using `@doc` on a controller
function. (It will be added to all instances of its usage).
3. To make parameters nice a helper was added to build it using
`DocHelper`, you can find an example in UserController.
Overall, the code is messy, I'll need to revisit it, but was doing it in
a rush so hope it's good enough for v0.
Results you can see at https://firezone.docs.apiary.io/.
To generate it locally run `DOC=1 mix test
test/fz_http_web/controllers/json`.
Co-authored-by: Jamil Bou Kheir <jamilbk@users.noreply.github.com>
Bumps
[phoenix_live_view](https://github.com/phoenixframework/phoenix_live_view)
from 0.18.3 to 0.18.6.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/phoenixframework/phoenix_live_view/blob/master/CHANGELOG.md">phoenix_live_view's
changelog</a>.</em></p>
<blockquote>
<h2>0.18.6 (2023-01-09)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>Fix external anchor click unloading on external click</li>
</ul>
<h2>0.18.5 (2023-01-09)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>Fix external anchor click unloading socket</li>
</ul>
<h2>0.18.4 (2023-01-05)</h2>
<h3>Enhancements</h3>
<ul>
<li>Support string upload name to support dynamically generated
<code>allow_upload</code>'s</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Fix nested LiveView race condition on live patch causing nested
child to skip updates in some cases</li>
<li>Fix browser history showing incorrect title when using live
navigation with <code>@page_title</code></li>
<li>Fix undefined _target param when using <code>JS.push</code> for form
changes</li>
<li>Fix <code>phx-no-feedback</code> missing from inputs added after a
form submit</li>
<li>Fix <code>phx-disconnected</code> events firing when navigating away
or submitting external forms</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="e1168e34fd"><code>e1168e3</code></a>
Release 0.18.6</li>
<li><a
href="12ca28cd0e"><code>12ca28c</code></a>
Release 0.18.5</li>
<li><a
href="629910dbc1"><code>629910d</code></a>
Fix external anchor click unloading socket. Closes <a
href="https://github-redirect.dependabot.com/phoenixframework/phoenix_live_view/issues/2386">#2386</a></li>
<li><a
href="88282b3f14"><code>88282b3</code></a>
fix: add hidden attr to csrf inputs (<a
href="https://github-redirect.dependabot.com/phoenixframework/phoenix_live_view/issues/2384">#2384</a>)</li>
<li><a
href="00f9bf037c"><code>00f9bf0</code></a>
Test live component inside conditional slot</li>
<li><a
href="a7e66d81fc"><code>a7e66d8</code></a>
Remove accidentally committed test</li>
<li><a
href="674fd69344"><code>674fd69</code></a>
Consistently convert slots into rendered structs</li>
<li><a
href="92bf7c0bef"><code>92bf7c0</code></a>
Further optimize slot rendering to only flatten on multiple entries</li>
<li><a
href="4929c7ba9e"><code>4929c7b</code></a>
Release 0.18.4</li>
<li><a
href="48b0054fe4"><code>48b0054</code></a>
Bump build</li>
<li>Additional commits viewable in <a
href="https://github.com/phoenixframework/phoenix_live_view/compare/v0.18.3...v0.18.6">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Adds a mechanism for generating API tokens from the CLI. Requires the
default admin user to be present. From there the token can be used to
create additional admins. In the future, we could allow specifying a
user's email to generate the token for.
Generate like so:
```
docker compose run --rm firezone bin/create-api-token
```
Bumps [excoveralls](https://github.com/parroty/excoveralls) from 0.15.1
to 0.15.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/parroty/excoveralls/releases">excoveralls's
releases</a>.</em></p>
<blockquote>
<h2>v0.15.2</h2>
<h4>Changes</h4>
<ul>
<li>Add .coverdata file export (<a
href="https://github-redirect.dependabot.com/parroty/excoveralls/issues/298">#298</a>).
<ul>
<li>Allow default use of <code>mix test --cover --export-coverage
XXX</code>.</li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/parroty/excoveralls/blob/master/CHANGELOG.md">excoveralls's
changelog</a>.</em></p>
<blockquote>
<h2>0.15.2</h2>
<h4>Changes</h4>
<ul>
<li>Add .coverdata file export (<a
href="https://github-redirect.dependabot.com/parroty/excoveralls/issues/298">#298</a>).
<ul>
<li>Allow default use of <code>mix test --cover --export-coverage
XXX</code>.</li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2dc17fd56c"><code>2dc17fd</code></a>
Update CHANGELOG</li>
<li><a
href="bd08a506bc"><code>bd08a50</code></a>
add .coverdata file export (<a
href="https://github-redirect.dependabot.com/parroty/excoveralls/issues/298">#298</a>)</li>
<li>See full diff in <a
href="https://github.com/parroty/excoveralls/compare/v0.15.1...v0.15.2">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [phoenix](https://github.com/phoenixframework/phoenix) from
1.7.0-rc.0 to 1.7.0-rc.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/phoenixframework/phoenix/blob/master/CHANGELOG.md">phoenix's
changelog</a>.</em></p>
<blockquote>
<h2>1.7.0-rc.1 (2023-01-06)</h2>
<h3>Enhancements</h3>
<ul>
<li>Raise if using verified routes outside of functions</li>
<li>Add tailwind.install/esbuild.install to mix setup</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>[Presence] fix task shutdown match causing occasional presence
errors</li>
<li>[VerifiedRoutes] Fix expansion causing more compile-time deps than
necessary</li>
<li>[phx.gen.auth] Add password inputs to password reset edit form</li>
<li>[phx.gen.embedded] Fixes missing :references generation to
phx.gen.embedded</li>
<li>Fix textarea rendering in core components</li>
<li>Halt all sockets on intercept to fix longpoll response already sent
error</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9a07c909db"><code>9a07c90</code></a>
Release 1.7.0-rc.1</li>
<li><a
href="c75a06a7b6"><code>c75a06a</code></a>
Fix test</li>
<li><a
href="cac8cf4282"><code>cac8cf4</code></a>
Correct the swoosh api client configuration (<a
href="https://github-redirect.dependabot.com/phoenixframework/phoenix/issues/5166">#5166</a>)</li>
<li><a
href="38b24ce513"><code>38b24ce</code></a>
Improve docs on custom errors from <code>Socket.connect/3</code> (<a
href="https://github-redirect.dependabot.com/phoenixframework/phoenix/issues/5171">#5171</a>)</li>
<li><a
href="8cb51ee216"><code>8cb51ee</code></a>
Bump parse-url from 7.0.2 to 8.1.0 in /assets (<a
href="https://github-redirect.dependabot.com/phoenixframework/phoenix/issues/5184">#5184</a>)</li>
<li><a
href="b9cabf8a31"><code>b9cabf8</code></a>
Bump json5 from 2.2.1 to 2.2.3 in /assets (<a
href="https://github-redirect.dependabot.com/phoenixframework/phoenix/issues/5185">#5185</a>)</li>
<li><a
href="f411caec7b"><code>f411cae</code></a>
Sync components</li>
<li><a
href="b07c83d5e6"><code>b07c83d</code></a>
bugfix: flash component's phx-click hide should go to <a
href="https://github.com/id"><code>@id</code></a>, not #flash (<a
href="https://github-redirect.dependabot.com/phoenixframework/phoenix/issues/5188">#5188</a>)</li>
<li><a
href="8a9f68997a"><code>8a9f689</code></a>
touchup styles, add navigation links (<a
href="https://github-redirect.dependabot.com/phoenixframework/phoenix/issues/5190">#5190</a>)</li>
<li><a
href="c9c65c6eed"><code>c9c65c6</code></a>
Fix sentence (<a
href="https://github-redirect.dependabot.com/phoenixframework/phoenix/issues/5191">#5191</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/phoenixframework/phoenix/compare/v1.7.0-rc.0...v1.7.0-rc.1">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [gettext](https://github.com/elixir-gettext/gettext) from 0.20.0
to 0.21.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/elixir-gettext/gettext/blob/main/CHANGELOG.md">gettext's
changelog</a>.</em></p>
<blockquote>
<h2>v0.21.0</h2>
<h3>New features and improvements</h3>
<ul>
<li>
<p>Bump Elixir requirement to 1.11+.</p>
</li>
<li>
<p>Extract parsing and dumping of PO/POT files to the
<a href="https://github.com/elixir-gettext/expo">expo</a> library, and
start depending
on that.</p>
</li>
<li>
<p>Support marking messages as obsolete with the new
<code>:on_obsolete</code> Gettext
configuration option.</p>
</li>
<li>
<p>Add the <code>:write_reference_line_numbers</code> Gettext
configuration option.</p>
</li>
<li>
<p>Save the previous messages when there's a fuzzy match, with the new
<code>:store_previous_message_on_fuzzy_match</code> Gettext
configuration option.</p>
</li>
<li>
<p>Change <code>:sort_by_msgid</code> to accept <code>false</code>,
<code>:case_sensitive</code>, or
<code>:case_insensitive</code> and deprecate the <code>true</code>
value.</p>
</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>Sort messages independent of line splits when dumping PO files.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="35e423eb75"><code>35e423e</code></a>
Release v0.21.0</li>
<li><a
href="0dd72d3b34"><code>0dd72d3</code></a>
Add case-insensitive sorting to :sort_by_msgid (<a
href="https://github-redirect.dependabot.com/elixir-gettext/gettext/issues/326">#326</a>)</li>
<li><a
href="9285a82426"><code>9285a82</code></a>
Fix typos (<a
href="https://github-redirect.dependabot.com/elixir-gettext/gettext/issues/332">#332</a>)</li>
<li><a
href="4000910a93"><code>4000910</code></a>
Sort messages independent of message line splitting (<a
href="https://github-redirect.dependabot.com/elixir-gettext/gettext/issues/331">#331</a>)</li>
<li><a
href="2d9228c39a"><code>2d9228c</code></a>
Save previous message for fuzzy matches (<a
href="https://github-redirect.dependabot.com/elixir-gettext/gettext/issues/316">#316</a>)</li>
<li><a
href="b720495c97"><code>b720495</code></a>
Add code coverage through coveralls (<a
href="https://github-redirect.dependabot.com/elixir-gettext/gettext/issues/329">#329</a>)</li>
<li><a
href="3f6c98e70b"><code>3f6c98e</code></a>
Add badges to the README</li>
<li><a
href="189db2c9cb"><code>189db2c</code></a>
Fix CI and update Erlang/Elixir versions (<a
href="https://github-redirect.dependabot.com/elixir-gettext/gettext/issues/328">#328</a>)</li>
<li><a
href="f10c122369"><code>f10c122</code></a>
Tweak some docs here and there</li>
<li><a
href="b8ce79b927"><code>b8ce79b</code></a>
Add a "Basic Overview" docs section (<a
href="https://github-redirect.dependabot.com/elixir-gettext/gettext/issues/327">#327</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/elixir-gettext/gettext/compare/v0.20.0...v0.21.0">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [telemetry](https://github.com/beam-telemetry/telemetry) from
1.1.0 to 1.2.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/beam-telemetry/telemetry/blob/main/CHANGELOG.md">telemetry's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/elixir-telemetry/telemetry/tree/v1.2.0">1.2.0</a></h2>
<h3>Added</h3>
<ul>
<li>Added <code>telemetry_test</code> module for testing telemetry
events. (<a
href="https://github-redirect.dependabot.com/beam-telemetry/telemetry/issues/118">#118</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/beam-telemetry/telemetry/commits">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Expose the most commonly-used SSL client options to our OIDC and
ConnectivityChecks HTTP clients. Resolves some lingering issues some
users were facing with OIDC where they needed a custom TLS version
enforced or cacert file used to fetch the `discovery_document` and
resulting keys.
SSL misconfiguration can be a security concern, so we intentionally puke
when an unexpected key is passed. This should result in a new GitHub
issue being opened and dialog created to learn more about the use-case.
Fixes#996
### TODO
- [x] "/v0"
- [x] Double-check migration order; re-timestamp if necessary
- [x] Move `sites` fields to `configurations` so they can be updated
from API
- [x] #1240 -- it introduces possible race conditions for API requests
- [x] #1249
- [ ] #1008
- [ ] Final review
Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Andrew Dryga <andrew@dryga.com>
This PR also moves to `yarn` for docs package management for improved
speed, security, and developer experience. Docusaurus prefers yarn.
Refs firezone/marketing#126
Still [having
issues](https://github.com/firezone/firezone/actions/runs/3759257641)
with the Elixir cache.
Things tried that didn't work:
- Namespacing by branch name. Github does this already.
- Removing the `restore-keys` in order to only restore the cache if it's
a direct hit.
The `static_analysis` workflow runs `mix compile --force
--warnings-as-errors` which doesn't use the build cache, so it's
removed, which fixes the problem.
Client configs will be generated based on runtime configuration
stored in the `sites` table, while server configuration (which
requires a restart of the server) will be configurable via ENV vars.
Refs #1270