Commit graph

697 commits

Author SHA1 Message Date
Jonathan Cohen
fe11e885c5
Consistent orientation for the Outline logo (#571)
Maintaining consistency with https://github.com/Jigsaw-Code/outline-client/pull/743 as well as with the app logos for both the client and the manager, flip all of the Outline discs so the light side is on the right.  I didn't touch a few (such as metrics.png) which are more complicated and would require access to the file in whatever image editor was used to create them.
2020-03-02 13:26:45 -05:00
alalamav
e9eb2d30ec
Only lint HTML files with prettier (#592) 2020-02-28 17:59:32 -05:00
Vinicius Fortuna
b0a9f38390
Add rollout for the replay protection (#590) 2020-02-28 14:46:25 -05:00
Vinicius Fortuna
89eadd3a11
Merge pull request #589 from Jigsaw-Code/fortuna-run
Fix docker run action
2020-02-27 19:35:03 -05:00
fortuna
f25f110595 Fix docker run action 2020-02-27 19:11:59 -05:00
alalamav
578d44baa9
Feature metrics (#577) 2020-02-26 12:49:52 -05:00
alalamav
64b3d85a62
Notarize macOS app (#584) 2020-02-21 11:34:57 -05:00
Jonathan Cohen
565a5d9a6e
Use Prettier to format HTML and CSS files (#583)
* Use Prettier to format HTML, CSS, and Markdown files

Currently alalama uses Sublime's built-in formatter while JonathanDCohen uses VS Code.  This standardizes us on Prettier and adds formatting to our pre-commit hooks.

pretty-quick has no option to only format changed lines, so this commit will be followed by a format of the src/ directory in order to keep unrelated formatting changes from polluting diffs in upcoming commits.

Code contributors can use the instructions at https://prettier.io/docs/en/editors.html if they'd like to integrate prettier with their editor of choice

* Format html and css files in ui_components

* Fix some html errors found by Prettier
2020-02-20 18:10:04 -05:00
alalamav
35074c58e1
Restore master branch (#582) 2020-02-20 12:29:18 -05:00
Jonathan Cohen
dbd1bb522f Correctly internationalize new UI access key placeholder name (#574)
* Correctly internationalize new UI access key placeholder name

* Add back the keyID for non-English languages

This simply replicates the existing messages so we can release the Data
Limits UI without waiting for these strings to be translated.

* Specify that keyId will be a number
2020-02-19 16:13:09 -05:00
alalamav
a99d8da12f
Fix message description (#568) 2020-02-07 11:32:00 -05:00
alalamav
b1454f1bbb
Settings page improvements (#567) 2020-02-04 17:00:29 -05:00
alalamav
e1a772eea1
Data limits UI (#554) 2020-02-03 16:21:37 -05:00
Tanel Puhu
8f90acfe40
Set watchtower to update/watch only shadowbox container (#540) 2020-01-31 15:46:27 -05:00
Roland Warmerdam
9791f4dbc5
Update the watchtower image name (#431) 2020-01-31 14:32:53 -05:00
Jonathan Cohen
dafa1f5bc2
Allow users to change the hostname for new access keys (#565)
* Create an endpoint to change the server's hostname.

This is the backend only, and does not check if the hostname exists or points to a Shadowbox
server.  Users have the responsibility of double checking that the
hostname and DNS if necessary are properly set up and specified.

* Updates

Changes validation to use regex.

Gets rid of a bad test

Uses paramtereized tests for better test output

Adds setHostname to AccessKeyRepository and calls it in the endpoint

* Integration tests

Also fixes missing dependency on ip-regex

* Remove validator from lockfile

* Ensure we correctly use Python 2 for Cloud SDK

* API for the new endpoint to change the server hostname. (#534)

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* Remove 404 and 406 error states.  Checking for a functioning Shadowbox
server requires knowledge of the API prefix, which creates layering
challenges.  The UI will be able to make these checks, but users who
call the API directly will have to be careful not to put in an incorrect
hostname.  The consequence of this would be that newly made access keys
won't work.

* Clarify API, change name, add validation errors

* Clarify description

* Remove the API response corresponding to a failed check against the new
hostname that it points to the same server

* Respond to review comments

* Rename endpoint and related functions

From the server's perspective, this does change the hostname for
existing access keys since on server load time (in the Server Manager)
we recalculate access key hostnames from the key repository.

* Respond to review comments

* Use version 1.2.0 since data limits is taking 1.1.0

* Fix update_mmdb and the Docker image to work on Alpine (#559)

* Fix the for loop in update_mmdb to be `dash` compatible

for x in {a..b} is bash-only, and alpine's default shell is `dash`.

* Fix other issues related to using musl/Busybox/dash

* Use `[[` instead of `((` for the branch
* Make sure to update to GNU coreutils in the image in order to use
`date --date`

* Respond to review comments

* UI for setting the hostname for access key invitations (#553)

* Increase Shadowbox version for data limits experiment (#544)

* Return the port for new access keys from GET /server.  (#552)

This was accidentally removed in #537.

* UI for setting the hostname for access key invitations

This also includes some random typo fixes and QOL improvements.

To test, you can use

    export SB_IMAGE=cohenjongoogle/shadowbox:latest
    yarn do shadowbox/docker/run

then in a different terminal

    yarn do server_manager/electron_app/run

and add the server

* Add back in new files

Also fixes a backward compatibility issues for servers which don't
support changing the hostname

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Use DB-IP's Geolocation database instead of MaxMind's (#557)

* Use DB-IP's free IP-to-Country database instead of MaxMind's

This avoids the necesseity to either (1) bundle MaxMind's database in
our docker image or (2) require server admins to individually create
MaxMind accounts due to the new requirements for using GeoLite2
databases.  See https://blog.maxmind.com/2019/12/18/significant-changes-to-accessing-and-using-geolite2-databases/

* Add attribution to DB-IP for the GeoIP database

* Make sure that we deal with lag between the changeover of the current
month and release of new versions of the DB-IP database

* Respond to review comments

* Attribute DB-IP in the update script

* Respond to review comments

* Respond to review comments

* Fix update_mmdb and the Docker image to work on Alpine (#559)

* Fix the for loop in update_mmdb to be `dash` compatible

for x in {a..b} is bash-only, and alpine's default shell is `dash`.

* Fix other issues related to using musl/Busybox/dash

* Use `[[` instead of `((` for the branch
* Make sure to update to GNU coreutils in the image in order to use
`date --date`

* Respond to review comments

* Update to Typescript 3.7 (#558)

See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html for more information.  Among the nice new features are optional chainging and null coalescing, and assertion functions, as well as some additional safety checks in the compiler

* Create an endpoint to change the server's hostname.

This is the backend only, and does not check if the hostname exists or points to a Shadowbox
server.  Users have the responsibility of double checking that the
hostname and DNS if necessary are properly set up and specified.

* Updates

Changes validation to use regex.

Gets rid of a bad test

Uses paramtereized tests for better test output

Adds setHostname to AccessKeyRepository and calls it in the endpoint

* Integration tests

Also fixes missing dependency on ip-regex

* Remove validator from lockfile

* Ensure we correctly use Python 2 for Cloud SDK

* API for the new endpoint to change the server hostname. (#534)

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* Remove 404 and 406 error states.  Checking for a functioning Shadowbox
server requires knowledge of the API prefix, which creates layering
challenges.  The UI will be able to make these checks, but users who
call the API directly will have to be careful not to put in an incorrect
hostname.  The consequence of this would be that newly made access keys
won't work.

* Clarify API, change name, add validation errors

* Clarify description

* Remove the API response corresponding to a failed check against the new
hostname that it points to the same server

* Respond to review comments

* Rename endpoint and related functions

From the server's perspective, this does change the hostname for
existing access keys since on server load time (in the Server Manager)
we recalculate access key hostnames from the key repository.

* Respond to review comments

* Use version 1.2.0 since data limits is taking 1.1.0

* Fix update_mmdb and the Docker image to work on Alpine (#559)

* Fix the for loop in update_mmdb to be `dash` compatible

for x in {a..b} is bash-only, and alpine's default shell is `dash`.

* Fix other issues related to using musl/Busybox/dash

* Use `[[` instead of `((` for the branch
* Make sure to update to GNU coreutils in the image in order to use
`date --date`

* Respond to review comments

* UI for setting the hostname for access key invitations

This also includes some random typo fixes and QOL improvements.

To test, you can use

    export SB_IMAGE=cohenjongoogle/shadowbox:latest
    yarn do shadowbox/docker/run

then in a different terminal

    yarn do server_manager/electron_app/run

and add the server

* Add back in new files

Also fixes a backward compatibility issues for servers which don't
support changing the hostname

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Fix messed up rebase

* merge

* Clear merge markers

Co-authored-by: alalamav <2132122+alalamav@users.noreply.github.com>

* Create an endpoint to change the server's hostname.

This is the backend only, and does not check if the hostname exists or points to a Shadowbox
server.  Users have the responsibility of double checking that the
hostname and DNS if necessary are properly set up and specified.

* Updates

Changes validation to use regex.

Gets rid of a bad test

Uses paramtereized tests for better test output

Adds setHostname to AccessKeyRepository and calls it in the endpoint

* Integration tests

Also fixes missing dependency on ip-regex

* Remove validator from lockfile

* Ensure we correctly use Python 2 for Cloud SDK

* API for the new endpoint to change the server hostname. (#534)

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* Remove 404 and 406 error states.  Checking for a functioning Shadowbox
server requires knowledge of the API prefix, which creates layering
challenges.  The UI will be able to make these checks, but users who
call the API directly will have to be careful not to put in an incorrect
hostname.  The consequence of this would be that newly made access keys
won't work.

* Clarify API, change name, add validation errors

* Clarify description

* Remove the API response corresponding to a failed check against the new
hostname that it points to the same server

* Respond to review comments

* Rename endpoint and related functions

From the server's perspective, this does change the hostname for
existing access keys since on server load time (in the Server Manager)
we recalculate access key hostnames from the key repository.

* Respond to review comments

* Use version 1.2.0 since data limits is taking 1.1.0

* UI for setting the hostname for access key invitations (#553)

* Increase Shadowbox version for data limits experiment (#544)

* Return the port for new access keys from GET /server.  (#552)

This was accidentally removed in #537.

* UI for setting the hostname for access key invitations

This also includes some random typo fixes and QOL improvements.

To test, you can use

    export SB_IMAGE=cohenjongoogle/shadowbox:latest
    yarn do shadowbox/docker/run

then in a different terminal

    yarn do server_manager/electron_app/run

and add the server

* Add back in new files

Also fixes a backward compatibility issues for servers which don't
support changing the hostname

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Use DB-IP's Geolocation database instead of MaxMind's (#557)

* Use DB-IP's free IP-to-Country database instead of MaxMind's

This avoids the necesseity to either (1) bundle MaxMind's database in
our docker image or (2) require server admins to individually create
MaxMind accounts due to the new requirements for using GeoLite2
databases.  See https://blog.maxmind.com/2019/12/18/significant-changes-to-accessing-and-using-geolite2-databases/

* Add attribution to DB-IP for the GeoIP database

* Make sure that we deal with lag between the changeover of the current
month and release of new versions of the DB-IP database

* Respond to review comments

* Attribute DB-IP in the update script

* Respond to review comments

* Respond to review comments

* Fix update_mmdb and the Docker image to work on Alpine (#559)

* Fix the for loop in update_mmdb to be `dash` compatible

for x in {a..b} is bash-only, and alpine's default shell is `dash`.

* Fix other issues related to using musl/Busybox/dash

* Use `[[` instead of `((` for the branch
* Make sure to update to GNU coreutils in the image in order to use
`date --date`

* Respond to review comments

* Update to Typescript 3.7 (#558)

See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html for more information.  Among the nice new features are optional chainging and null coalescing, and assertion functions, as well as some additional safety checks in the compiler

* Create an endpoint to change the server's hostname.

This is the backend only, and does not check if the hostname exists or points to a Shadowbox
server.  Users have the responsibility of double checking that the
hostname and DNS if necessary are properly set up and specified.

* Updates

Changes validation to use regex.

Gets rid of a bad test

Uses paramtereized tests for better test output

Adds setHostname to AccessKeyRepository and calls it in the endpoint

* Integration tests

Also fixes missing dependency on ip-regex

* Remove validator from lockfile

* Ensure we correctly use Python 2 for Cloud SDK

* API for the new endpoint to change the server hostname. (#534)

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* API for the new endpoint to change the server hostname.

I am sending it up now so we can iterate on it while I'm busy
implementing the endpoint.  I will merge it into the feature branch when
it's done as opposed as into master.

* Remove 404 and 406 error states.  Checking for a functioning Shadowbox
server requires knowledge of the API prefix, which creates layering
challenges.  The UI will be able to make these checks, but users who
call the API directly will have to be careful not to put in an incorrect
hostname.  The consequence of this would be that newly made access keys
won't work.

* Clarify API, change name, add validation errors

* Clarify description

* Remove the API response corresponding to a failed check against the new
hostname that it points to the same server

* Respond to review comments

* Rename endpoint and related functions

From the server's perspective, this does change the hostname for
existing access keys since on server load time (in the Server Manager)
we recalculate access key hostnames from the key repository.

* Respond to review comments

* Use version 1.2.0 since data limits is taking 1.1.0

* Fix update_mmdb and the Docker image to work on Alpine (#559)

* Fix the for loop in update_mmdb to be `dash` compatible

for x in {a..b} is bash-only, and alpine's default shell is `dash`.

* Fix other issues related to using musl/Busybox/dash

* Use `[[` instead of `((` for the branch
* Make sure to update to GNU coreutils in the image in order to use
`date --date`

* Respond to review comments

* UI for setting the hostname for access key invitations

This also includes some random typo fixes and QOL improvements.

To test, you can use

    export SB_IMAGE=cohenjongoogle/shadowbox:latest
    yarn do shadowbox/docker/run

then in a different terminal

    yarn do server_manager/electron_app/run

and add the server

* Add back in new files

Also fixes a backward compatibility issues for servers which don't
support changing the hostname

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Respond to review comments

* Fix messed up rebase

* merge

* Clear merge markers

Co-authored-by: alalamav <2132122+alalamav@users.noreply.github.com>

Co-authored-by: alalamav <2132122+alalamav@users.noreply.github.com>
2020-01-30 15:22:57 -05:00
alalamav
4b95dbd23f
Fix formatting in shadowbox config (#562) 2020-01-23 18:18:41 -05:00
Jonathan Cohen
674eafd472
Update Manager service logging (#561)
* Properly stringifies the log response for listAccessKeys
* Fills in missing logging of nonempty responses
2020-01-22 11:53:16 -05:00
Jonathan Cohen
36c2121668
Bump version number for server manager release (#560) 2020-01-21 17:14:49 -05:00
Jonathan Cohen
72efc24130
Update to Typescript 3.7 (#558)
See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html for more information.  Among the nice new features are optional chainging and null coalescing, and assertion functions, as well as some additional safety checks in the compiler
2020-01-17 16:42:02 -05:00
Jonathan Cohen
c47abc4973
Fix update_mmdb and the Docker image to work on Alpine (#559)
* Fix the for loop in update_mmdb to be `dash` compatible

for x in {a..b} is bash-only, and alpine's default shell is `dash`.

* Fix other issues related to using musl/Busybox/dash

* Use `[[` instead of `((` for the branch
* Make sure to update to GNU coreutils in the image in order to use
`date --date`

* Respond to review comments
2020-01-17 16:17:19 -05:00
Jonathan Cohen
db6aba33b2
Use DB-IP's Geolocation database instead of MaxMind's (#557)
* Use DB-IP's free IP-to-Country database instead of MaxMind's

This avoids the necesseity to either (1) bundle MaxMind's database in
our docker image or (2) require server admins to individually create
MaxMind accounts due to the new requirements for using GeoLite2
databases.  See https://blog.maxmind.com/2019/12/18/significant-changes-to-accessing-and-using-geolite2-databases/

* Add attribution to DB-IP for the GeoIP database

* Make sure that we deal with lag between the changeover of the current
month and release of new versions of the DB-IP database

* Respond to review comments

* Attribute DB-IP in the update script

* Respond to review comments

* Respond to review comments
2020-01-16 18:08:29 -05:00
Jonathan Cohen
9400cb1fc6
Return the port for new access keys from GET /server. (#552)
This was accidentally removed in #537.
2020-01-08 18:29:46 -05:00
alalamav
d59e83cd7e
Increase Shadowbox version for data limits experiment (#544) 2019-12-11 13:19:00 -05:00
alalamav
a8ffa2abae
Server data limit (#542) 2019-12-09 13:05:15 -05:00
alalamav
c09bb40e57
Deprecate server data usage timeframe API (#537) 2019-11-21 19:01:46 -05:00
Jonathan Cohen
46b7ee0e33
Use the server config instead of env variables for the API port and the server hostname (#488)
* Get public hostname from config file

* Tidy up

* Respond to Review Comments

At some point down the line I royally screwed up my git history and
reverted a bunch of changes.  I'm not sure what or when, so I `git reset --hard 1cd28e4` and tried to redo my
past responses to comments from there.

* Export SB_PUBLIC_IP in cmd.sh

* respond to review comments

* Review response
2019-11-18 18:16:24 -05:00
alalamav
8b11c219ac
Specify macOS image in Travis (#532) 2019-11-07 12:14:09 -05:00
Jonathan Cohen
a3c44651ef Fix at electron v7.0.0 (#528) 2019-11-06 17:32:50 -05:00
alalamav
6d86993523
Enable localization (#530) 2019-11-06 17:07:33 -05:00
John Richter
83cd9b64f3 Upgrade to the new version of Digital Ocean's Metrics agent (#529) 2019-10-30 19:04:15 -04:00
Jonathan Cohen
07748c287f
Update electron for server_manager (#521)
* Update electron for server_manager

* Undo csv-parse upgrade -- it failed due to transitive dependencies of
restify and caused merge conflicts
2019-10-29 15:55:05 -04:00
alalamav
7dac4797ce
Convert AM messages to Polymer JSON; translation fixes (#524) 2019-10-25 18:12:52 -04:00
Jonathan Cohen
10d0d039db
Increase Server Manager version to 1.3.0 (#523)
Minor version bumped due to new functionality of changing the port
number for new access keys.
2019-10-24 18:35:25 -04:00
Jonathan Cohen
39e13e71b6
Fix messages (#525) 2019-10-24 15:23:52 -04:00
Jonathan Cohen
a9aef69d3b
Set -x in the integration test (#522)
* Set -x in the integration test

The integration test has been flaking from time to time on Travis with
no obvious failures, indicating this is happening unexpectedly outside a
`fail` call.  `set -x` will help us diagnose when it happens again.

* Only show logs on test failure

* Correctly continue if test.sh fails

* Only cleanup the logfile on success.  The logfile should stick around on
failure for easier sharing of test results.  It will eventually get
cleaned up whenever the tmp directory gets cleaned.
2019-10-24 14:45:35 -04:00
Jonathan Cohen
2e3266d529
Fix a misnamed variable in the keys port input handler (#520) 2019-10-22 18:25:08 -04:00
Jonathan Cohen
ccd93a626a
Upgrade csv-parse to avoid https://nvd.nist.gov/vuln/detail/CVE-2019-17592 (#517)
It's likely low risk for us, but an easy fix anyways.
2019-10-22 17:33:31 -04:00
Jonathan Cohen
5e72b1d554
Update typescript (#519)
This corresponds with the same change in outline-client

Tested:
yarn do {server_manager/test, shadowbox/test, shadowbox/integration_test/run, sentry_webhook/build, metrics_server/build}
2019-10-22 17:22:27 -04:00
Jonathan Cohen
3d323d8224
Allow the port for new access keys to be editable from the UI. (#505)
* Allow the port fo rnew access keys to be changed from the UI

* Remove old TODOs

* Use correct log levels

* CSS formatting

* Use Number.isNan

* short circuit on no change and kill dead code

* Implement fakes, fix display bug

* fix typo

* Respond to code review

* Fix underline coloring

* Limit to numerical input

* Respond to review comments

* Review comments

* Disable editing key port for old servers (#513)

* Disable editing key port for old servers

* Use -1 instead of the current port number, nits

* Be more conservative with the response code check

* Use on-tap instead of on-click for the keys port input

* Rename "toggleFoo" to "setFoo"

* Use 1.0.0 instead of 0.2.0

* Respond to review comments.  Also fixes a bug where, if the input was
invalid due to a server-side error, hitting Enter did nothing except
show a valid state

* Correct the previous bugfix
2019-10-22 13:04:35 -04:00
erinm
4bf578bffc Create am.json (#518) 2019-10-21 17:48:04 -04:00
alalamav
47446d4c8b
Update dependencies (#512) 2019-10-09 16:52:10 -04:00
alalamav
1695d02d1b
Allow navigation to the Mac App Store (#511) 2019-10-09 16:51:51 -04:00
alalamav
ab851bd85b
Improve type safety of manager service request parameters (#492) 2019-10-08 15:19:39 -04:00
alalamav
57df4f9400
Fix unhandled rejection (#504) 2019-09-20 15:02:12 -04:00
alalamav
20f81106ed
Fix waiting for Prometheus ready (#500) 2019-09-18 15:15:53 -04:00
oreoluwa
212132318b [fix]: regressing ip (#497) 2019-09-18 12:36:29 -04:00
alalamav
8965e2d672
Update outline-ss-server to v1.0.7 and docker node to v8.15.0 (#494) 2019-09-17 17:28:57 -04:00
alalamav
cec9516544
l10n: dedupe message, fix typo (#491) 2019-09-16 12:33:43 -04:00
alalamav
72fb3e0ba5
Server data usage timeframe (#485) 2019-09-13 18:21:09 -04:00