diff --git a/README.md b/README.md index 4cd4026..59a4ebf 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Web Vault builds for Vaultwarden -[![GitHub Release](https://img.shields.io/github/release/dani-garcia/bw_web_builds.svg)](https://github.com/dani-garcia/bw_web_builds/releases/latest) +[![GitHub Release](https://img.shields.io/github/release/vaultwarden/bw_web_builds.svg)](https://github.com/vaultwarden/bw_web_builds/releases/latest) [![Docker Pulls](https://img.shields.io/docker/pulls/vaultwarden/web-vault.svg)](https://hub.docker.com/r/vaultwarden/web-vault) -[![GPL-3.0 Licensed](https://img.shields.io/github/license/dani-garcia/bw_web_builds.svg)](https://github.com/dani-garcia/bw_web_builds/blob/master/LICENSE.txt) +[![GPL-3.0 Licensed](https://img.shields.io/github/license/vaultwarden/bw_web_builds.svg)](https://github.com/vaultwarden/bw_web_builds/blob/master/LICENSE.txt) [![Matrix Chat](https://img.shields.io/matrix/vaultwarden:matrix.org.svg?logo=matrix)](https://matrix.to/#/#vaultwarden:matrix.org) **This project is not associated with the [Bitwarden](https://bitwarden.com/) project nor Bitwarden, Inc.** @@ -13,7 +13,7 @@
-This is a repository to store the builds of the [Bitwarden web vault](https://github.com/bitwarden/clients/tree/main/apps/web) with the patches to make it work with [Vaultwarden](https://github.com/dani-garcia/vaultwarden) +This is a repository to store the builds of the [Bitwarden web vault](https://github.com/bitwarden/clients/tree/main/apps/web) with the patches to make it work with [Vaultwarden](https://github.com/vaultwarden/vaultwarden) To create a patch you need to modify the original sources from [Bitwarden web vault](https://github.com/bitwarden/clients/tree/main/apps/web) and execute: @@ -58,16 +58,16 @@ make CONTAINER_CMD=podman container-extract ### More information -For more information see: [Install the web-vault](https://github.com/dani-garcia/vaultwarden/wiki/Building-binary#install-the-web-vault) +For more information see: [Install the web-vault](https://github.com/vaultwarden/vaultwarden/wiki/Building-binary#install-the-web-vault) ### Pre-build -The builds are available in the [releases page](https://github.com/dani-garcia/bw_web_builds/releases), and can be replicated with the scripts in this repo. +The builds are available in the [releases page](https://github.com/vaultwarden/bw_web_builds/releases), and can be replicated with the scripts in this repo.
## Get in touch -If you spot any bugs or crashes with Vaultwarden itself, please [create an issue here](https://github.com/dani-garcia/vaultwarden/issues/). Make sure there aren't any similar issues open, though! +If you spot any bugs or crashes with Vaultwarden itself, please [create an issue here](https://github.com/vaultwarden/vaultwarden/issues/). Make sure there aren't any similar issues open, though! -To ask a question, offer suggestions or new features or to get help configuring or installing the software, please use either [GitHub Discussions](https://github.com/dani-garcia/vaultwarden/discussions) or [the forum](https://vaultwarden.discourse.group/). +To ask a question, offer suggestions or new features or to get help configuring or installing the software, please use either [GitHub Discussions](https://github.com/vaultwarden/vaultwarden/discussions) or [the forum](https://vaultwarden.discourse.group/). If you prefer to chat, we're usually hanging around at [#vaultwarden:matrix.org](https://matrix.to/#/#vaultwarden:matrix.org) room on Matrix. Feel free to join us! diff --git a/patches/v2024.5.0.patch b/patches/v2024.5.0.patch index 6b0abfa..18e303a 100644 --- a/patches/v2024.5.0.patch +++ b/patches/v2024.5.0.patch @@ -17,12 +17,13 @@ index 7de0c98cd5..f842ad907b 100644 +++ b/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.ts @@ -120,6 +120,7 @@ export class OrganizationLayoutComponent implements OnInit, OnDestroy { } - + canShowBillingTab(organization: Organization): boolean { + return false; // disable billing tab in Vaultwarden return canAccessBillingTab(organization); } - + + diff --git a/apps/web/src/app/admin-console/organizations/members/components/member-dialog/validators/org-seat-limit-reached.validator.ts b/apps/web/src/app/admin-console/organizations/members/components/member-dialog/validators/org-seat-limit-reached.validator.ts index 8b521e2c17..9112c18195 100644 --- a/apps/web/src/app/admin-console/organizations/members/components/member-dialog/validators/org-seat-limit-reached.validator.ts @@ -42,16 +43,16 @@ index f385583445..c6f08a32e5 100644 @@ -193,11 +193,7 @@ export class PeopleComponent extends BasePeopleComponent { .find((p) => p.organizationId === this.organization.id); this.orgResetPasswordPolicyEnabled = resetPasswordPolicy?.enabled; - + - const billingMetadata = await this.billingApiService.getOrganizationBillingMetadata( - this.organization.id, - ); - - this.orgIsOnSecretsManagerStandalone = billingMetadata.isOnSecretsManagerStandalone; + this.orgIsOnSecretsManagerStandalone = false; // don't get billing metadata - + await this.load(); - + diff --git a/apps/web/src/app/admin-console/organizations/organization-routing.module.ts b/apps/web/src/app/admin-console/organizations/organization-routing.module.ts index 7abee6b0d0..2e3b789b23 100644 --- a/apps/web/src/app/admin-console/organizations/organization-routing.module.ts @@ -89,16 +90,16 @@ index d8091e46ae..7e4947c4bb 100644 +++ b/apps/web/src/app/admin-console/organizations/settings/account.component.ts @@ -93,7 +93,7 @@ export class AccountComponent { ) {} - + async ngOnInit() { - this.selfHosted = this.platformUtilsService.isSelfHost(); + this.selfHosted = false; // set to false so we can rename organizations - + this.route.params .pipe( @@ -195,6 +195,7 @@ export class AccountComponent { } - + submitCollectionManagement = async () => { + return; // flexible collections are not supported by Vaultwarden // Early exit if self-hosted @@ -114,7 +115,7 @@ index 6e2761a9c4..307c54104a 100644 import * as jq from "jquery"; -import { Subject, filter, firstValueFrom, map, switchMap, takeUntil, timeout, timer } from "rxjs"; +import { Subject, filter, firstValueFrom, map, takeUntil, timeout } from "rxjs"; - + import { EventUploadService } from "@bitwarden/common/abstractions/event/event-upload.service"; import { NotificationsService } from "@bitwarden/common/abstractions/notifications.service"; @@ -14,7 +14,6 @@ import { AccountService } from "@bitwarden/common/auth/abstractions/account.serv @@ -126,11 +127,11 @@ index 6e2761a9c4..307c54104a 100644 import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service"; @@ -46,7 +45,6 @@ import { - + const BroadcasterSubscriptionId = "AppComponent"; const IdleTimeout = 60000 * 10; // 10 minutes -const PaymentMethodWarningsRefresh = 60000; // 1 Minute - + @Component({ selector: "app-root", @@ -57,7 +55,6 @@ export class AppComponent implements OnDestroy, OnInit { @@ -138,7 +139,7 @@ index 6e2761a9c4..307c54104a 100644 private isIdle = false; private destroy$ = new Subject(); - private paymentMethodWarningsRefresh$ = timer(0, PaymentMethodWarningsRefresh); - + constructor( @Inject(DOCUMENT) private document: Document, @@ -86,7 +83,6 @@ export class AppComponent implements OnDestroy, OnInit { @@ -180,7 +181,7 @@ index 6e2761a9c4..307c54104a 100644 - ) - .subscribe(); } - + ngOnDestroy() { @@ -287,7 +272,6 @@ export class AppComponent implements OnDestroy, OnInit { this.collectionService.clear(userId), @@ -188,7 +189,7 @@ index 6e2761a9c4..307c54104a 100644 this.biometricStateService.logout(userId), - this.paymentMethodWarningService.clear(), ]); - + await this.stateEventRunnerService.handleEvent("logout", userId); diff --git a/apps/web/src/app/auth/emergency-access/accept/accept-emergency.component.html b/apps/web/src/app/auth/emergency-access/accept/accept-emergency.component.html index 4690a4e63a..9d297671d2 100644 @@ -218,11 +219,11 @@ index 0e29a34278..8beb6c7aab 100644 @@ -51,7 +51,7 @@ - + -
+

{{ "or" | i18n }}

- + plan.type === PlanType.FamiliesAnnually, @@ -289,6 +292,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy { } - + get selectablePlans() { + return null; // no plans to select in Vaultwarden const selectedProductType = this.formGroup.controls.product.value; @@ -331,20 +332,20 @@ index 23d48d93be..e648643504 100644 this.passwordManagerPlans?.filter( @@ -430,10 +434,12 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy { } - + get planOffersSecretsManager() { + return false; // no support for secrets manager in Vaultwarden return this.selectedSecretsManagerPlan != null; } - + changedProduct() { + return; // no choice of products in Vaultwarden const selectedPlan = this.selectablePlans[0]; - + this.setPlanType(selectedPlan.type); @@ -546,7 +552,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy { const orgKeys = await this.cryptoService.makeKeyPair(orgKey[1]); - + if (this.selfHosted) { - orgId = await this.createSelfHosted(key, collectionCt, orgKeys); + orgId = await this.createCloudHosted(key, collectionCt, orgKeys, orgKey[1]); @@ -356,22 +357,22 @@ index 23d48d93be..e648643504 100644 request.initiationPath = "New organization creation in-product"; request.keys = new OrganizationKeysRequest(orgKeys[0], orgKeys[1].encryptedString); + request.planType = PlanType.Free; // always select the free plan in Vaultwarden - + + /* there is no plan to select in Vaultwarden if (this.selectedPlan.type === PlanType.Free) { request.planType = PlanType.Free; } else { @@ -672,6 +680,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy { - + // Secrets Manager this.buildSecretsManagerRequest(request); + end plan selection and no support for secret manager in Vaultwarden */ - + if (this.hasProvider) { const providerRequest = new ProviderOrganizationCreateRequest( @@ -753,6 +762,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy { } - + private upgradeFlowPrefillForm() { + return; // Vaultwarden only supports free plan if (this.acceptingSponsorship) { @@ -384,10 +385,10 @@ index caebb22733..b64392a944 100644 @@ -45,7 +45,7 @@ export class RouterService { .subscribe((event: NavigationEnd) => { this.currentUrl = event.url; - + - let title = i18nService.t("bitWebVault"); + let title = "Vaultwarden Web"; - + if (this.currentUrl.includes("/sm/")) { title = i18nService.t("bitSecretsManager"); diff --git a/apps/web/src/app/core/web-platform-utils.service.ts b/apps/web/src/app/core/web-platform-utils.service.ts @@ -396,22 +397,22 @@ index 02c7c29e34..9fd100024a 100644 +++ b/apps/web/src/app/core/web-platform-utils.service.ts @@ -133,14 +133,17 @@ export class WebPlatformUtilsService implements PlatformUtilsService { } - + isDev(): boolean { + return false; // treat Vaultwarden as production ready return process.env.NODE_ENV === "development"; } - + isSelfHost(): boolean { + return true; // treat Vaultwarden as self hosted return WebPlatformUtilsService.isSelfHost(); } - + static isSelfHost(): boolean { + return true; // treat Vaultwarden as self hosted return process.env.ENV.toString() === "selfhosted"; } - + diff --git a/apps/web/src/app/layouts/frontend-layout.component.html b/apps/web/src/app/layouts/frontend-layout.component.html index 72f0f1f1da..cea0867131 100644 --- a/apps/web/src/app/layouts/frontend-layout.component.html @@ -441,7 +442,7 @@ index e2b3e7910a..fda32e9257 100644 - + @@ -453,7 +454,7 @@ index 62d8b6a075..ec8a14c115 100644 --- a/apps/web/src/app/layouts/product-switcher/product-switcher-content.component.html +++ b/apps/web/src/app/layouts/product-switcher/product-switcher-content.component.html @@ -30,7 +30,7 @@ - +
- {{ "password" | i18n }} {{ "newPassword" | i18n }} - + - + - + - Bitwarden Web Vault + Vaultwarden Web - + @@ -17,7 +17,7 @@ @@ -805,7 +806,7 @@ index 2ba7669290..dfb9e87e26 100644 +++ b/libs/angular/src/auth/components/register.component.ts @@ -106,6 +106,14 @@ export class RegisterComponent extends CaptchaProtectedComponent implements OnIn } - + async submit(showToast = true) { + if (typeof crypto.subtle === "undefined") { + this.platformUtilsService.showToast( @@ -830,7 +831,7 @@ index 00ab2ff717..0950b9d787 100644 - --color-background-alt4: 13 60 119; + --color-background-alt3: 33 37 41; /* bg of menu panel */ + --color-background-alt4: 16 18 21; /* bg of active menu item */ - + /* Can only be used behind the extension refresh flag */ --color-primary-100: 200 217 249; - --color-primary-300: 103 149 232; @@ -841,6 +842,6 @@ index 00ab2ff717..0950b9d787 100644 - --color-primary-700: 18 82 163; + --color-primary-600: 18 82 163; /* color of links and buttons */ + --color-primary-700: 13 60 119; /* hover of links and buttons */ - + --color-secondary-100: 240 240 240; --color-secondary-300: 206 212 220; diff --git a/scripts/build_web_vault.sh b/scripts/build_web_vault.sh index 4177eb0..2c1ba51 100755 --- a/scripts/build_web_vault.sh +++ b/scripts/build_web_vault.sh @@ -29,7 +29,7 @@ npm run dist:oss:selfhost # Create vw-version.json with the latest tag from the remote repo. printf '{"version":"%s"}' \ - "$(git -c 'versionsort.suffix=-' ls-remote --tags --refs --sort='v:refname' https://github.com/dani-garcia/bw_web_builds.git 'v*' | tail -n1 | grep -Eo '[^\/v]*$')" \ + "$(git -c 'versionsort.suffix=-' ls-remote --tags --refs --sort='v:refname' https://github.com/vaultwarden/bw_web_builds.git 'v*' | tail -n1 | grep -Eo '[^\/v]*$')" \ > build/vw-version.json popd diff --git a/scripts/gh_release.sh b/scripts/gh_release.sh index 1daea93..851298d 100755 --- a/scripts/gh_release.sh +++ b/scripts/gh_release.sh @@ -33,7 +33,7 @@ if [[ -n "$GPG_SIGNING_USER" ]]; then fi # Get the latest release tag, this should match the tag created with `gh-prepare` -LATEST_REMOTE_TAG="v$(git -c 'versionsort.suffix=-' ls-remote --tags --refs --sort='v:refname' https://github.com/dani-garcia/bw_web_builds.git 'v*' | tail -n1 | grep -Eo '[^\/v]*$')" +LATEST_REMOTE_TAG="v$(git -c 'versionsort.suffix=-' ls-remote --tags --refs --sort='v:refname' https://github.com/vaultwarden/bw_web_builds.git 'v*' | tail -n1 | grep -Eo '[^\/v]*$')" # Ask for release tag if not provided, or validate the `$LATEST_REMOTE_TAG` if [[ -z "$RELEASE_TAG" ]]; then @@ -65,7 +65,7 @@ while true; do done echo "Extracting tar.gz file from GitHub Container Registry" -${CONTAINER_CMD} create --name "bw_web_${RELEASE_TAG}" "ghcr.io/dani-garcia/bw_web_builds:${RELEASE_TAG}" +${CONTAINER_CMD} create --name "bw_web_${RELEASE_TAG}" "ghcr.io/vaultwarden/bw_web_builds:${RELEASE_TAG}" ${CONTAINER_CMD} cp "bw_web_${RELEASE_TAG}:/bw_web_vault.tar.gz" "bw_web_${RELEASE_TAG}.tar.gz" ${CONTAINER_CMD} rm "bw_web_${RELEASE_TAG}"