Compare commits

..
Author SHA1 Message Date
braginini 9875bb0fcd Fix setup key create popup 2023-05-07 23:16:55 +02:00
braginini ae586b4dfe Fix add PAT popup 2023-05-07 19:59:57 +02:00
braginini c0a6965310 Fix user edit view 2023-05-07 19:59:47 +02:00
braginini f12a923c61 Fix user edit view 2023-05-07 19:32:14 +02:00
braginini ad798bbab4 Fix invite and add user popups 2023-05-07 18:55:34 +02:00
Crusadero b50464db43 Setup keys screen (#167) 2023-05-07 18:39:28 +02:00
pascal-fischer 1eb5ccc131 displaying proper groups and name on route peer update (#169) 2023-05-05 15:50:39 +02:00
pascal-fischer ac42a17b11 remove unnecessary oidc user check from users page (#166) 2023-04-27 13:28:50 +02:00
pascal-fischer 77ca3c6fde Adding service user support and new user overview (#164)
Changes:
user tab was split in service users and regular users
user edit view was reworked:
shows PAT box for service users and self (hides for rest)
hides email and groups for service users as no usage
reverted settings tab to only contain account settings + hide for normal users
Use navbar avatar dropdown to link to users list and open user edit page for self
extend api-client to handle requests with query parameters
use popup form for PAT creation, user invite and service user creation
validate all form fields before trying to send API call and show faulty fields

Additional fixes:
groups popup was only visible after 2nd hover after tab switch on every view, fixed to also show on first hover
fix setup keys page throwing errors from time to time and not loading
peers view was sending getRoute requests that are only allowed for admins which was throwing errors (only console) for normal users -> disabled requests for non-admin users
2023-04-22 12:57:17 +02:00
pascal-fischer 20e24b4ede Fix Routes view when updating routes (#165)
* fix filter

* filter also for android

* fix masquerade Traffic button

* remove log
2023-04-21 13:07:54 +02:00
Misha Bragin 7a29dac01c Add single line installer command for Mac and Linux (#162) 2023-04-04 14:20:02 +02:00
pascal-fischer 444e9ec44a fetch userID from user list and not oidc by default (#161) 2023-04-03 16:52:42 +02:00
pascal-fischer dff0313f82 Feature/pat support (#157)
* Add working UI + API calls [missing token popup]

* use popup view to add new token

* show userID if user name not available

* switch from description to name

* show "Me" instead of own name

* removed created_by column

* update add token explanation

* use object instead of plain text for token create response

* some style changes

* disable information button for tokens

* last_used can contain nil

* fix delete popups

* lower case letters for dates

* add activity and fix visibility

* show settings tab for non admins

* remove spaces on top of setting tabs

* fix copy button size and position

* fix list footers

* continue merge changes to new files
2023-04-03 12:29:40 +02:00
Maycon Santos 11fbfb336a Clean last estimated name (#160) 2023-04-03 12:16:12 +02:00
Maycon Santos 4a0ae8f27d Add missing config change (#159) 2023-04-01 21:58:46 +02:00
Maycon Santos 9a72d8b0c4 Allow defining API token source (#158)
On many IDP providers, the access token
 is used to access the IDP's own API

 With these changes, we allow users to define the proper token to be used for
 management API calls
2023-04-01 19:44:28 +02:00
Misha Bragin 8e038cf242 Make table headers font-weight normal (#156) 2023-03-27 15:59:18 +02:00
Misha Bragin 5bd94eff56 Fix add peer popup tab layout on mobile (#154) 2023-03-23 12:10:27 +01:00
Misha Bragin 77f065b093 Update theme border radius (#152) 2023-03-22 16:56:36 +01:00
Misha Bragin a4d55cfb90 Fix settings modal styles (#151) 2023-03-22 16:14:49 +01:00
Misha Bragin cfd4c9075b Add onboarding steps (#150) 2023-03-22 15:21:52 +01:00
braginini 962180030a Fix activity docs link 2023-03-15 14:20:48 +01:00
Misha Bragin 485e1e8d79 Add more references to docs (#149) 2023-03-15 14:18:22 +01:00
Givi Khojanashvili b11007b29f Add policy add activities (#147)
Related changes for netbirdio/netbird#700
2023-03-13 10:58:34 +01:00
Maycon Santos bce75c1ca9 Disable banner (#146) 2023-03-02 15:55:31 +01:00
Maycon Santos 0c09992b38 Use user.is_current (#145)
prevent update for own user

use the is_current for label

removed unused imports
2023-03-01 22:50:26 +01:00
Maycon Santos 86b12f30d2 Use new windows release URL (#144)
removed latestVersion logic and environment support
2023-03-01 15:00:36 +01:00
Maycon Santos d3e34d8448 Use single page size helper with new larger values (#143)
Reduce duplicated code with single helper for pagination

On larger deployments we should allow for larger pages

fix popover key issue and vertical spacing

update deprecated keys
2023-02-28 16:32:12 +01:00
Misha Bragin 76083168f6 Log error when activity event is not handled (#142) 2023-02-28 11:22:40 +01:00
Misha Bragin a54b3687ae Display user in the user role update event (#141)
Handling of the "User role updated" event (user.role.update) 
was missing in the Activity tab.
2023-02-27 15:27:00 +01:00
Zoltan Papp 25f154dc83 Capitalize first letter of OS (#140) 2023-02-27 14:54:39 +01:00
pascal-fischer f3c7d877f8 Add additional step in the Mac installation instructions to start the daemon (#138) 2023-02-22 20:55:36 +01:00
Misha Bragin 7cea7e7f54 Format individual peer login expiration event (#139)
Events peer.login.expiration.disable and peer.login.expiration.enable
are handled in the Activity tab now and properly displayed.
2023-02-22 20:54:56 +01:00
Misha Bragin aaa351635f Add peer expiration setting confirmation modal (#137)
Add a confirmation dialog to notify a user of possible
consequences of the peer login expiration enabling/disabling.
2023-02-21 08:47:14 +01:00
Misha Bragin 379ff5486e Account settings view (#136)
New Settings tab added to the dashboard.
It is possible to enable or disable peer login expiration globally for an account.
As well as defining the expiration time period.
2023-02-20 08:57:24 +01:00
Misha Bragin 8bcd9918e2 Fix expires in input filed of the setup key (#135) 2023-02-17 14:30:22 +01:00
Misha Bragin 044ccd0ce6 Display login expiration activities (#134) 2023-02-16 15:36:45 +01:00
braginini ab09ca3697 Display API error in peers view 2023-02-16 13:03:39 +01:00
Misha Bragin 1644ed5dce Add peer login expiration tooltip (#133) 2023-02-16 12:47:35 +01:00
Misha Bragin cea459792f Add peer login expiration (#132)
Display if peer login has expired in the Peers table
Enable/Disable peer login expiration
2023-02-16 12:18:15 +01:00
Maycon Santos a402680816 Disallow all crawlers and dashboard indexing (#131) 2023-02-10 18:45:11 +01:00
Givi Khojanashvili e57e5b726d Feat add custom id claim (#129)
* Fix management API endpoint ENV var. Format README.

* Add and use id_current user flag

* Use mix of the new and old methods to detect current user.
2023-02-03 21:48:03 +01:00
Misha Bragin 2c4ada0ad8 Use peerID in the Routes view (#130)
Relates to the netbirdio/netbird PR
Use Peer.ID instead of Peer.Key as peer identifier (#664)
2023-02-03 10:34:43 +01:00
Misha Bragin 8195587c85 Handle additional activity events (#128) 2023-01-31 13:56:46 +01:00
Maycon Santos adf6e1e71f Use ID token payload when oidcUser is nil (#127)
With some IDPs like MS Azure the
oidcUser is not being set, so we can fallback to id token
to validate UI and current user
2023-01-24 09:10:14 +01:00
Maycon Santos b733a186ae Remove console.log in peers page (#125) 2023-01-19 14:55:42 +01:00
Maycon Santos 5d901470c2 Feature/dns settings (#126)
Add DNS settings view to the DNS tab.

Split the page into sub-tabs for Nameservers and DNS settings

Added API calls to the new DNS settings API
2023-01-18 18:12:29 +01:00
Misha Bragin 29ab28847d Add Events view (#119) 2023-01-02 17:29:11 +01:00
Maycon Santos 0361825e04 Add peer's last seem time on popover (#122) 2022-12-16 19:37:10 +01:00
Moath Qasim 2fa33ec06a Fix MacOS custom netbird up command (#121) 2022-12-11 18:54:48 +01:00
Maycon Santos c677eeaae4 Add distribution groups to Network routes (#118)
Users can add distribution groups to network routes

Groups can be added to individual network routes or to all routes in the group

Adding a new group in the modal is restricted to individual network route operations
2022-12-08 17:24:34 +01:00
Maycon Santos 7fb4b0b145 Update actions versions (#120) 2022-12-08 13:22:07 +01:00
dependabot[bot] 57f60a2fbf Bump loader-utils from 2.0.2 to 2.0.4 (#109)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.2 to 2.0.4.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v2.0.2...v2.0.4)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-08 12:06:54 +01:00
dependabot[bot] ec949da416 Bump minimatch and recursive-readdir (#106)
Bumps [minimatch](https://github.com/isaacs/minimatch) and [recursive-readdir](https://github.com/jergason/recursive-readdir). These dependencies needed to be updated together.

Updates `minimatch` from 3.0.4 to 3.1.2
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

Updates `recursive-readdir` from 2.2.2 to 2.2.3
- [Release notes](https://github.com/jergason/recursive-readdir/releases)
- [Changelog](https://github.com/jergason/recursive-readdir/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jergason/recursive-readdir/commits/v2.2.3)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
- dependency-name: recursive-readdir
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-08 12:06:28 +01:00
Misha Bragin 43710b8ada Add SetupKey usage limit (#117) 2022-12-05 13:10:21 +01:00
Maycon Santos 247665a846 Call users API on empty state (#116)
Validate if the users state is empty and issue a GET call to /api/users

We check if the call was issued and if not on tabs that already does such a call
2022-11-27 16:33:27 +01:00
Maycon Santos 010657c594 Fix DNS validations (#115)
Check if domains is not empty when primary is false

Validate domain and primary fields before submit

Display validation errors as message too

Reload groups on failure too

Display API call error

Added call to action message when nameserver is empty
2022-11-27 13:15:55 +01:00
Misha Bragin 2d911af97f Add DNS feature announcement (#114) 2022-11-25 18:37:55 +01:00
Misha Bragin afdfed0160 Filter peers by groups (#113) 2022-11-25 18:26:00 +01:00
Misha Bragin 6b86da3716 Copy IP or DNS on the peers tab (#112)
Copy Peer IP or DNS in the Address column in Peers table
2022-11-25 17:23:35 +01:00
Maycon Santos 425fac8e9c DNS (#101)
Added DNS tab for managing Nameservers.
Users will be able to add multiple nameservers 
and set distribution groups that dictate to which peers the settings will be applied.
With this PR we also got a set of group handlers that can be reused.
2022-11-25 15:55:26 +01:00
Misha Bragin fa2413f937 Add FQDN of a peer to the peers table (#111) 2022-11-21 11:27:13 +01:00
Misha Bragin feec057933 Don't show admin content to users with a "user" role (#108) 2022-11-15 17:58:06 +01:00
Enrico Renna 9127686df7 fix: apt-key deprecation warning/errors (#107) 2022-11-15 09:12:13 +01:00
Maycon Santos 479911ded8 Check for change in any field (#104)
* Check for change in any field

Name should not be required, specially for self-hosted

* proper email change validation
2022-11-12 15:29:16 +01:00
Misha Bragin 69dcd6fadd Handle Management API errors (#103) 2022-11-10 16:30:16 +01:00
Misha Bragin 0b7b34b490 Handle Forbidden Errors coming from management (#100) 2022-11-05 08:41:55 +01:00
braginini fff93a3820 Improve spacing on email verification screen. 2022-10-27 09:50:58 +02:00
braginini da21784c73 Improve email verification window messaging 2022-10-27 09:40:57 +02:00
braginini 2e03a39b3e Add user invites banner 2022-10-20 12:01:52 +02:00
Maycon Santos 8e626cdd96 Revert "bump @axa-fr/react-oidc to 6.9 to fix atob padding bug (#97)" (#99)
This reverts commit 957ff98cec.
2022-10-18 17:48:30 +02:00
braginini 472704ad59 Merge remote-tracking branch 'origin/main' 2022-10-18 11:49:53 +02:00
braginini 94c7288016 Enable invite logic 2022-10-18 11:49:43 +02:00
Jens L 957ff98cec bump @axa-fr/react-oidc to 6.9 to fix atob padding bug (#97)
* bump @axa-fr/react-oidc to 6.9 to fix atob padding bug

* add issuer to auth0AuthorityConfig
2022-10-17 23:54:21 +02:00
Jens L 80178f66c3 correctly handle JWTs without base64-padding (#96) 2022-10-15 17:34:40 +02:00
braginini 37324cbcfc Hide user invites feature 2022-10-14 11:42:21 +02:00
braginini 9dd362a8a4 Add wiretrustee.com domain to "hosted" variants 2022-10-13 18:27:52 +02:00
braginini 90605a2067 Enable invites only for the local or hosted version 2022-10-13 18:11:30 +02:00
Misha Bragin 18cfddbbe7 Support User Invites (#86)
This PR brings an "Invite User" button to the Users view
and a view to creating (inviting) a new user to the account.
This function calls the Management API POST /users
endpoint that creates a new user.
2022-10-13 18:01:32 +02:00
Maycon Santos 17e671200e Don't display announcement after user close it (#95)
We store the banner text as md5
and the state if user closed already
2022-10-13 17:45:51 +02:00
Maycon Santos bb94342cc8 Support custom redirect callback URIS (#92) 2022-10-12 12:25:55 +02:00
Misha Bragin b86cf8b99f Add setup key expiration property when creating new key (#90) 2022-10-06 17:03:09 +02:00
Maycon Santos f472c06cbf skip analytics on monitoring 2022-10-03 12:27:51 +05:00
Maycon Santos c58834309b Add hotjar integration (#89)
hotjar is only enabled if NETBIRD_HOTJAR_TRACK_ID is passed
2022-10-02 18:01:06 +05:00
Maycon Santos 75fdd3e17f Add new peer button and user message (#87) 2022-09-30 19:59:55 +02:00
braginini 568c5eccda Change tables key fields styling 2022-09-29 11:00:56 +02:00
braginini 363f226a1c Add me tag to the user view to identify the current user 2022-09-29 10:37:04 +02:00
braginini bf447b1ada Fix user role display when clicking view 2022-09-29 10:26:02 +02:00
Maycon Santos 90cb05bd2d Parse access token for validation and use latestToke global (#85) 2022-09-27 12:33:55 +02:00
Misha Bragin a98d6d9ce1 Display additional peer info (#84) 2022-09-26 18:40:06 +02:00
braginini f83e39d734 Fix deprecated fields warning 2022-09-23 15:05:34 +02:00
braginini 52c1909229 Fix package json 2022-09-23 15:02:23 +02:00
Misha Bragin f0d893c689 Support user role update (#82) 2022-09-23 14:21:59 +02:00
Misha Bragin c8339c4be1 Peers auto-tagging with users and predefined groups (#77) 2022-09-22 10:19:53 +02:00
Misha Bragin 954d697b5f Add Access Token hook to return valid token (#81) 2022-09-19 13:11:07 +02:00
Maycon Santos ace2bb61ef Fix popover for groups (#78)
* Fix popover for groups

Fixed all popover overlay when opening
update modal

also fixed group input size problem
 with peers update

* remove style display flex from form tittle
2022-09-15 22:24:20 +05:00
Misha Bragin f389862931 Support Auto Groups when updating setup keys (#75) 2022-09-13 17:51:05 +02:00
braginini 521df658ad Shorten the banner text 2022-09-13 11:01:19 +02:00
Maycon Santos 4db17c119a enable new route update 2022-09-08 10:51:36 +02:00
Maycon Santos 230a4cb05e Group network routes by identifier and range (#73)
* fix missing peer when disabling route

and passing peer to modal view

* group rows by HA routes

* Adjust high availability and show fields disabled

* add groupedRoutes to GroupedDataTable

* remove unused fields

* filter by grouped routes

* group routes by network id and network

* use better check for save button
2022-09-08 09:26:38 +02:00
braginini 06316239de Fix routes docs link 2022-09-05 19:45:14 +02:00
braginini 59eff85339 Fix routes docs link 2022-09-05 19:44:49 +02:00
braginini ffabdf8a1a Add new release banner 2022-09-05 19:09:43 +02:00
Maycon Santos 0fe5aa13b1 Rename Network range and enable masquerade by default (#72) 2022-09-05 16:13:01 +02:00
Maycon Santos 7166eb6e2f Network Routes page (#71)
Add Network routes page to interact with the routes API endpoint of our management
2022-09-05 09:08:51 +02:00
Misha Bragin c9f1955d6a Fix ACL modal groups input fields width (#69) 2022-08-22 15:27:52 +02:00
Misha Bragin c3236d05a1 Fix Auth0 OIDC integration 2022-08-17 20:38:52 +02:00
Misha Bragin 25e8a52465 Refactor to generic OIDC config (#66)
Cleans up config.json providing generic OIDC properties.
This allows for using other IDP providers besides Auth0.
The change is backward compatible with the previous versions.
2022-08-15 19:32:01 +02:00
Maycon Santos 2b26198741 As user to refresh page on 401 (#65)
* As user to refresh page on 401

* replace status code string
2022-08-04 20:42:16 +02:00
Maycon Santos 2b359b2140 Update dependencies to resolve issue with mobile (#64)
* Update dependencies to resolve issue with mobile

* ensure min rc-overflow fixes the issue with mobile
2022-08-03 16:48:24 +02:00
Maycon Santos d71d8214e7 Disable service worker (#63)
Service has caused some bugs where
the trust domains were ignored
and api calls were done without proper credentials
2022-08-03 09:44:46 +02:00
braginini 321e4d8311 Remove banner 2022-08-01 13:32:28 +02:00
Maycon Santos 224a889de3 Parse API URL when using default 443 and 80 ports (#62)
Init scripts will remove ports for replacement when the user
provided default HTTP and HTTPS ports.

This was causing issues with trusted domain logic from the OIDC library.
2022-07-27 11:09:45 +02:00
Maycon Santos b59865ae05 Replace Auth0 SDK with axa-fr/react-oidc (#60)
Replacing Auth0's SDK with a more generic implementation of an OIDC client.
This will allow us to use other IDP providers that follow the OIDC standards.
2022-07-26 16:13:08 +02:00
Maycon Santos 54cd75301c Add rename peer (#59)
Added View option in the menu

Click on name to open the peer View option
2022-07-14 10:37:33 +02:00
braginini 1623dd243a Add access control banner 2022-06-24 22:43:23 +02:00
Misha Bragin cf0abd3029 Enable/Disable SSH server in the peers table (#54) 2022-06-23 17:01:40 +02:00
Misha Bragin 5bc913ff74 Make footer sticky (#56)
* Make footer sticky

* Fix footer positioning
2022-06-22 15:15:13 +02:00
Sang Woo Bae 0260dd5ce3 Link to documentation in installpage (#57)
* Link to documentation in installpage

* Add Documentation link for other distros

* Fix OS autodetection

* Reorder AddPeer tabs and add other tab
2022-06-22 14:36:40 +02:00
Maycon Santos aad85a1f67 Validate tag input and handle popover for 5+ groups (#55)
Validate tag naming input

check if only spaces has been added
check if group All is being removed
group All is not closeable in peers

Fixed issue when group list is too large, 
preventing click on the group counter

removed arrows from rule inputs
2022-06-20 17:07:59 +02:00
6724e5bfaa Feature/access control (#49)
Add Access control feature page

Users can create and update access control rules from the UI

Users can assign groups to peers

Minor enhancements to the UI

Co-authored-by: Raphael Oliveira <raphael.oliveira@dataontabs.com>
Co-authored-by: DataOnTabs <68952619+dataontabs@users.noreply.github.com>
Co-authored-by: mlsmaycon <mlsmaycon@gmail.com>
2022-06-15 11:42:15 +02:00
braginini 4e78fabb35 Update images size in README 2022-06-12 09:07:53 +02:00
braginini c4d679a371 Update readme and media 2022-06-12 09:06:47 +02:00
braginini 48d25a0008 Correct wording for popups 2022-06-08 12:15:04 +02:00
braginini a65b892441 Fix windows download 2022-06-08 00:19:03 +02:00
braginini 32e06013e9 Fix Try Again btn on auth error 2022-06-07 18:01:58 +02:00
braginini 0334899719 Add logout button on error 2022-06-07 16:26:16 +02:00
braginini 48e6041fd6 Don't log out when email not confirmed 2022-06-07 14:41:58 +02:00
braginini 72e24b8330 Add custom page for auth errors 2022-06-07 12:05:29 +02:00
Misha Bragin 665e6191ea Dynamically fetch the latest release of NetBird on startup (#52) 2022-06-06 13:44:18 +02:00
braginini e62e8a00f8 Detect OS to select installation Tab 2022-06-05 16:35:03 +02:00
braginini 4d3bd0c99d Detect OS to select installation Tab 2022-06-05 13:22:49 +02:00
009933c0e2 Refactor with ant design and TypeScript (#51)
Refactoring UI using ant design

This will allow us to move forward faster because of its popularity

We also rewrote the code in TypeScript, 
we believe this is also a major step moving forward 
with the project as it brings more struct and clear/clean code. 

Co-authored-by: Raphael Oliveira <raphael.oliveira@dataontabs.com>
Co-authored-by: braginini <bangvalo@gmail.com>
2022-06-01 22:44:06 +02:00
Misha Bragin a6ec8ed865 Add tag/policy image 2022-05-30 19:45:26 +02:00
braginini 70739f643e Fix Nginx script to properly replace config envs 2022-05-28 20:15:53 +02:00
braginini 9030c42fd0 Fix netbird envs 2022-05-28 20:08:51 +02:00
braginini 25026a7212 Fix netbird envs 2022-05-28 19:54:57 +02:00
Maycon Santos ba4fcf3266 update v0.6.1 (#48) 2022-05-28 11:03:10 +02:00
braginini 21e3164547 Fix mobile view of AddPeer 2022-05-26 21:46:16 +02:00
braginini 68ebf3d8e5 Remove SetupKeys from AddPeer 2022-05-26 20:45:20 +02:00
braginini 292635fd59 Fix AddPeer layout 2022-05-26 20:41:57 +02:00
Misha Bragin 0a04b11413 Update AddPeer tab (#47) 2022-05-26 20:29:36 +02:00
braginini b647155b6a Update Windows installation 2022-05-26 19:31:45 +02:00
braginini 92a5da88b6 Fix Peer table corners 2022-05-19 09:14:49 +02:00
braginini 894f5bd265 Fix error on Peers list 2022-05-19 09:11:32 +02:00
braginini d401c08199 Fix Banner link and dismiss btn 2022-05-19 09:11:05 +02:00
braginini 4e24be067e Change color of the buttons to indigo-500 2022-05-14 17:44:03 +02:00
braginini ae48f73acc Add SetupKey filter and search 2022-05-08 23:10:12 +02:00
shatoboar 00168e80ac User list tab (#44)
The new user tab displays a table of users
that belong to the account.
2022-05-05 10:56:37 +02:00
DataOnTabs d654300c66 Force menu right 6 and bottom 0 (#45) 2022-05-04 17:41:07 +02:00
dependabot[bot] db80211470 Bump ejs from 3.1.6 to 3.1.7 (#43)
Bumps [ejs](https://github.com/mde/ejs) from 3.1.6 to 3.1.7.
- [Release notes](https://github.com/mde/ejs/releases)
- [Changelog](https://github.com/mde/ejs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mde/ejs/compare/v3.1.6...v3.1.7)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-03 10:39:33 +02:00
Misha Bragin 1631025da8 Fix recent vulnerabilities (#42) 2022-05-02 10:11:14 +02:00
Maycon SantosandRaphael Oliveira 0280ddfdf3 Feature/peers table layout on mobile (#40)
Co-authored-by: Raphael Oliveira <raphael.oliveirarm@gmail.com>
2022-04-25 17:06:04 +02:00
Misha Bragin 7905324257 Fix sign out btn not visible when error loading pic (#41) 2022-04-25 16:53:09 +02:00
Oluchukwu Vivian Obiako 6da38bee3c Implement search and filter (#37) 2022-04-07 14:34:39 +02:00
Oluchukwu Vivian ObiakoandMisha Bragin f11aff792d Implement Search & Filter #25 (#36)
Add React-Table library replacing the default table.
Integrated a search function by name.
Added sorting by Name and LastSeen

Co-authored-by: Misha Bragin <bangvalo@gmail.com>
2022-04-06 19:17:22 +02:00
braginini ed82212e77 Remove craco to fix vulnerabilities 2022-04-03 17:08:07 +02:00
braginini e131ded7a2 Simplify peers list state code 2022-04-03 14:45:29 +02:00
braginini b6903fdfe4 Change pagination to show peers in table counts 2022-04-03 14:43:41 +02:00
braginini 33402b1cab Fix some dependencies 2022-04-03 13:32:26 +02:00
dependabot[bot] d5c9275df8 chore(deps): bump follow-redirects from 1.13.1 to 1.14.9 (#35)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.13.1 to 1.14.9.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.13.1...v1.14.9)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-03 13:18:50 +02:00
dependabot[bot] 245f02238a chore(deps): bump postcss from 7.0.35 to 7.0.36 (#34)
Bumps [postcss](https://github.com/postcss/postcss) from 7.0.35 to 7.0.36.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/7.0.35...7.0.36)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-03 13:18:36 +02:00
dependabot[bot] e6f04082be chore(deps): bump minimist from 1.2.5 to 1.2.6 (#33)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-03 13:18:19 +02:00
dependabot[bot] 32d884fd25 chore(deps): bump url-parse from 1.4.7 to 1.5.10 (#32)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.4.7 to 1.5.10.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.4.7...1.5.10)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-03 13:17:59 +02:00
dependabot[bot] dedf6f3b40 chore(deps): bump nanoid from 3.1.25 to 3.3.2 (#31)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.25 to 3.3.2.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.1.25...3.3.2)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-03 13:17:34 +02:00
braginini 01c175a186 Remove unused code 2022-04-03 13:09:05 +02:00
braginini ce91e30209 Correct minor warning 2022-04-03 12:59:57 +02:00
braginini cd9dd01680 Show total number of peers in pagination 2022-04-03 12:39:36 +02:00
braginini b1b772b033 Show empty table when all peers are offline 2022-04-03 12:31:42 +02:00
braginini f9d1c4f9fd Add Peer Status filter - show All or Online 2022-04-03 12:04:59 +02:00
braginini 41e5bd0f4f Add user email to the user menu 2022-04-03 11:10:42 +02:00
braginini 24c3a1636d Fix Sign out theme and peer list theme bugs 2022-04-03 11:02:57 +02:00
Misha Bragin 5ed823ddb1 Change Delete/Revoke Dialogs theme (#30) 2022-04-01 17:41:02 +02:00
braginini 11d12a61b5 Apply Default theme to table Edit button 2022-04-01 17:36:29 +02:00
braginini 86aabb31c5 Apply Default theme to New Key dialog buttons 2022-04-01 17:34:54 +02:00
Misha Bragin dd0aaa63e9 New UI theme - Default Tailwind (#29)
This PR adds a default Tailwind UI theme
to make the admin panel cleaner
2022-04-01 17:28:49 +02:00
Maycon Santos a1296ef21b Update index description (#28) 2022-03-27 08:01:48 +02:00
Ashutosh Kumar 8e2b87c2bc Update in command for Windows for v0.5 (#26) 2022-03-26 12:46:30 +01:00
braginini ebf5941e26 Add announcement banner and new logo 2022-03-26 11:56:10 +01:00
braginini 0af911cfce Add announcement banner and new logo 2022-03-26 11:54:36 +01:00
mlsmaycon 7806e482e9 update blog url 2022-03-26 08:58:32 +01:00
Maycon Santos a17caaf86e Rebranding first step (#24) 2022-03-25 17:15:15 +01:00
shatoboar e2335d0454 Switch to mono fonts for buttons (#23) 2022-03-25 16:37:51 +01:00
shatoboar 2fb5b3d60b Paginationbar in peerslist changed to buttons (#22) 2022-03-25 15:36:08 +01:00
Misha Bragin 67199a1394 Decrease amount of peers show in the list to 15 2022-03-25 15:06:07 +01:00
shatoboar 0206212282 Pagination for Peerlist (#21)
Previously all peers used to be displayed on a single page.
This change aims to improve the usability of the Peers page
by paginating the peer list.
By default 25 peers will be shown per page,
and there will be 5 pages shown in the pagination bar per default.
The current page shown will be centered in the bar shown below.
2022-03-25 14:48:21 +01:00
Misha Bragin 856a2e1264 Add WIRETRUSTEE_MGMT_GRPC_API_ENDPOINT endpoint to display in the UI (#20) 2022-03-21 16:39:32 +01:00
shatoboar a6706f67d5 shows client version under peers section 2022-02-14 17:25:22 +01:00
Maycon Santos 1411eeff25 use require config with conditional load of config file (#16)
* user require config with conditional load of config file

* remove comment

* add local dev doc
2021-12-31 09:57:34 +01:00
Maycon Santos 6fad55b4cb Fixx cron (#15)
* fix crontab filename and expression

* log to stdout
2021-12-20 16:45:33 +01:00
Maycon Santos 96a9f581de arm builds (#13)
* arm builds

* remove temp branch build
2021-11-07 12:26:34 +01:00
braginini 95a2765e67 chore: move default expiration to client side 2021-10-31 12:02:10 +01:00
braginini dfb3a36ff5 chore: align New Key button with the table 2021-10-28 18:29:40 +02:00
Mikhail Bragin 5c59fae816 chore: rename peer connection status to avoid confusion (#11) 2021-10-28 18:18:29 +02:00
Mikhail Bragin fe83a1d2dd add setup key button (#10)
* feature: add setup key logic
2021-10-28 18:16:03 +02:00
braginini 9fa6166b0e Merge remote-tracking branch 'origin/main' 2021-10-26 21:32:05 +02:00
braginini 483e119f1f chore: simplify installation steps (only up command) 2021-10-26 21:31:54 +02:00
Mikhail Bragin ea65ea3bc2 Update README.md 2021-09-26 20:04:38 +02:00
braginini bab12f1c33 chore: update Linux repo - AddPeer steps 2021-09-26 20:01:46 +02:00
braginini 936644f06d chore: support management with no ssl 2021-09-25 12:58:44 +02:00
braginini ebd2ef11ec chore: add LICENSE 2021-09-24 15:38:31 +02:00
braginini 0e826f18a1 Merge remote-tracking branch 'origin/main' 2021-09-24 15:37:36 +02:00
braginini a4290e5a5b chore: upgrade insecure requests 2021-09-24 15:37:29 +02:00
Mikhail Bragin 387cc00688 Update README.md 2021-09-12 20:27:21 +02:00
Mikhail Bragin a201cc58c2 Update README.md 2021-09-12 20:25:43 +02:00
Mikhail Bragin 7cdeaca60d add How to Run 2021-09-12 20:24:49 +02:00
braginini 81e35777c5 chore: add service install steps for mac 2021-09-07 19:05:43 +02:00
braginini 8585d06f91 chore: update warning 2021-09-07 18:33:02 +02:00
braginini b7cc68f43a chore: remove unnecessary mac step 2021-09-07 18:28:30 +02:00
braginini 0fd4776666 chore: add Windows release notes 2021-09-07 10:58:49 +02:00
braginini 8932d06bc3 chore: simplify Add peer steps 2021-09-06 15:03:59 +02:00
Maycon Santos 7586b1a909 set init cert properties 2021-09-05 10:12:57 +02:00
Mikhail Bragin 5332c53571 docs: resize images 2021-09-03 15:31:24 +02:00
braginini e33618c546 docs: add dahsboard screenshots 2021-09-03 15:25:39 +02:00
Mikhail Bragin 4a649ab046 docs: update readme 2021-09-03 15:20:07 +02:00
braginini 99fa0fb4ac initial commit 2021-09-03 15:00:54 +02:00
187 changed files with 30474 additions and 27305 deletions

No files matched your search

+56
View File
@@ -0,0 +1,56 @@
name: build and push
on:
push:
branches:
- main
tags:
- "**"
pull_request:
jobs:
build_n_push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: setup-node
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'npm'
- name: Install dependecies
run: npm install
- name: Build
# skiping fail on warning for now
run: CI=false npm run build
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: wiretrustee/dashboard
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
-
name: Docker build and push
uses: docker/build-push-action@v3
with:
context: .
file: docker/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64,linux/arm
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
-59
View File
@@ -1,59 +0,0 @@
name: build and release
on:
push:
branches:
- main
tags:
- "**"
jobs:
build_n_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: setup-node
uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
- name: install dependecies
run: npm install
- name: load auth_config.json
run: echo '${{ secrets.AUTH_CONFIG }}' > src/auth_config.json
- name: buid
# skiping fail on warning for now
run: CI=false npm run build
- name: archive
run: tar zvcf build.tgz build
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v5.6
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
release_branches: none
pre_release_branches: main
dry_run: ${{ startsWith(github.ref, 'refs/tags/') }} # dry run if tag and generate output
- uses: haya14busa/action-cond@v1
id: condval
with:
cond: ${{ startsWith(github.ref, 'refs/tags/') }}
if_true: "${{ github.ref }}"
if_false: "${{ steps.tag_version.outputs.new_tag }}"
- name: Use conditional value
run: echo "${{ steps.condval.outputs.value }}"
- name: Release
uses: softprops/action-gh-release@v1
with:
files: build.tgz
prerelease: ${{ !startsWith(github.ref, 'refs/tags/') }}
tag_name: ${{ steps.condval.outputs.value }}
+6
View File
@@ -2,6 +2,7 @@
# dependencies
/node_modules
/node_modules.bkp
/.pnp
.pnp.js
@@ -23,3 +24,8 @@ yarn-debug.log*
yarn-error.log*
src/auth_config.json
.idea
.eslintcache
src/.local-config.json
/public/OidcServiceWorker.js
/public/OidcTrustedDomains.js
-8
View File
@@ -1,8 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/
-8
View File
@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/wiretrustee-ui.iml" filepath="$PROJECT_DIR$/.idea/wiretrustee-ui.iml" />
</modules>
</component>
</project>
Generated
-6
View File
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
-8
View File
@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
+2
View File
@@ -0,0 +1,2 @@
Mikhail Bragin (https://github.com/braginini)
Maycon Santos (https://github.com/mlsmaycon)
+13
View File
@@ -0,0 +1,13 @@
BSD 3-Clause License
Copyright (c) 2021 Wiretrustee AUTHORS
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+61 -53
View File
@@ -1,70 +1,78 @@
# Getting Started with Create React App
# NetBird dashboard
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
This project is the UI for NetBird's Management service.
## Available Scripts
**Hosted version:** https://app.netbird.io/
In the project directory, you can run:
See [NetBird repo](https://github.com/netbirdio/netbird)
### `npm start`
## Why?
Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The purpose of this project is simple - make it easy to manage VPN built with [NetBird](https://github.com/netbirdio/netbird).
The dashboard makes it possible to:
- track the status of your peers
- remove peers
- manage Setup Keys (to authenticate new peers)
- list users
- define access controls
The page will reload if you make edits.\
You will also see any lint errors in the console.
## Some Screenshots
<img src="./media/auth.png" alt="auth"/>
<img src="./media/peers.png" alt="peers"/>
<img src="./media/add-peer.png" alt="add-peer"/>
### `npm test`
Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
## Technologies Used
### `npm run build`
- ReactJS
- AntD UI framework
- Auth0
- Nginx
- Docker
- Let's Encrypt
Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
## How to run
Disclaimer. We believe that proper user management system is not a trivial task and requires quite some effort to make it right. Therefore we decided to
use Auth0 service that covers all our needs (user management, social login, JTW for the management API).
Auth0 so far is the only 3rd party dependency that can't be really self-hosted.
The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!
1. Install [Docker](https://docs.docker.com/get-docker/)
2. Register [Auth0](https://auth0.com/) account
3. Running Wiretrustee UI Dashboard requires the following Auth0 environmental variables to be set (see docker command below):
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
`AUTH0_DOMAIN` `AUTH0_CLIENT_ID` `AUTH0_AUDIENCE`
### `npm run eject`
To obtain these, please use [Auth0 React SDK Guide](https://auth0.com/docs/quickstart/spa/react/01-login#configure-auth0) up until "Configure Allowed Web Origins"
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
4. Wiretrustee UI Dashboard uses Wiretrustee Management Service HTTP API, so setting `NETBIRD_MGMT_API_ENDPOINT` is required. Most likely it will be `http://localhost:33071` if you are hosting Management API on the same server.
5. Run docker container without SSL (Let's Encrypt):
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
```shell
docker run -d --name wiretrustee-dashboard \
--rm -p 80:80 -p 443:443 \
-e AUTH0_DOMAIN=<SET YOUR AUTH DOMAIN> \
-e AUTH0_CLIENT_ID=<SET YOUR CLIENT ID> \
-e AUTH0_AUDIENCE=<SET YOUR AUDIENCE> \
-e NETBIRD_MGMT_API_ENDPOINT=<SET YOUR MANAGEMETN API URL> \
wiretrustee/dashboard:main
```
6. Run docker container with SSL (Let's Encrypt):
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
```shell
docker run -d --name wiretrustee-dashboard \
--rm -p 80:80 -p 443:443 \
-e NGINX_SSL_PORT=443 \
-e LETSENCRYPT_DOMAIN=<YOUR PUBLIC DOMAIN> \
-e LETSENCRYPT_EMAIL=<YOUR EMAIL> \
-e AUTH0_DOMAIN=<SET YOUR AUTH DOMAIN> \
-e AUTH0_CLIENT_ID=<SET YOUR CLEITN ID> \
-e AUTH0_AUDIENCE=<SET YOUR AUDIENCE> \
-e NETBIRD_MGMT_API_ENDPOINT=<SET YOUR MANAGEMETN API URL> \
wiretrustee/dashboard:main
```
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
## Learn More
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
### Code Splitting
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
### Analyzing the Bundle Size
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
### Making a Progressive Web App
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
### Advanced Configuration
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
### Deployment
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
## How to run local development
1. Install node 16
2. create and update the `src/.local-config.json` file. This file should contain values to be replaced from `src/config.json`
3. run `npm install`
4. run `npm run start dev`
+24
View File
@@ -0,0 +1,24 @@
FROM alpine:3.14
RUN apk add --no-cache bash curl less ca-certificates git tzdata zip gettext \
nginx curl supervisor certbot-nginx && \
rm -rf /var/cache/apk/* && mkdir -p /run/nginx
STOPSIGNAL SIGINT
EXPOSE 80
EXPOSE 443
ENTRYPOINT ["/usr/bin/supervisord","-c","/etc/supervisord.conf"]
WORKDIR /usr/share/nginx/html
# copy configuration files
COPY docker/default.conf /etc/nginx/http.d/default.conf
COPY docker/nginx.conf /etc/nginx/nginx.conf
COPY docker/init_cert.sh /usr/local/init_cert.sh
COPY docker/init_react_envs.sh /usr/local/init_react_envs.sh
RUN chmod +x /usr/local/init_cert.sh && rm /etc/crontabs/root
RUN chmod +x /usr/local/init_react_envs.sh
# configure supervisor
COPY docker/supervisord.conf /etc/supervisord.conf
# copy build files
COPY build/ /usr/share/nginx/html/
+23
View File
@@ -0,0 +1,23 @@
# Wiretrustee Dashboard
Wiretrustee Dashboard is a the Wiretrustee Managemenet server UI. It allow users to signin, view setup keys and manage peers. This image is **not ready** for production use.
## Tags
```latest``` ```vX.X.X``` not available yet.
```main``` builded on every PR being merged to the repository
## How to use this image
HTTP run:
```shell
docker run -d --rm -p 80:80 wiretrustee/dashboard:main
```
Using SSL certificate from Let's Encript®:
```shell
docker run -d --rm -p 80:80 -p 443:443 \
-e LETSENCRYPT_DOMAIN=app.mydomain.com \
-e LETSENCRYPT_EMAIL=hello@mydomain.com \
wiretrustee/dashboard:main
```
> For SSL generation, you need to run this image in a server with proper public IP and a domain name pointing to it.
## Environment variables
* ```NGINX_SSL_PORT``` Changes the port that Nginx listens to. Defaults to ```443```
* ```LETSENCRYPT_DOMAIN``` Enables Certbot`s client execution for the specified domain. Defaults to ```none```
* ```LETSENCRYPT_EMAIL``` Email used in Certbot`s client execution to register the certificate request. Defaults to ```example@local```
+16
View File
@@ -0,0 +1,16 @@
# simple server configuration to replace nginx's default
server {
listen 80 default_server;
listen [::]:80 default_server;
root /usr/share/nginx/html;
location / {
try_files $uri /index.html;
}
# You may need this to prevent return 404 recursion.
location = /404.html {
internal;
}
}
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
set -ex
LETSENCRYPT_DOMAIN=${LETSENCRYPT_DOMAIN:-"none"}
LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL:-"example@local"}
NGINX_SSL_PORT=${NGINX_SSL_PORT:-443}
# If no domain is provided, skip certbot execution and configuration
if [ "${LETSENCRYPT_DOMAIN}-x" == "none-x" ]; then
exit 0
fi
# Request a certificate
# this also updates the nginx config file with new SSL entries
certbot -n --nginx --agree-tos --email ${LETSENCRYPT_EMAIL} -d ${LETSENCRYPT_DOMAIN} --https-port ${NGINX_SSL_PORT}
# Add cron job file
cat <<EOF >/etc/crontabs/root
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
0 */12 * * * certbot -q renew --nginx --https-port ${NGINX_SSL_PORT}
EOF
# start cron daemon
supervisorctl start cron
+67
View File
@@ -0,0 +1,67 @@
#!/bin/bash
set -e
if [[ -z "${AUTH_AUTHORITY}" ]]; then
if [[ -z "${AUTH0_DOMAIN}" ]]; then
echo "AUTH_AUTHORITY or AUTH0_DOMAIN environment variable must be set"
exit 1
fi
fi
if [[ -z "${AUTH_CLIENT_ID}" ]]; then
if [[ -z "${AUTH0_CLIENT_ID}" ]]; then
echo "AUTH_CLIENT_ID or AUTH0_CLIENT_ID environment variable must be set"
exit 1
fi
fi
if [[ -z "${AUTH_AUDIENCE}" ]]; then
if [[ -z "${AUTH0_AUDIENCE}" ]]; then
echo "AUTH_AUDIENCE or AUTH0_AUDIENCE environment variable must be set"
exit 1
fi
fi
if [[ -z "${AUTH_SUPPORTED_SCOPES}" ]]; then
if [[ -z "${AUTH0_DOMAIN}" ]]; then
echo "AUTH_SUPPORTED_SCOPES environment variable must be set"
exit 1
fi
fi
if [[ -z "${USE_AUTH0}" ]]; then
if [[ -z "${AUTH0_DOMAIN}" ]]; then
echo "USE_AUTH0 environment variable must be set"
exit 1
fi
fi
if [[ -z "${NETBIRD_MGMT_API_ENDPOINT}" ]]; then
echo "NETBIRD_MGMT_API_ENDPOINT environment variable must be set"
exit 1
fi
export AUTH_AUTHORITY=${AUTH_AUTHORITY:-https://$AUTH0_DOMAIN}
export AUTH_CLIENT_ID=${AUTH_CLIENT_ID:-$AUTH0_CLIENT_ID}
export AUTH_AUDIENCE=${AUTH_AUDIENCE:-$AUTH0_AUDIENCE}
export AUTH_REDIRECT_URI=${AUTH_REDIRECT_URI}
export AUTH_SILENT_REDIRECT_URI=${AUTH_SILENT_REDIRECT_URI}
export USE_AUTH0=${USE_AUTH0:-true}
export AUTH_SUPPORTED_SCOPES=${AUTH_SUPPORTED_SCOPES:-openid profile email api offline_access email_verified}
export NETBIRD_MGMT_API_ENDPOINT=$(echo $NETBIRD_MGMT_API_ENDPOINT | sed -E 's/(:80|:443)$//')
export NETBIRD_MGMT_GRPC_API_ENDPOINT=${NETBIRD_MGMT_GRPC_API_ENDPOINT}
export NETBIRD_HOTJAR_TRACK_ID=${NETBIRD_HOTJAR_TRACK_ID}
export NETBIRD_TOKEN_SOURCE=${NETBIRD_TOKEN_SOURCE:-accessToken}
echo "NetBird latest version: ${NETBIRD_LATEST_VERSION}"
# replace ENVs in the config
ENV_STR="\$\$USE_AUTH0 \$\$AUTH_AUDIENCE \$\$AUTH_AUTHORITY \$\$AUTH_CLIENT_ID \$\$AUTH_SUPPORTED_SCOPES \$\$NETBIRD_MGMT_API_ENDPOINT \$\$NETBIRD_MGMT_GRPC_API_ENDPOINT \$\$NETBIRD_HOTJAR_TRACK_ID \$\$AUTH_REDIRECT_URI \$\$AUTH_SILENT_REDIRECT_URI \$\$NETBIRD_TOKEN_SOURCE"
MAIN_JS=$(find /usr/share/nginx/html/static/js/main.*js)
OIDC_TRUSTED_DOMAINS="/usr/share/nginx/html/OidcTrustedDomains.js"
cp "$MAIN_JS" "$MAIN_JS".copy
envsubst "$ENV_STR" < "$MAIN_JS".copy > "$MAIN_JS"
envsubst "$ENV_STR" < "$OIDC_TRUSTED_DOMAINS".tmpl > "$OIDC_TRUSTED_DOMAINS"
rm "$MAIN_JS".copy
+142
View File
@@ -0,0 +1,142 @@
# /etc/nginx/nginx.conf
daemon off;
user nginx;
# Set number of worker processes automatically based on number of CPU cores.
worker_processes auto;
# Enables the use of JIT for regular expressions to speed-up their processing.
pcre_jit on;
# Configures default error logger.
error_log /proc/self/fd/2 warn;
# Includes files with directives to load dynamic modules.
include /etc/nginx/modules/*.conf;
# Uncomment to include files with config snippets into the root context.
# NOTE: This will be enabled by default in Alpine 3.15.
#include /etc/nginx/conf.d/*.conf;
events {
# The maximum number of simultaneous connections that can be opened by
# a worker process.
worker_connections 1024;
multi_accept on;
}
http {
# Includes mapping of file name extensions to MIME types of responses
# and defines the default type.
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Name servers used to resolve names of upstream servers into addresses.
# It's also needed when using tcpsocket and udpsocket in Lua modules.
#resolver 1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001;
# Don't tell nginx version to the clients. Default is 'on'.
server_tokens off;
# Specifies the maximum accepted body size of a client request, as
# indicated by the request header Content-Length. If the stated content
# length is greater than this size, then the client receives the HTTP
# error code 413. Set to 0 to disable. Default is '1m'.
client_max_body_size 1m;
# Sendfile copies data between one FD and other from within the kernel,
# which is more efficient than read() + write(). Default is off.
sendfile on;
# Causes nginx to attempt to send its HTTP response head in one packet,
# instead of using partial frames. Default is 'off'.
tcp_nopush on;
# Enables the specified protocols. Default is TLSv1 TLSv1.1 TLSv1.2.
# TIP: If you're not obligated to support ancient clients, remove TLSv1.1.
ssl_protocols TLSv1.2 TLSv1.3;
# Path of the file with Diffie-Hellman parameters for EDH ciphers.
# TIP: Generate with: `openssl dhparam -out /etc/ssl/nginx/dh2048.pem 2048`
#ssl_dhparam /etc/ssl/nginx/dh2048.pem;
# Specifies that our cipher suits should be preferred over client ciphers.
# Default is 'off'.
ssl_prefer_server_ciphers on;
# Enables a shared SSL cache with size that can hold around 8000 sessions.
# Default is 'none'.
ssl_session_cache shared:SSL:2m;
# Specifies a time during which a client may reuse the session parameters.
# Default is '5m'.
ssl_session_timeout 1h;
# Disable TLS session tickets (they are insecure). Default is 'on'.
ssl_session_tickets off;
# Enable gzipping of responses.
gzip on;
# Set the Vary HTTP header as defined in the RFC 2616. Default is 'off'.
gzip_vary on;
# General gzip configurations
gzip_proxied any;
gzip_comp_level 9;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_disable "msie6";
# Compress the following MIME types.
gzip_types
application/atom+xml
application/javascript
application/x-javascript
application/json
application/ld+json
application/manifest+json
application/rss+xml
application/vnd.geo+json
application/vnd.ms-fontobject
application/x-font-ttf
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/bmp
image/svg+xml
image/x-icon
text/cache-manifest
text/css
text/javascript
text/plain
text/vcard
text/vnd.rim.location.xloc
text/vtt
text/x-component
text/x-cross-domain-policy;
# Helper variable for proxying websockets.
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
# Specifies the main log format.
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
# Sets the path, format, and configuration for a buffered log write.
access_log /proc/self/fd/1 main;
# Includes virtual hosts configs.
include /etc/nginx/http.d/*.conf;
}
# TIP: Uncomment if you use stream module.
#include /etc/nginx/stream.conf;
+77
View File
@@ -0,0 +1,77 @@
[unix_http_server]
file=/var/run/supervisor.sock
chmod=0700
username = dummy
password = dummy
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock
username = dummy
password = dummy
[supervisord]
nodaemon=true
user=root
pidfile=/run/supervisord.pid
logfile=/proc/self/fd/1
logfile_maxbytes=0
loglevel=warn
[program:cron]
command=crond -f -d 8
user=root
priority=101
numprocs=1
autostart=0
autorestart=true
stdout_logfile=/proc/self/fd/1
stdout_logfile_maxbytes=0
stderr_logfile=/proc/self/fd/2
stderr_logfile_maxbytes=0
[program:nginx]
command=/usr/sbin/nginx
user=root
priority=100
numprocs=1
autostart=1
autorestart=true
stdout_logfile=/proc/self/fd/1
stdout_logfile_maxbytes=0
stderr_logfile=/proc/self/fd/2
stderr_logfile_maxbytes=0
[program:init_cert]
command=/usr/local/init_cert.sh
user=root
numprocs=1
autostart=1
autorestart=false
startretries=1
priority=200
stdout_logfile=/proc/self/fd/1
stdout_logfile_maxbytes=0
stderr_logfile=/proc/self/fd/2
stderr_logfile_maxbytes=0
[program:init_react_envs]
command=/usr/local/init_react_envs.sh
user=root
numprocs=1
autostart=1
autorestart=false
startretries=1
priority=201
stdout_logfile=/proc/self/fd/1
stdout_logfile_maxbytes=0
stderr_logfile=/proc/self/fd/2
stderr_logfile_maxbytes=0
Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Loaded 20 of 187 files, more files were not shown because too many files have changed in this diff. Show more