diff --git a/apps/web/config/base.json b/apps/web/config/base.json index e64ef6ebeb..b41ca4219d 100644 --- a/apps/web/config/base.json +++ b/apps/web/config/base.json @@ -1,11 +1,5 @@ { "urls": {}, - "stripeKey": "pk_test_KPoCfZXu7mznb9uSCPZ2JpTD", - "braintreeKey": "sandbox_r72q8jq6_9pnxkwm75f87sdc2", - "paypal": { - "businessId": "AD3LAUZSNVPJY", - "buttonAction": "https://www.sandbox.paypal.com/cgi-bin/webscr" - }, "dev": { "port": 8080, "allowedHosts": "auto" diff --git a/apps/web/src/app/admin-console/organizations/create/organization-information.component.html b/apps/web/src/app/admin-console/organizations/create/organization-information.component.html index e0a8006081..789efd9264 100644 --- a/apps/web/src/app/admin-console/organizations/create/organization-information.component.html +++ b/apps/web/src/app/admin-console/organizations/create/organization-information.component.html @@ -12,7 +12,7 @@ - {{ "billingEmail" | i18n }} + {{ "email" | i18n }} diff --git a/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.ts b/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.ts index ec67a17bce..cf28c679a2 100644 --- a/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.ts +++ b/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.ts @@ -186,6 +186,7 @@ export class OrganizationLayoutComponent implements OnInit { } 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/members.component.ts b/apps/web/src/app/admin-console/organizations/members/members.component.ts index 3ce7835404..0455ed8408 100644 --- a/apps/web/src/app/admin-console/organizations/members/members.component.ts +++ b/apps/web/src/app/admin-console/organizations/members/members.component.ts @@ -215,11 +215,7 @@ export class MembersComponent extends BaseMembersComponent .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/settings/account.component.html b/apps/web/src/app/admin-console/organizations/settings/account.component.html index 8ae94b08f5..af2bd35e91 100644 --- a/apps/web/src/app/admin-console/organizations/settings/account.component.html +++ b/apps/web/src/app/admin-console/organizations/settings/account.component.html @@ -16,7 +16,7 @@ - {{ "billingEmail" | i18n }} + {{ "email" | i18n }} diff --git a/apps/web/src/app/admin-console/organizations/settings/account.component.ts b/apps/web/src/app/admin-console/organizations/settings/account.component.ts index 57892442c1..299b336d3f 100644 --- a/apps/web/src/app/admin-console/organizations/settings/account.component.ts +++ b/apps/web/src/app/admin-console/organizations/settings/account.component.ts @@ -103,7 +103,7 @@ export class AccountComponent implements OnInit, OnDestroy { ) {} async ngOnInit() { - this.selfHosted = this.platformUtilsService.isSelfHost(); + this.selfHosted = false; // set to false so we can rename organizations this.configService .getFeatureFlag$(FeatureFlag.LimitItemDeletion) diff --git a/apps/web/src/app/app.component.html b/apps/web/src/app/app.component.html index 471d89be1c..110a55538b 100644 --- a/apps/web/src/app/app.component.html +++ b/apps/web/src/app/app.component.html @@ -3,7 +3,7 @@ when the body has the layout_frontend class. Having this match the index allows for a duplicative yet seamless loading state here for process reloading. -->
- Bitwarden + Vaultwarden
- - diff --git a/apps/web/src/app/auth/settings/two-factor/two-factor-setup-authenticator.component.ts b/apps/web/src/app/auth/settings/two-factor/two-factor-setup-authenticator.component.ts index 030805ed3e..65ee9932db 100644 --- a/apps/web/src/app/auth/settings/two-factor/two-factor-setup-authenticator.component.ts +++ b/apps/web/src/app/auth/settings/two-factor/two-factor-setup-authenticator.component.ts @@ -222,11 +222,11 @@ export class TwoFactorSetupAuthenticatorComponent new window.QRious({ element: document.getElementById("qr"), value: - "otpauth://totp/Bitwarden:" + + "otpauth://totp/Vaultwarden:" + Utils.encodeRFC3986URIComponent(email) + "?secret=" + encodeURIComponent(this.key) + - "&issuer=Bitwarden", + "&issuer=Vaultwarden", size: 160, }); } diff --git a/apps/web/src/app/auth/settings/two-factor/two-factor-setup.component.html b/apps/web/src/app/auth/settings/two-factor/two-factor-setup.component.html index 4206927772..f77d57c05d 100644 --- a/apps/web/src/app/auth/settings/two-factor/two-factor-setup.component.html +++ b/apps/web/src/app/auth/settings/two-factor/two-factor-setup.component.html @@ -46,7 +46,7 @@ {{ "twoStepLoginPolicyUserWarning" | i18n }} - +
diff --git a/apps/web/src/app/billing/organizations/organization-billing-history-view.component.ts b/apps/web/src/app/billing/organizations/organization-billing-history-view.component.ts index d533badabf..6512ecbd13 100644 --- a/apps/web/src/app/billing/organizations/organization-billing-history-view.component.ts +++ b/apps/web/src/app/billing/organizations/organization-billing-history-view.component.ts @@ -54,6 +54,7 @@ export class OrgBillingHistoryViewComponent implements OnInit, OnDestroy { this.loading = true; + /* disable billing history const openInvoicesPromise = this.organizationBillingApiService.getBillingInvoices( this.organizationId, "open", @@ -87,6 +88,7 @@ export class OrgBillingHistoryViewComponent implements OnInit, OnDestroy { openInvoices.length <= pageSize || paidInvoices.length <= pageSize || transactions.length <= pageSize; + */ this.loading = false; } diff --git a/apps/web/src/app/billing/organizations/organization-plans.component.html b/apps/web/src/app/billing/organizations/organization-plans.component.html index 3b765927c3..393e3bc108 100644 --- a/apps/web/src/app/billing/organizations/organization-plans.component.html +++ b/apps/web/src/app/billing/organizations/organization-plans.component.html @@ -6,17 +6,12 @@ >
{{ "loading" | i18n }} - + -
+ !!plan.PasswordManager); @@ -239,6 +238,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy { this.plan = providerDefaultPlan.type; this.productTier = providerDefaultPlan.productTier; } + end of asking /api/plans in Vaultwarden */ if (!this.createOrganization) { this.upgradeFlowPrefillForm(); @@ -268,6 +268,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy { this.loading = false; + /* no sales tax in vaultwarden this.formGroup.valueChanges.pipe(debounceTime(1000), takeUntil(this.destroy$)).subscribe(() => { this.refreshSalesTax(); }); @@ -285,6 +286,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy { additionalServiceAccounts: 0, }); } + end of sales tax */ } ngOnDestroy() { @@ -301,6 +303,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy { } get upgradeRequiresPaymentMethod() { + return false; // Vaultwarden is always free return ( this.organization?.productTierType === ProductTierType.Free && !this.showFree && @@ -336,6 +339,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy { } get selectableProducts() { + return null; // there are no products to select in Vaultwarden if (this.acceptingSponsorship) { const familyPlan = this.passwordManagerPlans.find( (plan) => plan.type === PlanType.FamiliesAnnually, @@ -367,6 +371,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy { } get selectablePlans() { + return null; // no plans to select in Vaultwarden const selectedProductTierType = this.formGroup.controls.productTier.value; const result = this.passwordManagerPlans?.filter( @@ -497,6 +502,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy { } get planOffersSecretsManager() { + return false; // no support for secrets manager in Vaultwarden return this.selectedSecretsManagerPlan != null; } @@ -505,6 +511,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy { } changedProduct() { + return; // no choice of products in Vaultwarden const selectedPlan = this.selectablePlans[0]; this.setPlanType(selectedPlan.type); @@ -633,9 +640,8 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy { const collectionCt = collection.encryptedString; const orgKeys = await this.keyService.makeKeyPair(orgKey[1]); - orgId = this.selfHosted - ? await this.createSelfHosted(key, collectionCt, orgKeys) - : await this.createCloudHosted(key, collectionCt, orgKeys, orgKey[1]); + // always use createCloudHosted() to disable license file upload + orgId = await this.createCloudHosted(key, collectionCt, orgKeys, orgKey[1]); this.toastService.showToast({ variant: "success", @@ -779,7 +785,9 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy { request.billingEmail = this.formGroup.controls.billingEmail.value; 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 { @@ -804,6 +812,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( @@ -865,6 +874,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy { private buildSecretsManagerRequest( request: OrganizationCreateRequest | OrganizationUpgradeRequest, ): void { + return; // Vaultwarden does not support SecretsManager const formValues = this.secretsManagerForm.value; request.useSecretsManager = this.planOffersSecretsManager && formValues.enabled; @@ -883,6 +893,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy { } private upgradeFlowPrefillForm() { + return; // Vaultwarden only supports free plan if (this.acceptingSponsorship) { this.formGroup.controls.productTier.setValue(ProductTierType.Families); this.changedProduct(); diff --git a/apps/web/src/app/core/router.service.ts b/apps/web/src/app/core/router.service.ts index ff0aea47b9..21ec31a19a 100644 --- a/apps/web/src/app/core/router.service.ts +++ b/apps/web/src/app/core/router.service.ts @@ -61,7 +61,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 index 3df2a7d895..f73d811690 100644 --- a/apps/web/src/app/core/web-platform-utils.service.ts +++ b/apps/web/src/app/core/web-platform-utils.service.ts @@ -135,14 +135,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 d19af54f5d..03c8edf631 100644 --- a/apps/web/src/app/layouts/frontend-layout.component.html +++ b/apps/web/src/app/layouts/frontend-layout.component.html @@ -3,6 +3,12 @@
-
© {{ year }} Bitwarden Inc.
+
Vaultwarden Web
{{ version }}
+
+
+ A modified version of the Bitwarden® Web Vault for Vaultwarden (an unofficial rewrite of the + Bitwarden® server).
+ Vaultwarden is not associated with the Bitwarden® project nor Bitwarden Inc. +
diff --git a/apps/web/src/app/layouts/header/web-header.component.html b/apps/web/src/app/layouts/header/web-header.component.html index 4b0da4ae56..eebc79db0d 100644 --- a/apps/web/src/app/layouts/header/web-header.component.html +++ b/apps/web/src/app/layouts/header/web-header.component.html @@ -63,7 +63,12 @@ {{ "accountSettings" | i18n }} - + {{ "getHelp" | i18n }} diff --git a/apps/web/src/app/layouts/product-switcher/navigation-switcher/navigation-switcher.component.html b/apps/web/src/app/layouts/product-switcher/navigation-switcher/navigation-switcher.component.html index 08195d95bf..f51a216a14 100644 --- a/apps/web/src/app/layouts/product-switcher/navigation-switcher/navigation-switcher.component.html +++ b/apps/web/src/app/layouts/product-switcher/navigation-switcher/navigation-switcher.component.html @@ -10,10 +10,7 @@ > -
+
{{ "moreFromBitwarden" | i18n }} diff --git 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 index 204737eee2..9bee4f6e03 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 @@
{{ "moreFromBitwarden" | i18n }} diff --git a/apps/web/src/app/layouts/user-layout.component.ts b/apps/web/src/app/layouts/user-layout.component.ts index e859993af3..125b53fdf1 100644 --- a/apps/web/src/app/layouts/user-layout.component.ts +++ b/apps/web/src/app/layouts/user-layout.component.ts @@ -3,7 +3,7 @@ import { CommonModule } from "@angular/common"; import { Component, OnInit } from "@angular/core"; import { RouterModule } from "@angular/router"; -import { Observable, switchMap } from "rxjs"; +import { Observable, of } from "rxjs"; import { JslibModule } from "@bitwarden/angular/jslib.module"; import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; @@ -40,15 +40,14 @@ export class UserLayoutComponent implements OnInit { private billingAccountProfileStateService: BillingAccountProfileStateService, private accountService: AccountService, ) { - this.showSubscription$ = this.accountService.activeAccount$.pipe( - switchMap((account) => - this.billingAccountProfileStateService.canViewSubscription$(account.id), - ), - ); + this.showSubscription$ = of(false); // always hide subscriptions in Vaultwarden } async ngOnInit() { document.body.classList.remove("layout_frontend"); await this.syncService.fullSync(false); + + this.hasFamilySponsorshipAvailable$ = of(false); // disable family Sponsorships in Vaultwarden + this.showSponsoredFamilies$ = of(false); // disable family Sponsorships in Vaultwarden } } diff --git a/apps/web/src/app/oss-routing.module.ts b/apps/web/src/app/oss-routing.module.ts index fc8356505f..217e85568d 100644 --- a/apps/web/src/app/oss-routing.module.ts +++ b/apps/web/src/app/oss-routing.module.ts @@ -213,7 +213,7 @@ const routes: Routes = [ canActivate: [unauthGuardFn()], data: { pageTitle: { - key: "logInToBitwarden", + key: "logIn", }, pageIcon: VaultIcon, } satisfies RouteDataProperties & AnonLayoutWrapperData, diff --git a/apps/web/src/app/platform/web-environment.service.ts b/apps/web/src/app/platform/web-environment.service.ts index 1df842d6b3..d61637c92e 100644 --- a/apps/web/src/app/platform/web-environment.service.ts +++ b/apps/web/src/app/platform/web-environment.service.ts @@ -38,7 +38,17 @@ export class WebEnvironmentService extends DefaultEnvironmentService { super(stateProvider, accountService, additionalRegionConfigs); // The web vault always uses the current location as the base url - envUrls.base ??= this.win.location.origin; + // If the base URL is `https://vaultwarden.example.com/base/path/`, + // `window.location.href` should have one of the following forms: + // + // - `https://vaultwarden.example.com/base/path/` + // - `https://vaultwarden.example.com/base/path/#/some/route[?queryParam=...]` + // - `https://vaultwarden.example.com/base/path/?queryParam=...` + // + // We want to get to just `https://vaultwarden.example.com/base/path`. + let baseUrl = this.win.location.href; + baseUrl = baseUrl.replace(/(\/+|\/*#.*|\/*\?.*)$/, ""); // Strip off trailing `/`, `#`, `?` and everything after. + envUrls.base ??= baseUrl; // Find the region const currentHostname = new URL(this.win.location.href).hostname; diff --git a/apps/web/src/app/tools/send/send-access/send-access-explainer.component.html b/apps/web/src/app/tools/send/send-access/send-access-explainer.component.html index f56b68cc29..284b916514 100644 --- a/apps/web/src/app/tools/send/send-access/send-access-explainer.component.html +++ b/apps/web/src/app/tools/send/send-access/send-access-explainer.component.html @@ -1,18 +1,5 @@

{{ "sendAccessTaglineProductDesc" | i18n }} - {{ "sendAccessTaglineLearnMore" | i18n }} - Bitwarden Send - {{ "sendAccessTaglineOr" | i18n }} - {{ - "sendAccessTaglineSignUp" | i18n - }} - {{ "sendAccessTaglineTryToday" | i18n }}

diff --git a/apps/web/src/connectors/sso.ts b/apps/web/src/connectors/sso.ts index 886742c4c4..7d560656ba 100644 --- a/apps/web/src/connectors/sso.ts +++ b/apps/web/src/connectors/sso.ts @@ -21,13 +21,14 @@ window.addEventListener("load", () => { }); function initiateWebAppSso(code: string, state: string) { + const baseUrl = window.location.href.replace(/\/sso-connector.html.*$/, ""); // If we've initiated SSO from somewhere other than the SSO component on the web app, the SSO component will add // a _returnUri to the state variable. Here we're extracting that URI and sending the user there instead of to the SSO component. const returnUri = extractFromRegex(state, "(?<=_returnUri=')(.*)(?=')"); if (returnUri) { - window.location.href = window.location.origin + `/#${returnUri}`; + window.location.href = baseUrl + `/#${returnUri}`; } else { - window.location.href = window.location.origin + "/#/sso?code=" + code + "&state=" + state; + window.location.href = baseUrl + "/#/sso?code=" + code + "&state=" + state; } } diff --git a/apps/web/src/index.html b/apps/web/src/index.html index 0b8ea86491..5d98411f46 100644 --- a/apps/web/src/index.html +++ b/apps/web/src/index.html @@ -5,19 +5,21 @@ - Bitwarden Web vault + Vaultwarden Web + +
- Bitwarden + Vaultwarden
/", }), projects: [ - "/apps/browser/jest.config.js", - "/apps/cli/jest.config.js", - "/apps/desktop/jest.config.js", "/apps/web/jest.config.js", - "/bitwarden_license/bit-web/jest.config.js", - "/bitwarden_license/bit-cli/jest.config.js", - "/bitwarden_license/bit-common/jest.config.js", "/libs/admin-console/jest.config.js", "/libs/angular/jest.config.js", diff --git a/libs/auth/src/angular/anon-layout/anon-layout-wrapper.component.ts b/libs/auth/src/angular/anon-layout/anon-layout-wrapper.component.ts index 04dc3b6dfd..2791b0bc17 100644 --- a/libs/auth/src/angular/anon-layout/anon-layout-wrapper.component.ts +++ b/libs/auth/src/angular/anon-layout/anon-layout-wrapper.component.ts @@ -8,6 +8,8 @@ import { AnonLayoutComponent } from "@bitwarden/auth/angular"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { Icon, Translation } from "@bitwarden/components"; +import { BitwardenShield } from "../icons"; + import { AnonLayoutWrapperDataService } from "./anon-layout-wrapper-data.service"; export interface AnonLayoutWrapperData { @@ -160,7 +162,7 @@ export class AnonLayoutWrapperComponent implements OnInit, OnDestroy { private resetPageData() { this.pageTitle = null; this.pageSubtitle = null; - this.pageIcon = null; + this.pageIcon = BitwardenShield; this.showReadonlyHostname = null; this.maxWidth = null; this.titleAreaMaxWidth = null; diff --git a/libs/auth/src/angular/anon-layout/anon-layout.component.html b/libs/auth/src/angular/anon-layout/anon-layout.component.html index 1e16dba82c..fe3d9b9ebe 100644 --- a/libs/auth/src/angular/anon-layout/anon-layout.component.html +++ b/libs/auth/src/angular/anon-layout/anon-layout.component.html @@ -8,7 +8,7 @@ @@ -55,8 +55,14 @@ -
© {{ year }} Bitwarden Inc.
+
Vaultwarden Web
{{ version }}
+
+
+ A modified version of the Bitwarden® Web Vault for Vaultwarden (an unofficial rewrite of + the Bitwarden® server).
+ Vaultwarden is not associated with the Bitwarden® project nor Bitwarden Inc. +
diff --git a/libs/auth/src/angular/login/login-secondary-content.component.ts b/libs/auth/src/angular/login/login-secondary-content.component.ts index b608542b37..4f0b86baa7 100644 --- a/libs/auth/src/angular/login/login-secondary-content.component.ts +++ b/libs/auth/src/angular/login/login-secondary-content.component.ts @@ -11,7 +11,6 @@ import { LinkModule } from "@bitwarden/components"; imports: [CommonModule, JslibModule, LinkModule, RouterModule], template: `
- {{ "newToBitwarden" | i18n }} {{ "createAccount" | i18n }}
`, diff --git a/libs/auth/src/angular/login/login.component.ts b/libs/auth/src/angular/login/login.component.ts index 4ca18b4985..6f6519c2bc 100644 --- a/libs/auth/src/angular/login/login.component.ts +++ b/libs/auth/src/angular/login/login.component.ts @@ -407,7 +407,7 @@ export class LoginComponent implements OnInit, OnDestroy { this.loginComponentService.showBackButton(false); this.anonLayoutWrapperDataService.setAnonLayoutWrapperData({ - pageTitle: { key: "logInToBitwarden" }, + pageTitle: { key: "logIn" }, pageIcon: this.Icons.VaultIcon, pageSubtitle: null, // remove subtitle when going back to email entry }); diff --git a/libs/auth/src/angular/registration/registration-start/registration-start.component.html b/libs/auth/src/angular/registration/registration-start/registration-start.component.html index de3611a597..23a7324566 100644 --- a/libs/auth/src/angular/registration/registration-start/registration-start.component.html +++ b/libs/auth/src/angular/registration/registration-start/registration-start.component.html @@ -53,7 +53,7 @@ {{ "continue" | i18n }} -

+

{{ "byContinuingYouAgreeToThe" | i18n }} {{ (passwordRemoved ? "newPassword" : "password") | i18n }} - +