mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-02 13:23:29 +01:00
Merge branch 'feature/sm-billing' into AC-1418-add-secrets-manager-manage-subscription-component
This commit is contained in:
commit
5f34ba2166
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
# The following owners will be the default owners for everything in the repo.
|
||||
# Unless a later match takes precedence
|
||||
# @bitwarden/team-leads
|
||||
@bitwarden/team-leads
|
||||
|
||||
## Secrets Manager team files ##
|
||||
bitwarden_license/bit-web/src/app/secrets-manager @bitwarden/team-secrets-manager-dev
|
||||
|
2
.github/workflows/brew-bump-cli.yml
vendored
2
.github/workflows/brew-bump-cli.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
||||
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "brew-bump-workflow-pat"
|
||||
|
2
.github/workflows/brew-bump-desktop.yml
vendored
2
.github/workflows/brew-bump-desktop.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
||||
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "brew-bump-workflow-pat"
|
||||
|
4
.github/workflows/build-browser.yml
vendored
4
.github/workflows/build-browser.yml
vendored
@ -354,7 +354,7 @@ jobs:
|
||||
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "crowdin-api-token"
|
||||
@ -416,7 +416,7 @@ jobs:
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
if: failure()
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "devops-alerts-slack-webhook-url"
|
||||
|
2
.github/workflows/build-cli.yml
vendored
2
.github/workflows/build-cli.yml
vendored
@ -404,7 +404,7 @@ jobs:
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
if: failure()
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "devops-alerts-slack-webhook-url"
|
||||
|
8
.github/workflows/build-desktop.yml
vendored
8
.github/workflows/build-desktop.yml
vendored
@ -277,7 +277,7 @@ jobs:
|
||||
node-gyp install $(node -v)
|
||||
|
||||
- name: Install AST
|
||||
uses: bitwarden/gh-actions/install-ast@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/install-ast@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
|
||||
- name: Set up environmentF
|
||||
run: choco install checksum --no-progress
|
||||
@ -302,7 +302,7 @@ jobs:
|
||||
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "code-signing-vault-url,
|
||||
@ -1190,7 +1190,7 @@ jobs:
|
||||
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "crowdin-api-token"
|
||||
@ -1269,7 +1269,7 @@ jobs:
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
if: failure()
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "devops-alerts-slack-webhook-url"
|
||||
|
8
.github/workflows/build-web.yml
vendored
8
.github/workflows/build-web.yml
vendored
@ -235,7 +235,7 @@ jobs:
|
||||
|
||||
- name: Retrieve github PAT secrets
|
||||
id: retrieve-secret-pat
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "github-pat-bitwarden-devops-bot-repo-scope"
|
||||
@ -243,7 +243,7 @@ jobs:
|
||||
- name: Setup DCT
|
||||
if: ${{ env.is_publish_branch == 'true' }}
|
||||
id: setup-dct
|
||||
uses: bitwarden/gh-actions/setup-docker-trust@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/setup-docker-trust@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
azure-creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
|
||||
azure-keyvault-name: "bitwarden-ci"
|
||||
@ -291,7 +291,7 @@ jobs:
|
||||
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "crowdin-api-token"
|
||||
@ -352,7 +352,7 @@ jobs:
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
if: failure()
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "devops-alerts-slack-webhook-url"
|
||||
|
2
.github/workflows/chromatic.yml
vendored
2
.github/workflows/chromatic.yml
vendored
@ -37,7 +37,7 @@ jobs:
|
||||
run: npm run build-storybook:ci
|
||||
|
||||
- name: Publish to Chromatic
|
||||
uses: chromaui/action@a2ed440e22f7d4e2c6b0710f7903aa2df70a1ecd
|
||||
uses: chromaui/action@44caff7e88d584b04f79f04e31e819f9a95d4d8f
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
||||
|
4
.github/workflows/crowdin-pull.yml
vendored
4
.github/workflows/crowdin-pull.yml
vendored
@ -32,13 +32,13 @@ jobs:
|
||||
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "crowdin-api-token, github-gpg-private-key, github-gpg-private-key-passphrase"
|
||||
|
||||
- name: Download translations
|
||||
uses: bitwarden/gh-actions/crowdin@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/crowdin@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
CROWDIN_API_TOKEN: ${{ steps.retrieve-secrets.outputs.crowdin-api-token }}
|
||||
|
60
.github/workflows/deploy-eu-prod-web.yml
vendored
Normal file
60
.github/workflows/deploy-eu-prod-web.yml
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
---
|
||||
name: Deploy Web to EU-PRD Cloud
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: "Branch name to deploy (examples: 'master', 'feature/sm')"
|
||||
required: true
|
||||
type: string
|
||||
default: master
|
||||
|
||||
jobs:
|
||||
azure-deploy:
|
||||
name: Deploy to Azure
|
||||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
_WEB_ARTIFACT: "web-*-cloud-euprd.zip"
|
||||
steps:
|
||||
- name: Login to Azure - EU Subscription
|
||||
uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.6
|
||||
with:
|
||||
creds: ${{ secrets.AZURE_KV_EU_PRD_SERVICE_PRINCIPAL }}
|
||||
|
||||
- name: Retrieve Storage Account connection string
|
||||
id: retrieve-secrets
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: webvault-westeurope-prod
|
||||
secrets: "sa-bitwarden-web-vault-dev-key-temp"
|
||||
|
||||
- name: Download latest cloud asset
|
||||
uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
workflow: build-web.yml
|
||||
path: apps/web
|
||||
workflow_conclusion: success
|
||||
branch: ${{ github.event.inputs.tag }}
|
||||
artifacts: ${{ env._WEB_ARTIFACT }}
|
||||
|
||||
- name: Unzip build asset
|
||||
working-directory: apps/web
|
||||
run: unzip ${{ env._WEB_ARTIFACT }}
|
||||
|
||||
- name: Empty container in Storage Account
|
||||
run: |
|
||||
az storage blob delete-batch \
|
||||
--source '$web' \
|
||||
--pattern '*' \
|
||||
--connection-string "${{ steps.retrieve-secrets.outputs.sa-bitwarden-web-vault-dev-key-temp }}"
|
||||
|
||||
- name: Deploy to Azure Storage Account
|
||||
working-directory: apps/web
|
||||
run: |
|
||||
az storage blob upload-batch \
|
||||
--source "./build" \
|
||||
--destination '$web' \
|
||||
--connection-string "${{ steps.retrieve-secrets.outputs.sa-bitwarden-web-vault-dev-key-temp }}" \
|
||||
--overwrite \
|
||||
--no-progress
|
2
.github/workflows/deploy-non-prod-web.yml
vendored
2
.github/workflows/deploy-non-prod-web.yml
vendored
@ -64,7 +64,7 @@ jobs:
|
||||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
||||
|
||||
- name: Download latest cloud asset
|
||||
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
workflow: build-web.yml
|
||||
path: apps/web
|
||||
|
13
.github/workflows/deploy-prod-web.yml
vendored
13
.github/workflows/deploy-prod-web.yml
vendored
@ -1,13 +0,0 @@
|
||||
---
|
||||
name: Deploy Web - EU Prod - STUB
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
stub-job:
|
||||
name: Stub Job
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Stub Step
|
||||
run: exit 0
|
6
.github/workflows/release-browser.yml
vendored
6
.github/workflows/release-browser.yml
vendored
@ -41,7 +41,7 @@ jobs:
|
||||
|
||||
- name: Check Release Version
|
||||
id: version
|
||||
uses: bitwarden/gh-actions/release-version-check@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/release-version-check@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
release-type: ${{ github.event.inputs.release_type }}
|
||||
project-type: ts
|
||||
@ -103,7 +103,7 @@ jobs:
|
||||
|
||||
- name: Download latest Release build artifacts
|
||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
workflow: build-browser.yml
|
||||
workflow_conclusion: success
|
||||
@ -116,7 +116,7 @@ jobs:
|
||||
|
||||
- name: Dry Run - Download latest master build artifacts
|
||||
if: ${{ github.event.inputs.release_type == 'Dry Run' }}
|
||||
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
workflow: build-browser.yml
|
||||
workflow_conclusion: success
|
||||
|
24
.github/workflows/release-cli.yml
vendored
24
.github/workflows/release-cli.yml
vendored
@ -57,7 +57,7 @@ jobs:
|
||||
|
||||
- name: Check Release Version
|
||||
id: version
|
||||
uses: bitwarden/gh-actions/release-version-check@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/release-version-check@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
release-type: ${{ github.event.inputs.release_type }}
|
||||
project-type: ts
|
||||
@ -78,7 +78,7 @@ jobs:
|
||||
|
||||
- name: Download all Release artifacts
|
||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
workflow: build-cli.yml
|
||||
path: apps/cli
|
||||
@ -87,7 +87,7 @@ jobs:
|
||||
|
||||
- name: Dry Run - Download all artifacts
|
||||
if: ${{ github.event.inputs.release_type == 'Dry Run' }}
|
||||
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
workflow: build-cli.yml
|
||||
path: apps/cli
|
||||
@ -150,7 +150,7 @@ jobs:
|
||||
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "snapcraft-store-token"
|
||||
@ -162,7 +162,7 @@ jobs:
|
||||
|
||||
- name: Download artifacts
|
||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
workflow: build-cli.yml
|
||||
path: apps/cli
|
||||
@ -172,7 +172,7 @@ jobs:
|
||||
|
||||
- name: Dry Run - Download artifacts
|
||||
if: ${{ github.event.inputs.release_type == 'Dry Run' }}
|
||||
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
workflow: build-cli.yml
|
||||
path: apps/cli
|
||||
@ -204,7 +204,7 @@ jobs:
|
||||
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "cli-choco-api-key"
|
||||
@ -220,7 +220,7 @@ jobs:
|
||||
|
||||
- name: Download artifacts
|
||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
workflow: build-cli.yml
|
||||
path: apps/cli/dist
|
||||
@ -230,7 +230,7 @@ jobs:
|
||||
|
||||
- name: Dry Run - Download artifacts
|
||||
if: ${{ github.event.inputs.release_type == 'Dry Run' }}
|
||||
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
workflow: build-cli.yml
|
||||
path: apps/cli/dist
|
||||
@ -263,14 +263,14 @@ jobs:
|
||||
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "npm-api-key"
|
||||
|
||||
- name: Download artifacts
|
||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
workflow: build-cli.yml
|
||||
path: apps/cli/build
|
||||
@ -280,7 +280,7 @@ jobs:
|
||||
|
||||
- name: Dry Run - Download artifacts
|
||||
if: ${{ github.event.inputs.release_type == 'Dry Run' }}
|
||||
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
workflow: build-cli.yml
|
||||
path: apps/cli/build
|
||||
|
8
.github/workflows/release-desktop-beta.yml
vendored
8
.github/workflows/release-desktop-beta.yml
vendored
@ -47,7 +47,7 @@ jobs:
|
||||
|
||||
- name: Check Release Version
|
||||
id: version
|
||||
uses: bitwarden/gh-actions/release-version-check@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/release-version-check@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
release-type: 'Initial Release'
|
||||
project-type: ts
|
||||
@ -231,7 +231,7 @@ jobs:
|
||||
node-gyp install $(node -v)
|
||||
|
||||
- name: Install AST
|
||||
uses: bitwarden/gh-actions/install-ast@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/install-ast@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
|
||||
- name: Set up environment
|
||||
run: choco install checksum --no-progress
|
||||
@ -249,7 +249,7 @@ jobs:
|
||||
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "code-signing-vault-url,
|
||||
@ -932,7 +932,7 @@ jobs:
|
||||
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "aws-electron-access-id,
|
||||
|
24
.github/workflows/release-desktop.yml
vendored
24
.github/workflows/release-desktop.yml
vendored
@ -67,7 +67,7 @@ jobs:
|
||||
|
||||
- name: Check Release Version
|
||||
id: version
|
||||
uses: bitwarden/gh-actions/release-version-check@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/release-version-check@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
release-type: ${{ github.event.inputs.release_type }}
|
||||
project-type: ts
|
||||
@ -110,7 +110,7 @@ jobs:
|
||||
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "aws-electron-access-id,
|
||||
@ -123,7 +123,7 @@ jobs:
|
||||
|
||||
- name: Download all artifacts
|
||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
workflow: build-desktop.yml
|
||||
workflow_conclusion: success
|
||||
@ -132,7 +132,7 @@ jobs:
|
||||
|
||||
- name: Dry Run - Download all artifacts
|
||||
if: ${{ github.event.inputs.release_type == 'Dry Run' }}
|
||||
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
workflow: build-desktop.yml
|
||||
workflow_conclusion: success
|
||||
@ -185,7 +185,7 @@ jobs:
|
||||
--endpoint-url https://${CF_ACCOUNT}.r2.cloudflarestorage.com
|
||||
|
||||
- name: Get checksum files
|
||||
uses: bitwarden/gh-actions/get-checksum@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-checksum@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
packages_dir: "apps/desktop/artifacts"
|
||||
file_path: "apps/desktop/artifacts/sha256-checksums.txt"
|
||||
@ -263,7 +263,7 @@ jobs:
|
||||
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "snapcraft-store-token"
|
||||
@ -279,7 +279,7 @@ jobs:
|
||||
|
||||
- name: Download Snap artifact
|
||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
workflow: build-desktop.yml
|
||||
workflow_conclusion: success
|
||||
@ -289,7 +289,7 @@ jobs:
|
||||
|
||||
- name: Dry Run - Download Snap artifact
|
||||
if: ${{ github.event.inputs.release_type == 'Dry Run' }}
|
||||
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
workflow: build-desktop.yml
|
||||
workflow_conclusion: success
|
||||
@ -329,7 +329,7 @@ jobs:
|
||||
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "cli-choco-api-key"
|
||||
@ -347,7 +347,7 @@ jobs:
|
||||
|
||||
- name: Download choco artifact
|
||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
workflow: build-desktop.yml
|
||||
workflow_conclusion: success
|
||||
@ -357,7 +357,7 @@ jobs:
|
||||
|
||||
- name: Dry Run - Download choco artifact
|
||||
if: ${{ github.event.inputs.release_type == 'Dry Run' }}
|
||||
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
workflow: build-desktop.yml
|
||||
workflow_conclusion: success
|
||||
@ -368,5 +368,5 @@ jobs:
|
||||
- name: Push to Chocolatey
|
||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||
shell: pwsh
|
||||
run: choco push
|
||||
run: choco push --source=https://push.chocolatey.org/
|
||||
working-directory: apps/desktop/dist
|
||||
|
2
.github/workflows/release-qa-web.yml
vendored
2
.github/workflows/release-qa-web.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
||||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
||||
|
||||
- name: Download latest cloud asset
|
||||
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
workflow: build-web.yml
|
||||
path: apps/web
|
||||
|
14
.github/workflows/release-web.yml
vendored
14
.github/workflows/release-web.yml
vendored
@ -38,7 +38,7 @@ jobs:
|
||||
|
||||
- name: Check Release Version
|
||||
id: version
|
||||
uses: bitwarden/gh-actions/release-version-check@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/release-version-check@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
release-type: ${{ github.event.inputs.release_type }}
|
||||
project-type: ts
|
||||
@ -70,7 +70,7 @@ jobs:
|
||||
########## DockerHub ##########
|
||||
- name: Setup DCT
|
||||
id: setup-dct
|
||||
uses: bitwarden/gh-actions/setup-docker-trust@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/setup-docker-trust@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
azure-creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
|
||||
azure-keyvault-name: "bitwarden-ci"
|
||||
@ -156,7 +156,7 @@ jobs:
|
||||
|
||||
- name: Retrieve bot secrets
|
||||
id: retrieve-bot-secrets
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: bitwarden-ci
|
||||
secrets: "github-pat-bitwarden-devops-bot-repo-scope"
|
||||
@ -170,7 +170,7 @@ jobs:
|
||||
|
||||
- name: Download latest cloud asset
|
||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
workflow: build-web.yml
|
||||
path: assets
|
||||
@ -180,7 +180,7 @@ jobs:
|
||||
|
||||
- name: Dry Run - Download latest cloud asset
|
||||
if: ${{ github.event.inputs.release_type == 'Dry Run' }}
|
||||
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
workflow: build-web.yml
|
||||
path: assets
|
||||
@ -253,7 +253,7 @@ jobs:
|
||||
|
||||
- name: Download latest build artifacts
|
||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
workflow: build-web.yml
|
||||
path: apps/web/artifacts
|
||||
@ -264,7 +264,7 @@ jobs:
|
||||
|
||||
- name: Dry Run - Download latest build artifacts
|
||||
if: ${{ github.event.inputs.release_type == 'Dry Run' }}
|
||||
uses: bitwarden/gh-actions/download-artifacts@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/download-artifacts@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
workflow: build-web.yml
|
||||
path: apps/web/artifacts
|
||||
|
2
.github/workflows/staged-rollout-desktop.yml
vendored
2
.github/workflows/staged-rollout-desktop.yml
vendored
@ -26,7 +26,7 @@ jobs:
|
||||
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "aws-electron-access-id,
|
||||
|
6
.github/workflows/version-bump.yml
vendored
6
.github/workflows/version-bump.yml
vendored
@ -49,7 +49,7 @@ jobs:
|
||||
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "github-gpg-private-key, github-gpg-private-key-passphrase"
|
||||
@ -86,14 +86,14 @@ jobs:
|
||||
|
||||
- name: Bump Browser Version - Manifest
|
||||
if: ${{ github.event.inputs.client == 'Browser' || github.event.inputs.client == 'All' }}
|
||||
uses: bitwarden/gh-actions/version-bump@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/version-bump@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
version: ${{ github.event.inputs.version_number }}
|
||||
file_path: "apps/browser/src/manifest.json"
|
||||
|
||||
- name: Bump Browser Version - Manifest v3
|
||||
if: ${{ github.event.inputs.client == 'Browser' || github.event.inputs.client == 'All' }}
|
||||
uses: bitwarden/gh-actions/version-bump@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/version-bump@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
with:
|
||||
version: ${{ github.event.inputs.version_number }}
|
||||
file_path: "apps/browser/src/manifest.v3.json"
|
||||
|
2
.github/workflows/workflow-linter.yml
vendored
2
.github/workflows/workflow-linter.yml
vendored
@ -8,4 +8,4 @@ on:
|
||||
|
||||
jobs:
|
||||
call-workflow:
|
||||
uses: bitwarden/gh-actions/.github/workflows/workflow-linter.yml@72594be690a4e7bfa87b1402b2aedc75acdbff12
|
||||
uses: bitwarden/gh-actions/.github/workflows/workflow-linter.yml@37ffa14164a7308bc273829edfe75c97cd562375
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@bitwarden/browser",
|
||||
"version": "2023.5.0",
|
||||
"version": "2023.5.1",
|
||||
"scripts": {
|
||||
"build": "webpack",
|
||||
"build:mv3": "cross-env MANIFEST_VERSION=3 webpack",
|
||||
|
@ -46,6 +46,7 @@ export class AutofillTabCommand {
|
||||
onlyEmptyFields: false,
|
||||
onlyVisibleFields: false,
|
||||
fillNewPassword: true,
|
||||
allowTotpAutofill: true,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,7 @@ export interface AutoFillOptions {
|
||||
fillNewPassword?: boolean;
|
||||
skipLastUsed?: boolean;
|
||||
allowUntrustedIframe?: boolean;
|
||||
allowTotpAutofill?: boolean;
|
||||
}
|
||||
|
||||
export interface FormData {
|
||||
|
@ -20,6 +20,17 @@ export class AutoFillConstants {
|
||||
"benutzer id",
|
||||
];
|
||||
|
||||
static readonly TotpFieldNames: string[] = [
|
||||
"totp",
|
||||
"2fa",
|
||||
"mfa",
|
||||
"totpcode",
|
||||
"2facode",
|
||||
"mfacode",
|
||||
"twofactor",
|
||||
"twofactorcode",
|
||||
];
|
||||
|
||||
static readonly PasswordFieldIgnoreList: string[] = [
|
||||
"onetimepassword",
|
||||
"captcha",
|
||||
|
@ -32,6 +32,7 @@ export interface GenerateFillScriptOptions {
|
||||
onlyEmptyFields: boolean;
|
||||
onlyVisibleFields: boolean;
|
||||
fillNewPassword: boolean;
|
||||
allowTotpAutofill: boolean;
|
||||
cipher: CipherView;
|
||||
tabUrl: string;
|
||||
defaultUriMatch: UriMatchType;
|
||||
@ -127,17 +128,19 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
const defaultUriMatch = (await this.stateService.getDefaultUriMatch()) ?? UriMatchType.Domain;
|
||||
|
||||
let didAutofill = false;
|
||||
options.pageDetails.forEach((pd) => {
|
||||
await Promise.all(
|
||||
options.pageDetails.map(async (pd) => {
|
||||
// make sure we're still on correct tab
|
||||
if (pd.tab.id !== tab.id || pd.tab.url !== tab.url) {
|
||||
return;
|
||||
}
|
||||
|
||||
const fillScript = this.generateFillScript(pd.details, {
|
||||
const fillScript = await this.generateFillScript(pd.details, {
|
||||
skipUsernameOnlyFill: options.skipUsernameOnlyFill || false,
|
||||
onlyEmptyFields: options.onlyEmptyFields || false,
|
||||
onlyVisibleFields: options.onlyVisibleFields || false,
|
||||
fillNewPassword: options.fillNewPassword || false,
|
||||
allowTotpAutofill: options.allowTotpAutofill || false,
|
||||
cipher: options.cipher,
|
||||
tabUrl: tab.url,
|
||||
defaultUriMatch: defaultUriMatch,
|
||||
@ -189,7 +192,8 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
}
|
||||
return null;
|
||||
});
|
||||
});
|
||||
})
|
||||
);
|
||||
|
||||
if (didAutofill) {
|
||||
this.eventCollectionService.collect(EventType.Cipher_ClientAutofilled, options.cipher.id);
|
||||
@ -244,6 +248,7 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
onlyVisibleFields: !fromCommand,
|
||||
fillNewPassword: fromCommand,
|
||||
allowUntrustedIframe: fromCommand,
|
||||
allowTotpAutofill: fromCommand,
|
||||
});
|
||||
|
||||
// Update last used index as autofill has succeed
|
||||
@ -280,10 +285,10 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
return tab;
|
||||
}
|
||||
|
||||
private generateFillScript(
|
||||
private async generateFillScript(
|
||||
pageDetails: AutofillPageDetails,
|
||||
options: GenerateFillScriptOptions
|
||||
): AutofillScript {
|
||||
): Promise<AutofillScript> {
|
||||
if (!pageDetails || !options.cipher) {
|
||||
return null;
|
||||
}
|
||||
@ -333,7 +338,12 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
|
||||
switch (options.cipher.type) {
|
||||
case CipherType.Login:
|
||||
fillScript = this.generateLoginFillScript(fillScript, pageDetails, filledFields, options);
|
||||
fillScript = await this.generateLoginFillScript(
|
||||
fillScript,
|
||||
pageDetails,
|
||||
filledFields,
|
||||
options
|
||||
);
|
||||
break;
|
||||
case CipherType.Card:
|
||||
fillScript = this.generateCardFillScript(fillScript, pageDetails, filledFields, options);
|
||||
@ -353,20 +363,22 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
return fillScript;
|
||||
}
|
||||
|
||||
private generateLoginFillScript(
|
||||
private async generateLoginFillScript(
|
||||
fillScript: AutofillScript,
|
||||
pageDetails: AutofillPageDetails,
|
||||
filledFields: { [id: string]: AutofillField },
|
||||
options: GenerateFillScriptOptions
|
||||
): AutofillScript {
|
||||
): Promise<AutofillScript> {
|
||||
if (!options.cipher.login) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const passwords: AutofillField[] = [];
|
||||
const usernames: AutofillField[] = [];
|
||||
const totps: AutofillField[] = [];
|
||||
let pf: AutofillField = null;
|
||||
let username: AutofillField = null;
|
||||
let totp: AutofillField = null;
|
||||
const login = options.cipher.login;
|
||||
fillScript.savedUrls =
|
||||
login?.uris?.filter((u) => u.match != UriMatchType.Never).map((u) => u.uri) ?? [];
|
||||
@ -420,6 +432,19 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
usernames.push(username);
|
||||
}
|
||||
}
|
||||
|
||||
if (options.allowTotpAutofill && login.totp) {
|
||||
totp = this.findTotpField(pageDetails, pf, false, false, false);
|
||||
|
||||
if (!totp && !options.onlyVisibleFields) {
|
||||
// not able to find any viewable totp fields. maybe there are some "hidden" ones?
|
||||
totp = this.findTotpField(pageDetails, pf, true, true, true);
|
||||
}
|
||||
|
||||
if (totp) {
|
||||
totps.push(totp);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -442,18 +467,42 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
usernames.push(username);
|
||||
}
|
||||
}
|
||||
|
||||
if (options.allowTotpAutofill && login.totp && pf.elementNumber > 0) {
|
||||
totp = this.findTotpField(pageDetails, pf, false, false, true);
|
||||
|
||||
if (!totp && !options.onlyVisibleFields) {
|
||||
// not able to find any viewable username fields. maybe there are some "hidden" ones?
|
||||
totp = this.findTotpField(pageDetails, pf, true, true, true);
|
||||
}
|
||||
|
||||
if (!passwordFields.length && !options.skipUsernameOnlyFill) {
|
||||
if (totp) {
|
||||
totps.push(totp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!passwordFields.length) {
|
||||
// No password fields on this page. Let's try to just fuzzy fill the username.
|
||||
pageDetails.fields.forEach((f) => {
|
||||
if (
|
||||
!options.skipUsernameOnlyFill &&
|
||||
f.viewable &&
|
||||
(f.type === "text" || f.type === "email" || f.type === "tel") &&
|
||||
AutofillService.fieldIsFuzzyMatch(f, AutoFillConstants.UsernameFieldNames)
|
||||
) {
|
||||
usernames.push(f);
|
||||
}
|
||||
|
||||
if (
|
||||
options.allowTotpAutofill &&
|
||||
f.viewable &&
|
||||
(f.type === "text" || f.type === "number") &&
|
||||
(AutofillService.fieldIsFuzzyMatch(f, AutoFillConstants.TotpFieldNames) ||
|
||||
f.autoCompleteType === "one-time-code")
|
||||
) {
|
||||
totps.push(f);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -477,6 +526,20 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
AutofillService.fillByOpid(fillScript, p, login.password);
|
||||
});
|
||||
|
||||
if (options.allowTotpAutofill) {
|
||||
await Promise.all(
|
||||
totps.map(async (t) => {
|
||||
if (Object.prototype.hasOwnProperty.call(filledFields, t.opid)) {
|
||||
return;
|
||||
}
|
||||
|
||||
filledFields[t.opid] = t;
|
||||
const totpValue = await this.totpService.getCode(login.totp);
|
||||
AutofillService.fillByOpid(fillScript, t, totpValue);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
fillScript = AutofillService.setFillScriptForFocus(filledFields, fillScript);
|
||||
return fillScript;
|
||||
}
|
||||
@ -1258,6 +1321,42 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
return usernameField;
|
||||
}
|
||||
|
||||
private findTotpField(
|
||||
pageDetails: AutofillPageDetails,
|
||||
passwordField: AutofillField,
|
||||
canBeHidden: boolean,
|
||||
canBeReadOnly: boolean,
|
||||
withoutForm: boolean
|
||||
) {
|
||||
let totpField: AutofillField = null;
|
||||
for (let i = 0; i < pageDetails.fields.length; i++) {
|
||||
const f = pageDetails.fields[i];
|
||||
if (AutofillService.forCustomFieldsOnly(f)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (
|
||||
!f.disabled &&
|
||||
(canBeReadOnly || !f.readonly) &&
|
||||
(withoutForm || f.form === passwordField.form) &&
|
||||
(canBeHidden || f.viewable) &&
|
||||
(f.type === "text" || f.type === "number")
|
||||
) {
|
||||
totpField = f;
|
||||
|
||||
if (
|
||||
this.findMatchingFieldIndex(f, AutoFillConstants.TotpFieldNames) > -1 ||
|
||||
f.autoCompleteType === "one-time-code"
|
||||
) {
|
||||
// We found an exact match. No need to keep looking.
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return totpField;
|
||||
}
|
||||
|
||||
private findMatchingFieldIndex(field: AutofillField, names: string[]): number {
|
||||
for (let i = 0; i < names.length; i++) {
|
||||
if (names[i].indexOf("=") > -1) {
|
||||
@ -1267,6 +1366,12 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
if (this.fieldPropertyIsPrefixMatch(field, "htmlName", names[i], "name")) {
|
||||
return i;
|
||||
}
|
||||
if (this.fieldPropertyIsPrefixMatch(field, "label-left", names[i], "label")) {
|
||||
return i;
|
||||
}
|
||||
if (this.fieldPropertyIsPrefixMatch(field, "label-right", names[i], "label")) {
|
||||
return i;
|
||||
}
|
||||
if (this.fieldPropertyIsPrefixMatch(field, "label-tag", names[i], "label")) {
|
||||
return i;
|
||||
}
|
||||
@ -1284,6 +1389,12 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
if (this.fieldPropertyIsMatch(field, "htmlName", names[i])) {
|
||||
return i;
|
||||
}
|
||||
if (this.fieldPropertyIsMatch(field, "label-left", names[i])) {
|
||||
return i;
|
||||
}
|
||||
if (this.fieldPropertyIsMatch(field, "label-right", names[i])) {
|
||||
return i;
|
||||
}
|
||||
if (this.fieldPropertyIsMatch(field, "label-tag", names[i])) {
|
||||
return i;
|
||||
}
|
||||
|
@ -224,6 +224,7 @@ export default class RuntimeBackground {
|
||||
cipher: this.main.loginToAutoFill,
|
||||
pageDetails: this.pageDetailsToAutoFill,
|
||||
fillNewPassword: true,
|
||||
allowTotpAutofill: true,
|
||||
});
|
||||
|
||||
if (totpCode != null) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
"manifest_version": 2,
|
||||
"name": "__MSG_extName__",
|
||||
"short_name": "__MSG_appName__",
|
||||
"version": "2023.5.0",
|
||||
"version": "2023.5.1",
|
||||
"description": "__MSG_extDesc__",
|
||||
"default_locale": "en",
|
||||
"author": "Bitwarden Inc.",
|
||||
|
@ -3,7 +3,7 @@
|
||||
"minimum_chrome_version": "102.0",
|
||||
"name": "__MSG_extName__",
|
||||
"short_name": "__MSG_appName__",
|
||||
"version": "2023.5.0",
|
||||
"version": "2023.5.1",
|
||||
"description": "__MSG_extDesc__",
|
||||
"default_locale": "en",
|
||||
"author": "Bitwarden Inc.",
|
||||
|
@ -180,6 +180,7 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
||||
pageDetails: this.pageDetails,
|
||||
doc: window.document,
|
||||
fillNewPassword: true,
|
||||
allowTotpAutofill: true,
|
||||
});
|
||||
if (this.totpCode != null) {
|
||||
this.platformUtilsService.copyToClipboard(this.totpCode, { window: window });
|
||||
|
@ -288,6 +288,7 @@ export class ViewComponent extends BaseViewComponent {
|
||||
pageDetails: this.pageDetails,
|
||||
doc: window.document,
|
||||
fillNewPassword: true,
|
||||
allowTotpAutofill: true,
|
||||
});
|
||||
if (this.totpCode != null) {
|
||||
this.platformUtilsService.copyToClipboard(this.totpCode, { window: window });
|
||||
|
@ -245,6 +245,10 @@ export class ServeCommand {
|
||||
});
|
||||
|
||||
router.post("/unlock", async (ctx, next) => {
|
||||
// Do not allow guessing password location through serve command
|
||||
delete ctx.request.query.passwordFile;
|
||||
delete ctx.request.query.passwordEnv;
|
||||
|
||||
const response = await this.unlockCommand.run(
|
||||
ctx.request.body.password == null ? null : (ctx.request.body.password as string),
|
||||
ctx.request.query
|
||||
|
@ -6,13 +6,13 @@
|
||||
"message": "Filtriloj"
|
||||
},
|
||||
"allItems": {
|
||||
"message": "All items"
|
||||
"message": "Ĉiuj Eroj"
|
||||
},
|
||||
"favorites": {
|
||||
"message": "Favorites"
|
||||
"message": "Plej ŝatataj"
|
||||
},
|
||||
"types": {
|
||||
"message": "Types"
|
||||
"message": "Tipoj"
|
||||
},
|
||||
"typeLogin": {
|
||||
"message": "Saluto"
|
||||
@ -21,7 +21,7 @@
|
||||
"message": "Karto"
|
||||
},
|
||||
"typeIdentity": {
|
||||
"message": "Identity"
|
||||
"message": "Idento"
|
||||
},
|
||||
"typeSecureNote": {
|
||||
"message": "Sekura noto"
|
||||
@ -30,10 +30,10 @@
|
||||
"message": "Dosierujoj"
|
||||
},
|
||||
"collections": {
|
||||
"message": "Collections"
|
||||
"message": "Kolektoj"
|
||||
},
|
||||
"searchVault": {
|
||||
"message": "Search vault"
|
||||
"message": "Traserĉu trezorejon"
|
||||
},
|
||||
"addItem": {
|
||||
"message": "Aldoni elementon"
|
||||
@ -45,10 +45,10 @@
|
||||
"message": "Kundividi"
|
||||
},
|
||||
"moveToOrganization": {
|
||||
"message": "Move to organization"
|
||||
"message": "Movu al organizo"
|
||||
},
|
||||
"movedItemToOrg": {
|
||||
"message": "$ITEMNAME$ moved to $ORGNAME$",
|
||||
"message": "$ITEMNAME$ moviĝis al $ORGNAME$",
|
||||
"placeholders": {
|
||||
"itemname": {
|
||||
"content": "$1",
|
||||
@ -61,7 +61,7 @@
|
||||
}
|
||||
},
|
||||
"moveToOrgDesc": {
|
||||
"message": "Choose an organization that you wish to move this item to. Moving to an organization transfers ownership of the item to that organization. You will no longer be the direct owner of this item once it has been moved."
|
||||
"message": "Elektu organizon kun kiu vi volas dividi ĉi tiun eron. Dividado transdonas posedon de la ero al la organizo. Vi ne plu estos la rekta posedanto de ĉi tiu ero post kiam ĝi estos dividita."
|
||||
},
|
||||
"attachments": {
|
||||
"message": "Aldonaĵoj"
|
||||
@ -104,10 +104,10 @@
|
||||
"message": "Retpoŝta adreso"
|
||||
},
|
||||
"verificationCodeTotp": {
|
||||
"message": "Verification code (TOTP)"
|
||||
"message": "Kontrola kodo (TOTP)"
|
||||
},
|
||||
"website": {
|
||||
"message": "Website"
|
||||
"message": "Retejo"
|
||||
},
|
||||
"notes": {
|
||||
"message": "Notoj"
|
||||
@ -116,10 +116,10 @@
|
||||
"message": "Propraj kampoj"
|
||||
},
|
||||
"launch": {
|
||||
"message": "Launch"
|
||||
"message": "Lanĉo"
|
||||
},
|
||||
"copyValue": {
|
||||
"message": "Copy value",
|
||||
"message": "Kopii valoron",
|
||||
"description": "Copy value to clipboard"
|
||||
},
|
||||
"minimizeOnCopyToClipboard": {
|
||||
|
@ -962,7 +962,7 @@
|
||||
"message": "Käynnistä automaattisesti kirjauduttaessa"
|
||||
},
|
||||
"openAtLoginDesc": {
|
||||
"message": "Käynnistä sovellus automaattisesti kirjautumisen yhteydessä."
|
||||
"message": "Käynnistä Bitwarden-sovellus automaattisesti kirjautumisen yhteydessä."
|
||||
},
|
||||
"alwaysShowDock": {
|
||||
"message": "Näytä aina Dockissa"
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"urls": {
|
||||
"icons": "https://icons.bitwarden.net",
|
||||
"notifications": "https://notifications.bitwarden.net",
|
||||
"scim": "https://scim.bitwarden.net"
|
||||
"notifications": "https://notifications.bitwarden.eu",
|
||||
"scim": "https://scim.bitwarden.eu"
|
||||
},
|
||||
"flags": {
|
||||
"secretsManager": true,
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@bitwarden/web-vault",
|
||||
"version": "2023.5.0",
|
||||
"version": "2023.5.1",
|
||||
"scripts": {
|
||||
"build:oss": "webpack",
|
||||
"build:bit": "webpack -c ../../bitwarden_license/bit-web/webpack.config.js",
|
||||
|
@ -1,18 +1,7 @@
|
||||
import { Component, EventEmitter, Input, Output } from "@angular/core";
|
||||
import { UntypedFormBuilder, FormGroup } from "@angular/forms";
|
||||
import { Router } from "@angular/router";
|
||||
import { FormGroup } from "@angular/forms";
|
||||
|
||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction";
|
||||
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
||||
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
||||
import { ProductType } from "@bitwarden/common/enums";
|
||||
import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service";
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
|
||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||
|
||||
import { OrganizationPlansComponent } from "../../settings/organization-plans.component";
|
||||
|
||||
@ -24,36 +13,6 @@ export class BillingComponent extends OrganizationPlansComponent {
|
||||
@Input() orgInfoForm: FormGroup;
|
||||
@Output() previousStep = new EventEmitter();
|
||||
|
||||
constructor(
|
||||
apiService: ApiService,
|
||||
i18nService: I18nService,
|
||||
platformUtilsService: PlatformUtilsService,
|
||||
cryptoService: CryptoService,
|
||||
router: Router,
|
||||
syncService: SyncService,
|
||||
policyService: PolicyService,
|
||||
organizationService: OrganizationService,
|
||||
logService: LogService,
|
||||
messagingService: MessagingService,
|
||||
formBuilder: UntypedFormBuilder,
|
||||
organizationApiService: OrganizationApiServiceAbstraction
|
||||
) {
|
||||
super(
|
||||
apiService,
|
||||
i18nService,
|
||||
platformUtilsService,
|
||||
cryptoService,
|
||||
router,
|
||||
syncService,
|
||||
policyService,
|
||||
organizationService,
|
||||
logService,
|
||||
messagingService,
|
||||
formBuilder,
|
||||
organizationApiService
|
||||
);
|
||||
}
|
||||
|
||||
async ngOnInit() {
|
||||
const additionalSeats = this.product == ProductType.Families ? 0 : 1;
|
||||
this.formGroup.patchValue({
|
||||
|
@ -43,7 +43,7 @@ export class AdjustSubscription {
|
||||
seatAdjustment,
|
||||
this.newMaxSeats
|
||||
);
|
||||
this.formPromise = this.organizationApiService.updateSubscription(
|
||||
this.formPromise = this.organizationApiService.updatePasswordManagerSeats(
|
||||
this.organizationId,
|
||||
request
|
||||
);
|
||||
|
@ -12,8 +12,8 @@ import { OrganizationBillingRoutingModule } from "./organization-billing-routing
|
||||
import { OrganizationBillingTabComponent } from "./organization-billing-tab.component";
|
||||
import { OrganizationSubscriptionCloudComponent } from "./organization-subscription-cloud.component";
|
||||
import { OrganizationSubscriptionSelfhostComponent } from "./organization-subscription-selfhost.component";
|
||||
import { SecretsManagerEnrollComponent } from "./secrets-manager/enroll.component";
|
||||
import { SecretsManagerAdjustSubscriptionComponent } from "./secrets-manager/sm-adjust-subscription.component";
|
||||
import { SecretsManagerBillingModule } from "./secrets-manager/sm-billing.module";
|
||||
import { SubscriptionHiddenComponent } from "./subscription-hidden.component";
|
||||
|
||||
@NgModule({
|
||||
@ -22,6 +22,7 @@ import { SubscriptionHiddenComponent } from "./subscription-hidden.component";
|
||||
LooseComponentsModule,
|
||||
OrganizationBillingRoutingModule,
|
||||
UserVerificationModule,
|
||||
SecretsManagerBillingModule,
|
||||
],
|
||||
declarations: [
|
||||
AdjustSubscription,
|
||||
@ -34,7 +35,6 @@ import { SubscriptionHiddenComponent } from "./subscription-hidden.component";
|
||||
OrganizationSubscriptionCloudComponent,
|
||||
SubscriptionHiddenComponent,
|
||||
SecretsManagerAdjustSubscriptionComponent,
|
||||
SecretsManagerEnrollComponent,
|
||||
],
|
||||
})
|
||||
export class OrganizationBillingModule {}
|
||||
|
@ -21,7 +21,7 @@
|
||||
[providerName]="userOrg.providerName"
|
||||
></app-org-subscription-hidden>
|
||||
|
||||
<ng-container *ngIf="sub">
|
||||
<ng-container *ngIf="sub && firstLoaded">
|
||||
<bit-callout
|
||||
type="warning"
|
||||
title="{{ 'canceled' | i18n }}"
|
||||
@ -115,12 +115,12 @@
|
||||
></app-change-plan>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="userOrg.canEditSubscription">
|
||||
<sm-enroll
|
||||
*ngIf="isAdmin"
|
||||
[enabled]="sub?.useSecretsManager"
|
||||
[organizationId]="organizationId"
|
||||
></sm-enroll>
|
||||
<ng-container *ngIf="showSecretsManagerSubscribe">
|
||||
<sm-subscribe-standalone
|
||||
[plan]="sub.secretsManagerPlan"
|
||||
[organization]="userOrg"
|
||||
(onSubscribe)="subscriptionAdjusted()"
|
||||
></sm-subscribe-standalone>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="userOrg.canEditSubscription">
|
||||
@ -151,7 +151,7 @@
|
||||
>
|
||||
{{ "removeSponsorship" | i18n }}
|
||||
</button>
|
||||
<h4 bitTypography="h4" class="tw-mt-7">{{ "storage" | i18n }}</h4>
|
||||
<h4 bitTypography="h4" class="tw-mt-9">{{ "storage" | i18n }}</h4>
|
||||
<p bitTypography="body1">
|
||||
{{ "subscriptionStorage" | i18n : sub.maxStorageGb || 0 : sub.storageName || "0 MB" }}
|
||||
</p>
|
||||
|
@ -41,6 +41,8 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
|
||||
hasBillingSyncToken: boolean;
|
||||
showAdjustSecretsManager = false;
|
||||
|
||||
showSecretsManagerSubscribe = false;
|
||||
|
||||
firstLoaded = false;
|
||||
loading: boolean;
|
||||
|
||||
@ -110,6 +112,17 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
|
||||
(i) => i.keyType === OrganizationApiKeyType.BillingSync
|
||||
);
|
||||
|
||||
this.showSecretsManagerSubscribe =
|
||||
this.userOrg.canEditSubscription &&
|
||||
!this.userOrg.useSecretsManager &&
|
||||
!this.subscription.cancelled &&
|
||||
!this.subscriptionMarkedForCancel;
|
||||
|
||||
// Remove next line when the sm-ga-billing flag is deleted
|
||||
this.showSecretsManagerSubscribe =
|
||||
this.showSecretsManagerSubscribe &&
|
||||
(await this.configService.getFeatureFlagBool(FeatureFlag.SecretsManagerBilling));
|
||||
|
||||
this.showAdjustSecretsManager =
|
||||
this.userOrg.canEditSubscription &&
|
||||
this.userOrg.useSecretsManager &&
|
||||
|
@ -1,13 +0,0 @@
|
||||
<form *ngIf="showSecretsManager" [formGroup]="formGroup" [bitSubmit]="submit">
|
||||
<h2 bitTypography="h2" class="tw-mt-7">{{ "secretsManagerBeta" | i18n }}</h2>
|
||||
<p bitTypography="body1">{{ "secretsManagerSubscriptionDesc" | i18n }}</p>
|
||||
|
||||
<bit-form-control>
|
||||
<input type="checkbox" bitCheckbox formControlName="enabled" />
|
||||
<bit-label>{{ "secretsManagerEnable" | i18n }}</bit-label>
|
||||
</bit-form-control>
|
||||
|
||||
<button bitButton bitFormButton buttonType="primary" type="submit">
|
||||
{{ "save" | i18n }}
|
||||
</button>
|
||||
</form>
|
@ -1,52 +0,0 @@
|
||||
import { Component, Input, OnInit } from "@angular/core";
|
||||
import { FormBuilder } from "@angular/forms";
|
||||
|
||||
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction";
|
||||
import { OrganizationEnrollSecretsManagerRequest } from "@bitwarden/common/admin-console/models/request/organization/organization-enroll-secrets-manager.request";
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||
|
||||
import { flagEnabled } from "../../../../utils/flags";
|
||||
|
||||
@Component({
|
||||
selector: "sm-enroll",
|
||||
templateUrl: "enroll.component.html",
|
||||
})
|
||||
export class SecretsManagerEnrollComponent implements OnInit {
|
||||
@Input() enabled: boolean;
|
||||
@Input() organizationId: string;
|
||||
|
||||
protected formGroup = this.formBuilder.group({
|
||||
enabled: [false],
|
||||
});
|
||||
|
||||
protected showSecretsManager = false;
|
||||
|
||||
constructor(
|
||||
private formBuilder: FormBuilder,
|
||||
private organizationApiService: OrganizationApiServiceAbstraction,
|
||||
private platformUtilsService: PlatformUtilsService,
|
||||
private i18nService: I18nService,
|
||||
private syncService: SyncService
|
||||
) {
|
||||
this.showSecretsManager = flagEnabled("secretsManager");
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.formGroup.setValue({
|
||||
enabled: this.enabled,
|
||||
});
|
||||
}
|
||||
|
||||
protected submit = async () => {
|
||||
this.formGroup.markAllAsTouched();
|
||||
|
||||
const request = new OrganizationEnrollSecretsManagerRequest();
|
||||
request.enabled = this.formGroup.value.enabled;
|
||||
|
||||
await this.organizationApiService.updateEnrollSecretsManager(this.organizationId, request);
|
||||
await this.syncService.fullSync(true);
|
||||
this.platformUtilsService.showToast("success", null, this.i18nService.t("subscriptionUpdated"));
|
||||
};
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
export * from "./sm-billing.module";
|
||||
export * from "./sm-subscribe.component";
|
||||
export * from "./sm-subscribe-standalone.component";
|
@ -147,7 +147,7 @@ export class SecretsManagerAdjustSubscriptionComponent implements OnInit, OnDest
|
||||
this.formGroup.value.serviceAccountLimit
|
||||
);
|
||||
|
||||
await this.organizationApiService.updateSubscription(this.organizationId, request);
|
||||
await this.organizationApiService.updatePasswordManagerSeats(this.organizationId, request);
|
||||
|
||||
await this.platformUtilsService.showToast(
|
||||
"success",
|
||||
|
@ -0,0 +1,13 @@
|
||||
import { NgModule } from "@angular/core";
|
||||
|
||||
import { SharedModule } from "../../../shared";
|
||||
|
||||
import { SecretsManagerSubscribeStandaloneComponent } from "./sm-subscribe-standalone.component";
|
||||
import { SecretsManagerSubscribeComponent } from "./sm-subscribe.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [SharedModule],
|
||||
declarations: [SecretsManagerSubscribeComponent, SecretsManagerSubscribeStandaloneComponent],
|
||||
exports: [SecretsManagerSubscribeComponent, SecretsManagerSubscribeStandaloneComponent],
|
||||
})
|
||||
export class SecretsManagerBillingModule {}
|
@ -0,0 +1,8 @@
|
||||
<form [formGroup]="formGroup" [bitSubmit]="submit" *ngIf="plan">
|
||||
<sm-subscribe
|
||||
[formGroup]="formGroup"
|
||||
[selectedPlan]="plan"
|
||||
[upgradeOrganization]="false"
|
||||
[showSubmitButton]="true"
|
||||
></sm-subscribe>
|
||||
</form>
|
@ -0,0 +1,42 @@
|
||||
import { Component, EventEmitter, Input, Output } from "@angular/core";
|
||||
import { FormBuilder } from "@angular/forms";
|
||||
|
||||
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction";
|
||||
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
||||
import { SecretsManagerSubscribeRequest } from "@bitwarden/common/billing/models/request/sm-subscribe.request";
|
||||
import { PlanResponse } from "@bitwarden/common/billing/models/response/plan.response";
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||
|
||||
import { secretsManagerSubscribeFormFactory } from "./sm-subscribe.component";
|
||||
|
||||
@Component({
|
||||
selector: "sm-subscribe-standalone",
|
||||
templateUrl: "sm-subscribe-standalone.component.html",
|
||||
})
|
||||
export class SecretsManagerSubscribeStandaloneComponent {
|
||||
@Input() plan: PlanResponse;
|
||||
@Input() organization: Organization;
|
||||
@Output() onSubscribe = new EventEmitter<void>();
|
||||
|
||||
formGroup = secretsManagerSubscribeFormFactory(this.formBuilder);
|
||||
|
||||
constructor(
|
||||
private formBuilder: FormBuilder,
|
||||
private platformUtilsService: PlatformUtilsService,
|
||||
private i18nService: I18nService,
|
||||
private organizationApiService: OrganizationApiServiceAbstraction
|
||||
) {}
|
||||
|
||||
submit = async () => {
|
||||
const request = new SecretsManagerSubscribeRequest();
|
||||
request.additionalSmSeats = this.formGroup.value.userSeats;
|
||||
request.additionalServiceAccounts = this.formGroup.value.additionalServiceAccounts;
|
||||
|
||||
await this.organizationApiService.subscribeToSecretsManager(this.organization.id, request);
|
||||
|
||||
this.platformUtilsService.showToast("success", null, this.i18nService.t("subscriptionUpdated"));
|
||||
|
||||
this.onSubscribe.emit();
|
||||
};
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
<div *ngIf="formGroup && selectedPlan != null" [formGroup]="formGroup">
|
||||
<h3 bitTypography="h3">{{ "moreFromBitwarden" | i18n }}</h3>
|
||||
<div class="tw-rounded-t tw-bg-background-alt3 tw-p-5">
|
||||
<div class="tw-w-72">
|
||||
<bit-icon [icon]="logo"></bit-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="tw-rounded-b tw-border-x tw-border-b tw-border-t-0 tw-border-solid tw-border-secondary-300 tw-p-5"
|
||||
>
|
||||
<h4 bitTypography="h4">{{ "secretsManagerForPlan" | i18n : planName }}</h4>
|
||||
<div class="tw-text-muted">
|
||||
{{ "secretsManagerForPlanDesc" | i18n }}
|
||||
<ul>
|
||||
<li *ngIf="product == productTypes.Free">{{ "limitedUsers" | i18n : maxUsers }}</li>
|
||||
<li>{{ "unlimitedSecrets" | i18n }}</li>
|
||||
<li *ngIf="product == productTypes.Free; else unlimitedProjects">
|
||||
{{ "projectsIncluded" | i18n : maxProjects }}
|
||||
</li>
|
||||
<ng-template #unlimitedProjects>
|
||||
<li>{{ "unlimitedProjects" | i18n }}</li>
|
||||
</ng-template>
|
||||
<li>{{ "serviceAccountsIncluded" | i18n : serviceAccountsIncluded }}</li>
|
||||
<li *ngIf="product != productTypes.Free">
|
||||
{{
|
||||
"additionalServiceAccountCost" | i18n : (monthlyCostPerServiceAccount | currency : "$")
|
||||
}}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="tw-mb-5">
|
||||
<span *ngIf="product != productTypes.Free; else freeForever">
|
||||
{{ "costPerUser" | i18n : (monthlyCostPerUser | currency : "$") }} /{{ "month" | i18n }}
|
||||
</span>
|
||||
<ng-template #freeForever>
|
||||
<span>{{ "freeForever" | i18n }}</span>
|
||||
</ng-template>
|
||||
</div>
|
||||
|
||||
<bit-form-control>
|
||||
<input type="checkbox" bitCheckbox formControlName="enabled" />
|
||||
<bit-label>{{ "addSecretsManager" | i18n }}</bit-label>
|
||||
<bit-hint *ngIf="upgradeOrganization">{{ "addSecretsManagerUpgradeDesc" | i18n }}</bit-hint>
|
||||
</bit-form-control>
|
||||
|
||||
<div *ngIf="formGroup.value.enabled && selectedPlan.hasAdditionalSeatsOption" class="tw-w-1/2">
|
||||
<bit-form-field>
|
||||
<bit-label>{{ "userSeats" | i18n }}</bit-label>
|
||||
<input bitInput formControlName="userSeats" type="number" />
|
||||
<bit-hint>{{ "userSeatsHowManyDesc" | i18n }}</bit-hint>
|
||||
</bit-form-field>
|
||||
|
||||
<bit-form-field>
|
||||
<bit-label>{{ "additionalServiceAccounts" | i18n }}</bit-label>
|
||||
<input bitInput formControlName="additionalServiceAccounts" type="number" />
|
||||
<bit-hint>{{
|
||||
"additionalServiceAccountsDesc"
|
||||
| i18n : serviceAccountsIncluded : (monthlyCostPerServiceAccount | currency : "$")
|
||||
}}</bit-hint>
|
||||
</bit-form-field>
|
||||
|
||||
<button *ngIf="showSubmitButton" type="submit" bitButton buttonType="primary" bitFormButton>
|
||||
{{ "save" | i18n }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,104 @@
|
||||
import { Component, Input, OnDestroy, OnInit } from "@angular/core";
|
||||
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
|
||||
import { Subject, startWith, takeUntil } from "rxjs";
|
||||
|
||||
import { ControlsOf } from "@bitwarden/angular/types/controls-of";
|
||||
import { PlanResponse } from "@bitwarden/common/billing/models/response/plan.response";
|
||||
import { ProductType } from "@bitwarden/common/enums";
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
|
||||
import { SecretsManagerLogo } from "../../../../../../../bitwarden_license/bit-web/src/app/secrets-manager/layout/secrets-manager-logo";
|
||||
|
||||
export interface SecretsManagerSubscription {
|
||||
enabled: boolean;
|
||||
userSeats: number;
|
||||
additionalServiceAccounts: number;
|
||||
}
|
||||
|
||||
export const secretsManagerSubscribeFormFactory = (
|
||||
formBuilder: FormBuilder
|
||||
): FormGroup<ControlsOf<SecretsManagerSubscription>> =>
|
||||
formBuilder.group({
|
||||
enabled: [false],
|
||||
userSeats: [1, [Validators.required, Validators.min(1), Validators.max(100000)]],
|
||||
additionalServiceAccounts: [
|
||||
0,
|
||||
[Validators.required, Validators.min(0), Validators.max(100000)],
|
||||
],
|
||||
});
|
||||
|
||||
@Component({
|
||||
selector: "sm-subscribe",
|
||||
templateUrl: "sm-subscribe.component.html",
|
||||
})
|
||||
export class SecretsManagerSubscribeComponent implements OnInit, OnDestroy {
|
||||
@Input() formGroup: FormGroup<ControlsOf<SecretsManagerSubscription>>;
|
||||
@Input() upgradeOrganization: boolean;
|
||||
@Input() showSubmitButton = false;
|
||||
@Input() selectedPlan: PlanResponse;
|
||||
|
||||
logo = SecretsManagerLogo;
|
||||
productTypes = ProductType;
|
||||
|
||||
private destroy$ = new Subject<void>();
|
||||
|
||||
constructor(private i18nService: I18nService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.formGroup.controls.enabled.valueChanges
|
||||
.pipe(startWith(this.formGroup.value.enabled), takeUntil(this.destroy$))
|
||||
.subscribe((enabled) => {
|
||||
if (enabled) {
|
||||
this.formGroup.controls.userSeats.enable();
|
||||
this.formGroup.controls.additionalServiceAccounts.enable();
|
||||
} else {
|
||||
this.formGroup.controls.userSeats.disable();
|
||||
this.formGroup.controls.additionalServiceAccounts.disable();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this.destroy$.next();
|
||||
this.destroy$.complete();
|
||||
}
|
||||
|
||||
get product() {
|
||||
return this.selectedPlan.product;
|
||||
}
|
||||
|
||||
get planName() {
|
||||
switch (this.product) {
|
||||
case ProductType.Free:
|
||||
return this.i18nService.t("free2PersonOrganization");
|
||||
case ProductType.Teams:
|
||||
return this.i18nService.t("planNameTeams");
|
||||
case ProductType.Enterprise:
|
||||
return this.i18nService.t("planNameEnterprise");
|
||||
}
|
||||
}
|
||||
|
||||
get serviceAccountsIncluded() {
|
||||
return this.selectedPlan.baseServiceAccount;
|
||||
}
|
||||
|
||||
get monthlyCostPerServiceAccount() {
|
||||
return this.selectedPlan.isAnnual
|
||||
? this.selectedPlan.additionalPricePerServiceAccount / 12
|
||||
: this.selectedPlan.additionalPricePerServiceAccount;
|
||||
}
|
||||
|
||||
get maxUsers() {
|
||||
return this.selectedPlan.maxUsers;
|
||||
}
|
||||
|
||||
get maxProjects() {
|
||||
return this.selectedPlan.maxProjects;
|
||||
}
|
||||
|
||||
get monthlyCostPerUser() {
|
||||
return this.selectedPlan.isAnnual
|
||||
? this.selectedPlan.seatPrice / 12
|
||||
: this.selectedPlan.seatPrice;
|
||||
}
|
||||
}
|
@ -28,7 +28,7 @@
|
||||
(ngSubmit)="submit()"
|
||||
[appApiAction]="formPromise"
|
||||
ngNativeValidate
|
||||
*ngIf="!loading && !selfHosted && this.plans"
|
||||
*ngIf="!loading && !selfHosted && this.passwordManagerPlans && this.secretsManagerPlans"
|
||||
class="tw-pt-6"
|
||||
>
|
||||
<app-org-info
|
||||
@ -119,7 +119,7 @@
|
||||
<span *ngIf="selectableProduct.product == productTypes.Free">{{ "freeForever" | i18n }}</span>
|
||||
</label>
|
||||
</div>
|
||||
<div *ngIf="formGroup.controls['product'].value !== productTypes.Free">
|
||||
<div *ngIf="formGroup.value.product !== productTypes.Free">
|
||||
<ng-container *ngIf="selectedPlan.hasAdditionalSeatsOption && !selectedPlan.baseSeats">
|
||||
<h2 class="mt-5">{{ "users" | i18n }}</h2>
|
||||
<div class="row">
|
||||
@ -230,7 +230,8 @@
|
||||
<span *ngIf="!selectablePlan.baseSeats">{{ "users" | i18n }}:</span>
|
||||
{{ formGroup.controls["additionalSeats"].value || 0 }} ×
|
||||
{{ selectablePlan.seatPrice / 12 | currency : "$" }} × 12
|
||||
{{ "monthAbbr" | i18n }} = {{ seatTotal(selectablePlan) | currency : "$" }} /{{
|
||||
{{ "monthAbbr" | i18n }} =
|
||||
{{ seatTotal(selectablePlan, formGroup.value.additionalSeats) | currency : "$" }} /{{
|
||||
"year" | i18n
|
||||
}}
|
||||
</small>
|
||||
@ -256,7 +257,9 @@
|
||||
<span *ngIf="!selectablePlan.baseSeats">{{ "users" | i18n }}:</span>
|
||||
{{ formGroup.controls["additionalSeats"].value || 0 }} ×
|
||||
{{ selectablePlan.seatPrice | currency : "$" }} {{ "monthAbbr" | i18n }} =
|
||||
{{ seatTotal(selectablePlan) | currency : "$" }} /{{ "month" | i18n }}
|
||||
{{ seatTotal(selectablePlan, formGroup.value.additionalSeats) | currency : "$" }} /{{
|
||||
"month" | i18n
|
||||
}}
|
||||
</small>
|
||||
<small *ngIf="selectablePlan.hasAdditionalStorageOption">
|
||||
{{ "additionalStorageGb" | i18n }}:
|
||||
@ -268,8 +271,21 @@
|
||||
</ng-container>
|
||||
</label>
|
||||
</div>
|
||||
<hr class="my-3" />
|
||||
<h2 class="spaced-header mb-4">
|
||||
</div>
|
||||
|
||||
<!-- Secrets Manager -->
|
||||
<div class="tw-my-10">
|
||||
<sm-subscribe
|
||||
*ngIf="showSecretsManagerSubscribe && planOffersSecretsManager"
|
||||
[formGroup]="formGroup.controls.secretsManager"
|
||||
[selectedPlan]="selectedSecretsManagerPlan"
|
||||
[upgradeOrganization]="!createOrganization"
|
||||
></sm-subscribe>
|
||||
</div>
|
||||
|
||||
<!-- Payment info -->
|
||||
<div *ngIf="formGroup.value.product !== productTypes.Free">
|
||||
<h2 class="mb-4">
|
||||
{{ (createOrganization ? "paymentInformation" : "billingInformation") | i18n }}
|
||||
</h2>
|
||||
<small class="text-muted font-italic mb-3 d-block">
|
||||
@ -279,8 +295,12 @@
|
||||
<app-tax-info (onCountryChanged)="changedCountry()"></app-tax-info>
|
||||
<div id="price" class="my-4">
|
||||
<div class="text-muted text-sm">
|
||||
{{ "planPrice" | i18n }}: {{ subtotal | currency : "USD $" }}
|
||||
{{ "passwordManagerPlanPrice" | i18n }}: {{ passwordManagerSubtotal | currency : "USD $" }}
|
||||
<br />
|
||||
<span *ngIf="planOffersSecretsManager && formGroup.value.secretsManager.enabled">
|
||||
{{ "secretsManagerPlanPrice" | i18n }}: {{ secretsManagerSubtotal | currency : "USD $" }}
|
||||
<br />
|
||||
</span>
|
||||
<ng-container>
|
||||
{{ "estimatedTax" | i18n }}: {{ taxCharges | currency : "USD $" }}
|
||||
</ng-container>
|
||||
|
@ -7,7 +7,7 @@ import {
|
||||
Output,
|
||||
ViewChild,
|
||||
} from "@angular/core";
|
||||
import { UntypedFormBuilder, Validators } from "@angular/forms";
|
||||
import { FormBuilder, Validators } from "@angular/forms";
|
||||
import { Router } from "@angular/router";
|
||||
import { Subject, takeUntil } from "rxjs";
|
||||
|
||||
@ -21,8 +21,11 @@ import { OrganizationKeysRequest } from "@bitwarden/common/admin-console/models/
|
||||
import { OrganizationUpgradeRequest } from "@bitwarden/common/admin-console/models/request/organization-upgrade.request";
|
||||
import { ProviderOrganizationCreateRequest } from "@bitwarden/common/admin-console/models/request/provider/provider-organization-create.request";
|
||||
import { PaymentMethodType, PlanType } from "@bitwarden/common/billing/enums";
|
||||
import { BitwardenProductType } from "@bitwarden/common/billing/enums/bitwarden-product-type.enum";
|
||||
import { PlanResponse } from "@bitwarden/common/billing/models/response/plan.response";
|
||||
import { ProductType } from "@bitwarden/common/enums";
|
||||
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
||||
import { ConfigServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config.service.abstraction";
|
||||
import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service";
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||
@ -32,6 +35,8 @@ import { EncString } from "@bitwarden/common/platform/models/domain/enc-string";
|
||||
import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key";
|
||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||
|
||||
import { secretsManagerSubscribeFormFactory } from "../organizations/secrets-manager/sm-subscribe.component";
|
||||
|
||||
import { PaymentComponent } from "./payment.component";
|
||||
import { TaxInfoComponent } from "./tax-info.component";
|
||||
|
||||
@ -51,24 +56,29 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
||||
@Input() showFree = true;
|
||||
@Input() showCancel = false;
|
||||
@Input() acceptingSponsorship = false;
|
||||
|
||||
@Input()
|
||||
get product(): ProductType {
|
||||
return this._product;
|
||||
}
|
||||
|
||||
set product(product: ProductType) {
|
||||
this._product = product;
|
||||
this.formGroup?.controls?.product?.setValue(product);
|
||||
}
|
||||
|
||||
private _product = ProductType.Free;
|
||||
|
||||
@Input()
|
||||
get plan(): PlanType {
|
||||
return this._plan;
|
||||
}
|
||||
|
||||
set plan(plan: PlanType) {
|
||||
this._plan = plan;
|
||||
this.formGroup?.controls?.plan?.setValue(plan);
|
||||
}
|
||||
|
||||
private _plan = PlanType.Free;
|
||||
@Input() providerId?: string;
|
||||
@Output() onSuccess = new EventEmitter<OnSuccessArgs>();
|
||||
@ -82,6 +92,9 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
||||
singleOrgPolicyAppliesToActiveUser = false;
|
||||
isInTrialFlow = false;
|
||||
discount = 0;
|
||||
showSecretsManagerSubscribe: boolean;
|
||||
|
||||
secretsManagerSubscription = secretsManagerSubscribeFormFactory(this.formBuilder);
|
||||
|
||||
formGroup = this.formBuilder.group({
|
||||
name: [""],
|
||||
@ -94,9 +107,11 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
||||
businessName: [""],
|
||||
plan: [this.plan],
|
||||
product: [this.product],
|
||||
secretsManager: this.secretsManagerSubscription,
|
||||
});
|
||||
|
||||
plans: PlanResponse[];
|
||||
passwordManagerPlans: PlanResponse[];
|
||||
secretsManagerPlans: PlanResponse[];
|
||||
|
||||
private destroy$ = new Subject<void>();
|
||||
|
||||
@ -111,8 +126,9 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
||||
private organizationService: OrganizationService,
|
||||
private logService: LogService,
|
||||
private messagingService: MessagingService,
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private organizationApiService: OrganizationApiServiceAbstraction
|
||||
private formBuilder: FormBuilder,
|
||||
private organizationApiService: OrganizationApiServiceAbstraction,
|
||||
private configService: ConfigServiceAbstraction
|
||||
) {
|
||||
this.selfHosted = platformUtilsService.isSelfHost();
|
||||
}
|
||||
@ -120,7 +136,13 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
||||
async ngOnInit() {
|
||||
if (!this.selfHosted) {
|
||||
const plans = await this.apiService.getPlans();
|
||||
this.plans = plans.data;
|
||||
this.passwordManagerPlans = plans.data.filter(
|
||||
(plan) => plan.bitwardenProduct === BitwardenProductType.PasswordManager
|
||||
);
|
||||
this.secretsManagerPlans = plans.data.filter(
|
||||
(plan) => plan.bitwardenProduct === BitwardenProductType.SecretsManager
|
||||
);
|
||||
|
||||
if (this.product === ProductType.Enterprise || this.product === ProductType.Teams) {
|
||||
this.formGroup.controls.businessOwned.setValue(true);
|
||||
}
|
||||
@ -131,12 +153,9 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
||||
this.changedOwnedBusiness();
|
||||
}
|
||||
|
||||
if (!this.createOrganization || this.acceptingSponsorship) {
|
||||
this.formGroup.controls.product.setValue(ProductType.Families);
|
||||
this.changedProduct();
|
||||
}
|
||||
|
||||
if (this.createOrganization) {
|
||||
if (!this.createOrganization) {
|
||||
this.upgradeFlowPrefillForm();
|
||||
} else {
|
||||
this.formGroup.controls.name.addValidators([Validators.required, Validators.maxLength(50)]);
|
||||
this.formGroup.controls.billingEmail.addValidators(Validators.required);
|
||||
}
|
||||
@ -148,6 +167,11 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
||||
this.singleOrgPolicyAppliesToActiveUser = policyAppliesToActiveUser;
|
||||
});
|
||||
|
||||
this.showSecretsManagerSubscribe = await this.configService.getFeatureFlagBool(
|
||||
FeatureFlag.SecretsManagerBilling,
|
||||
false
|
||||
);
|
||||
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
@ -165,7 +189,15 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
get selectedPlan() {
|
||||
return this.plans.find((plan) => plan.type === this.formGroup.controls.plan.value);
|
||||
return this.passwordManagerPlans.find(
|
||||
(plan) => plan.type === this.formGroup.controls.plan.value
|
||||
);
|
||||
}
|
||||
|
||||
get selectedSecretsManagerPlan() {
|
||||
return this.secretsManagerPlans.find(
|
||||
(plan) => plan.type === this.formGroup.controls.plan.value
|
||||
);
|
||||
}
|
||||
|
||||
get selectedPlanInterval() {
|
||||
@ -173,7 +205,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
get selectableProducts() {
|
||||
let validPlans = this.plans.filter((plan) => plan.type !== PlanType.Custom);
|
||||
let validPlans = this.passwordManagerPlans.filter((plan) => plan.type !== PlanType.Custom);
|
||||
|
||||
if (this.formGroup.controls.businessOwned.value) {
|
||||
validPlans = validPlans.filter((plan) => plan.canBeUsedByBusiness);
|
||||
@ -191,7 +223,9 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
||||
);
|
||||
|
||||
if (this.acceptingSponsorship) {
|
||||
const familyPlan = this.plans.find((plan) => plan.type === PlanType.FamiliesAnnually);
|
||||
const familyPlan = this.passwordManagerPlans.find(
|
||||
(plan) => plan.type === PlanType.FamiliesAnnually
|
||||
);
|
||||
this.discount = familyPlan.basePrice;
|
||||
validPlans = [familyPlan];
|
||||
}
|
||||
@ -200,7 +234,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
get selectablePlans() {
|
||||
return this.plans?.filter(
|
||||
return this.passwordManagerPlans?.filter(
|
||||
(plan) =>
|
||||
!plan.legacyYear && !plan.disabled && plan.product === this.formGroup.controls.product.value
|
||||
);
|
||||
@ -231,21 +265,32 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
||||
);
|
||||
}
|
||||
|
||||
seatTotal(plan: PlanResponse): number {
|
||||
seatTotal(plan: PlanResponse, seats: number): number {
|
||||
if (!plan.hasAdditionalSeatsOption) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return plan.seatPrice * Math.abs(this.formGroup.controls.additionalSeats.value || 0);
|
||||
return plan.seatPrice * Math.abs(seats || 0);
|
||||
}
|
||||
|
||||
get subtotal() {
|
||||
additionalServiceAccountTotal(plan: PlanResponse): number {
|
||||
if (!plan.hasAdditionalServiceAccountOption) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (
|
||||
plan.additionalPricePerServiceAccount *
|
||||
Math.abs(this.secretsManagerForm.value.additionalServiceAccounts || 0)
|
||||
);
|
||||
}
|
||||
|
||||
get passwordManagerSubtotal() {
|
||||
let subTotal = this.selectedPlan.basePrice;
|
||||
if (
|
||||
this.selectedPlan.hasAdditionalSeatsOption &&
|
||||
this.formGroup.controls.additionalSeats.value
|
||||
) {
|
||||
subTotal += this.seatTotal(this.selectedPlan);
|
||||
subTotal += this.seatTotal(this.selectedPlan, this.formGroup.value.additionalSeats);
|
||||
}
|
||||
if (
|
||||
this.selectedPlan.hasAdditionalStorageOption &&
|
||||
@ -262,18 +307,39 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
||||
return subTotal - this.discount;
|
||||
}
|
||||
|
||||
get secretsManagerSubtotal() {
|
||||
const plan = this.selectedSecretsManagerPlan;
|
||||
const formValues = this.secretsManagerForm.value;
|
||||
|
||||
if (!this.planOffersSecretsManager || !formValues.enabled) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
let subTotal = plan.basePrice;
|
||||
if (plan.hasAdditionalSeatsOption && formValues.userSeats) {
|
||||
subTotal += this.seatTotal(plan, formValues.userSeats);
|
||||
}
|
||||
|
||||
if (plan.hasAdditionalStorageOption && formValues.additionalServiceAccounts) {
|
||||
subTotal += this.additionalServiceAccountTotal(this.selectedPlan);
|
||||
}
|
||||
|
||||
return subTotal;
|
||||
}
|
||||
|
||||
get freeTrial() {
|
||||
return this.selectedPlan.trialPeriodDays != null;
|
||||
}
|
||||
|
||||
get taxCharges() {
|
||||
return this.taxComponent != null && this.taxComponent.taxRate != null
|
||||
? (this.taxComponent.taxRate / 100) * this.subtotal
|
||||
? (this.taxComponent.taxRate / 100) *
|
||||
(this.passwordManagerSubtotal + this.secretsManagerSubtotal)
|
||||
: 0;
|
||||
}
|
||||
|
||||
get total() {
|
||||
return this.subtotal + this.taxCharges || 0;
|
||||
return this.passwordManagerSubtotal + this.secretsManagerSubtotal + this.taxCharges || 0;
|
||||
}
|
||||
|
||||
get paymentDesc() {
|
||||
@ -286,6 +352,14 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
get secretsManagerForm() {
|
||||
return this.formGroup.controls.secretsManager;
|
||||
}
|
||||
|
||||
get planOffersSecretsManager() {
|
||||
return this.selectedSecretsManagerPlan != null;
|
||||
}
|
||||
|
||||
changedProduct() {
|
||||
this.formGroup.controls.plan.setValue(this.selectablePlans[0].type);
|
||||
if (!this.selectedPlan.hasPremiumAccessOption) {
|
||||
@ -303,6 +377,14 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
||||
) {
|
||||
this.formGroup.controls.additionalSeats.setValue(1);
|
||||
}
|
||||
|
||||
if (this.planOffersSecretsManager) {
|
||||
this.secretsManagerForm.enable();
|
||||
} else {
|
||||
this.secretsManagerForm.disable();
|
||||
}
|
||||
|
||||
this.secretsManagerForm.updateValueAndValidity();
|
||||
}
|
||||
|
||||
changedOwnedBusiness() {
|
||||
@ -407,6 +489,9 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
||||
request.billingAddressCountry = this.taxComponent.taxInfo.country;
|
||||
request.billingAddressPostalCode = this.taxComponent.taxInfo.postalCode;
|
||||
|
||||
// Secrets Manager
|
||||
this.buildSecretsManagerRequest(request);
|
||||
|
||||
// Retrieve org info to backfill pub/priv key if necessary
|
||||
const org = await this.organizationService.get(this.organizationId);
|
||||
if (!org.hasPublicAndPrivateKeys) {
|
||||
@ -462,6 +547,9 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
// Secrets Manager
|
||||
this.buildSecretsManagerRequest(request);
|
||||
|
||||
if (this.providerId) {
|
||||
const providerRequest = new ProviderOrganizationCreateRequest(
|
||||
this.formGroup.controls.clientOwnerEmail.value,
|
||||
@ -517,4 +605,40 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
private buildSecretsManagerRequest(
|
||||
request: OrganizationCreateRequest | OrganizationUpgradeRequest
|
||||
): void {
|
||||
const formValues = this.secretsManagerForm.value;
|
||||
|
||||
request.useSecretsManager = this.planOffersSecretsManager && formValues.enabled;
|
||||
|
||||
if (!request.useSecretsManager) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.selectedSecretsManagerPlan.hasAdditionalSeatsOption) {
|
||||
request.additionalSmSeats = formValues.userSeats;
|
||||
}
|
||||
|
||||
if (this.selectedSecretsManagerPlan.hasAdditionalServiceAccountOption) {
|
||||
request.additionalServiceAccounts = formValues.additionalServiceAccounts;
|
||||
}
|
||||
}
|
||||
|
||||
private upgradeFlowPrefillForm() {
|
||||
if (this.acceptingSponsorship) {
|
||||
this.formGroup.controls.product.setValue(ProductType.Families);
|
||||
this.changedProduct();
|
||||
return;
|
||||
}
|
||||
|
||||
// If they already have SM enabled, bump them up to Teams and enable SM to maintain this access
|
||||
const organization = this.organizationService.get(this.organizationId);
|
||||
if (organization.useSecretsManager) {
|
||||
this.formGroup.controls.product.setValue(ProductType.Teams);
|
||||
this.secretsManagerForm.controls.enabled.setValue(true);
|
||||
this.changedProduct();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -38,11 +38,15 @@ export class InitService {
|
||||
|
||||
init() {
|
||||
return async () => {
|
||||
// Workaround to ignore stateService.activeAccount until process.env.URLS are set
|
||||
// TODO: Remove this when implementing ticket PM-2637
|
||||
this.environmentService.initialized = false;
|
||||
await this.stateService.init();
|
||||
|
||||
const urls = process.env.URLS as Urls;
|
||||
urls.base ??= this.win.location.origin;
|
||||
this.environmentService.setUrls(urls);
|
||||
this.environmentService.initialized = true;
|
||||
|
||||
setTimeout(() => this.notificationsService.init(), 3000);
|
||||
(this.vaultTimeoutService as VaultTimeoutService).init(true);
|
||||
|
@ -50,6 +50,7 @@ import { UpdatePasswordComponent } from "../auth/update-password.component";
|
||||
import { UpdateTempPasswordComponent } from "../auth/update-temp-password.component";
|
||||
import { VerifyEmailTokenComponent } from "../auth/verify-email-token.component";
|
||||
import { VerifyRecoverDeleteComponent } from "../auth/verify-recover-delete.component";
|
||||
import { SecretsManagerBillingModule } from "../billing/organizations/secrets-manager/sm-billing.module";
|
||||
import { AddCreditComponent } from "../billing/settings/add-credit.component";
|
||||
import { AdjustPaymentComponent } from "../billing/settings/adjust-payment.component";
|
||||
import { BillingHistoryViewComponent } from "../billing/settings/billing-history-view.component";
|
||||
@ -123,6 +124,9 @@ import { SharedModule } from "./shared.module";
|
||||
ChangeKdfModule,
|
||||
DynamicAvatarComponent,
|
||||
AccountFingerprintComponent,
|
||||
|
||||
// To be removed when OrganizationPlansComponent is moved to its own module (see AC-1453)
|
||||
SecretsManagerBillingModule,
|
||||
],
|
||||
declarations: [
|
||||
PremiumBadgeComponent,
|
||||
|
@ -38,7 +38,6 @@ import { OrganizationService } from "@bitwarden/common/admin-console/abstraction
|
||||
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
||||
import { TokenService } from "@bitwarden/common/auth/abstractions/token.service";
|
||||
import { DEFAULT_PBKDF2_ITERATIONS, EventType, KdfType } from "@bitwarden/common/enums";
|
||||
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
||||
import { ServiceUtils } from "@bitwarden/common/misc/serviceUtils";
|
||||
import { TreeNode } from "@bitwarden/common/models/domain/tree-node";
|
||||
import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service";
|
||||
@ -857,19 +856,11 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
async isLowKdfIteration() {
|
||||
const showLowKdfEnabled = await this.configService.getFeatureFlagBool(
|
||||
FeatureFlag.DisplayLowKdfIterationWarningFlag
|
||||
);
|
||||
|
||||
if (showLowKdfEnabled) {
|
||||
const kdfType = await this.stateService.getKdfType();
|
||||
const kdfOptions = await this.stateService.getKdfConfig();
|
||||
return kdfType === KdfType.PBKDF2_SHA256 && kdfOptions.iterations < DEFAULT_PBKDF2_ITERATIONS;
|
||||
}
|
||||
|
||||
return showLowKdfEnabled;
|
||||
}
|
||||
|
||||
protected async repromptCipher(ciphers: CipherView[]) {
|
||||
const notProtected = !ciphers.find((cipher) => cipher.reprompt !== CipherRepromptType.None);
|
||||
|
||||
|
@ -658,7 +658,7 @@
|
||||
"message": "Hovedadgangskoden er den adgangskode, du bruger, når du tilgår din boks. Det er meget vigtigt, at hovedadgangskoden ikke glemmes, da der ikke er nogen måde, hvorpå den kan genoprettes."
|
||||
},
|
||||
"masterPassImportant": {
|
||||
"message": "Hovedadgangskoder kan ikke gendannes, hvis du glemmer dem!"
|
||||
"message": "Hovedadgangskoden kan ikke gendannes, hvis den glemmes!"
|
||||
},
|
||||
"masterPassHintDesc": {
|
||||
"message": "Et hovedadgangskodetip kan bidrage til at komme i tanke om adgangskoden, hvis den glemmes."
|
||||
@ -5231,7 +5231,7 @@
|
||||
"description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Connect login with SSO to your self-hosted decryption key server. Using this option, members won’t need to use their master passwords to decrypt vault data. The require SSO authentication and single organization policies are required to set up Key Connector decryption. Contact Bitwarden Support for set up assistance.'"
|
||||
},
|
||||
"memberDecryptionKeyConnectorDescLink": {
|
||||
"message": "require SSO authentication and single organization policies",
|
||||
"message": "kræver SSO-godkendelse samt enkeltorganisationspolitikker",
|
||||
"description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Connect login with SSO to your self-hosted decryption key server. Using this option, members won’t need to use their master passwords to decrypt vault data. The require SSO authentication and single organization policies are required to set up Key Connector decryption. Contact Bitwarden Support for set up assistance.'"
|
||||
},
|
||||
"memberDecryptionKeyConnectorDescEnd": {
|
||||
|
@ -6908,26 +6908,62 @@
|
||||
"removeMembersWithoutMasterPasswordWarning": {
|
||||
"message": "Removing members who do not have master passwords without setting one for them may restrict access to their full account."
|
||||
},
|
||||
"passwordManager": {
|
||||
"message": "Password Manager"
|
||||
"secretsManagerForPlan": {
|
||||
"message": "Secrets Manager for $PLAN$",
|
||||
"placeholders": {
|
||||
"plan": {
|
||||
"content": "$1",
|
||||
"example": "Teams"
|
||||
}
|
||||
}
|
||||
},
|
||||
"freeOrganization": {
|
||||
"message": "Free Organization"
|
||||
"secretsManagerForPlanDesc": {
|
||||
"message": "For engineering and DevOps teams to manage secrets throughout the software development lifecycle."
|
||||
},
|
||||
"free2PersonOrganization": {
|
||||
"message": "Free 2-person Organizations"
|
||||
},
|
||||
"unlimitedSecrets": {
|
||||
"message": "Unlimited secrets"
|
||||
},
|
||||
"unlimitedProjects": {
|
||||
"message": "Unlimited projects"
|
||||
},
|
||||
"projectsIncluded": {
|
||||
"message": "$COUNT$ projects included",
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"content": "$1",
|
||||
"example": "3"
|
||||
}
|
||||
}
|
||||
},
|
||||
"serviceAccountsIncluded": {
|
||||
"message": "$COUNT$ service accounts included",
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"content": "$1",
|
||||
"example": "3"
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalServiceAccountCost": {
|
||||
"message": "$COST$ per month for additional service accounts",
|
||||
"placeholders": {
|
||||
"cost": {
|
||||
"content": "$1",
|
||||
"example": "$0.50"
|
||||
}
|
||||
}
|
||||
},
|
||||
"addSecretsManager": {
|
||||
"message": "Add Secrets Manager"
|
||||
},
|
||||
"addSecretsManagerUpgradeDesc": {
|
||||
"message": "Add Secrets Manager to your upgraded plan to maintain access to any secrets created with your previous plan."
|
||||
},
|
||||
"additionalServiceAccounts": {
|
||||
"message": "Additional Service Accounts"
|
||||
},
|
||||
"limitServiceAccounts": {
|
||||
"message": "Limit service accounts (optional)"
|
||||
},
|
||||
"limitServiceAccountsDesc": {
|
||||
"message": "Set a limit for your service accounts. Once this limit is reached, you will not be able to create new service accounts."
|
||||
},
|
||||
"serviceAccountLimit": {
|
||||
"message": "Service account limit (optional)"
|
||||
},
|
||||
"maxServiceAccountCost": {
|
||||
"message": "Max potential service account cost"
|
||||
"message": "Additional service accounts"
|
||||
},
|
||||
"additionalServiceAccountsDesc": {
|
||||
"message": "Your plan comes with $COUNT$ service accounts. You can add additional service accounts for $COST$ per month.",
|
||||
@ -6941,5 +6977,29 @@
|
||||
"example": "$0.50"
|
||||
}
|
||||
}
|
||||
},
|
||||
"passwordManagerPlanPrice": {
|
||||
"message": "Password Manager plan price"
|
||||
},
|
||||
"secretsManagerPlanPrice": {
|
||||
"message": "Secrets Manager plan price"
|
||||
},
|
||||
"passwordManager": {
|
||||
"message": "Password Manager"
|
||||
},
|
||||
"freeOrganization": {
|
||||
"message": "Free Organization"
|
||||
},
|
||||
"limitServiceAccounts": {
|
||||
"message": "Limit service accounts (optional)"
|
||||
},
|
||||
"limitServiceAccountsDesc": {
|
||||
"message": "Set a limit for your service accounts. Once this limit is reached, you will not be able to create new service accounts."
|
||||
},
|
||||
"serviceAccountLimit": {
|
||||
"message": "Service account limit (optional)"
|
||||
},
|
||||
"maxServiceAccountCost": {
|
||||
"message": "Max potential service account cost"
|
||||
}
|
||||
}
|
||||
|
@ -6553,7 +6553,7 @@
|
||||
"message": "Laskutuksen synkronoinnin ohje"
|
||||
},
|
||||
"licensePaidFeaturesHelp": {
|
||||
"message": "Maksullisen lisenssin oiminaisuusopas"
|
||||
"message": "Maksullisen lisenssin ominaisuusopas"
|
||||
},
|
||||
"selfHostGracePeriodHelp": {
|
||||
"message": "Kun tilauksesi päättyy, sinulla on 60 päivää aikaa päivittää organisaatiosi lisenssitiedosto ajan tasalle. Varoaika päättyy $GRACE_PERIOD_END_DATE$.",
|
||||
@ -6830,7 +6830,7 @@
|
||||
"description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Once authenticated, members will decrypt vault data using a key stored on their device. The master password reset policy with automatic enrollment will turn on when this option is used.'"
|
||||
},
|
||||
"notFound": {
|
||||
"message": "$RESOURCE$ ei löytynyt",
|
||||
"message": "Resurssia $RESOURCE$ ei löytynyt",
|
||||
"placeholders": {
|
||||
"resource": {
|
||||
"content": "$1",
|
||||
|
@ -574,7 +574,7 @@
|
||||
"message": "Êtes-vous sûr de vouloir écraser le mot de passe actuel ?"
|
||||
},
|
||||
"editedFolder": {
|
||||
"message": "Dossier modifié"
|
||||
"message": "Dossier enregistré"
|
||||
},
|
||||
"addedFolder": {
|
||||
"message": "Dossier ajouté"
|
||||
@ -634,7 +634,7 @@
|
||||
"message": "Commencer la Période d'Essai"
|
||||
},
|
||||
"logIn": {
|
||||
"message": "S'identifier"
|
||||
"message": "Se connecter"
|
||||
},
|
||||
"logInInitiated": {
|
||||
"message": "Connexion initiée"
|
||||
@ -676,7 +676,7 @@
|
||||
"message": "Paramètres"
|
||||
},
|
||||
"passwordHint": {
|
||||
"message": "Indice du mot de passe"
|
||||
"message": "Indice de mot de passe"
|
||||
},
|
||||
"enterEmailToGetHint": {
|
||||
"message": "Saisissez l'adresse électronique de votre compte pour recevoir l'indice de votre mot de passe principal."
|
||||
@ -6900,6 +6900,6 @@
|
||||
"message": "Aucun mot de passe principal"
|
||||
},
|
||||
"removeMembersWithoutMasterPasswordWarning": {
|
||||
"message": "La suppression des membres qui n'ont pas de mot de passe principal sans leur en définir un, peut restreindre l'accès à leur compte dans soin intégralité."
|
||||
"message": "La suppression des membres qui n'ont pas de mot de passe principal sans leur en définir un, peut restreindre l'accès à leur compte dans son intégralité."
|
||||
}
|
||||
}
|
||||
|
@ -6849,7 +6849,7 @@
|
||||
"description": "A 'fingerprint phrase' is a unique word phrase (similar to a passphrase) that a user can use to authenticate their organization's public key with another user, for the purposes of sharing."
|
||||
},
|
||||
"deviceApprovals": {
|
||||
"message": "Approvazioni dispositivi"
|
||||
"message": "Approva dispositivi"
|
||||
},
|
||||
"deviceApprovalsDesc": {
|
||||
"message": "Approva le richieste di accesso qui sotto per consentire ai membri di completare l'accesso. Le richieste non approvate scadono dopo 1 settimana. Verifica le informazioni del membro prima di approvare."
|
||||
@ -6870,7 +6870,7 @@
|
||||
"message": "Approva richiesta"
|
||||
},
|
||||
"noDeviceRequests": {
|
||||
"message": "Nessuna richiesta dispositivo"
|
||||
"message": "Nessuna richiesta da approvare"
|
||||
},
|
||||
"noDeviceRequestsDesc": {
|
||||
"message": "Le richieste di approvazione dei dispositivi dei membri appariranno qui"
|
||||
|
@ -1001,7 +1001,7 @@
|
||||
"message": "Confirmar a palavra-passe do ficheiro"
|
||||
},
|
||||
"accountRestrictedOptionDescription": {
|
||||
"message": "Use your account encryption key, derived from your account's username and Master Password, to encrypt the export and restrict import to only the current Bitwarden account."
|
||||
"message": "Utilize a chave de encriptação da sua conta, derivada do nome de utilizador e da palavra-passe mestra da sua conta, para encriptar a exportação e restringir a importação apenas à conta Bitwarden atual."
|
||||
},
|
||||
"passwordProtectedOptionDescription": {
|
||||
"message": "Defina uma palavra-passe do ficheiro para encriptar a exportação e importe-a para qualquer conta Bitwarden utilizando a palavra-passe de desencriptação."
|
||||
@ -1256,7 +1256,7 @@
|
||||
"message": "Dados importados com sucesso"
|
||||
},
|
||||
"importSuccessNumberOfItems": {
|
||||
"message": "A total of $AMOUNT$ items were imported.",
|
||||
"message": "Foi importado um total de $AMOUNT$ itens.",
|
||||
"placeholders": {
|
||||
"amount": {
|
||||
"content": "$1",
|
||||
@ -1919,7 +1919,7 @@
|
||||
}
|
||||
},
|
||||
"premiumPriceWithFamilyPlan": {
|
||||
"message": "Go premium for just $PRICE$ /year, or get premium accounts for $FAMILYPLANUSERCOUNT$ users and unlimited family sharing with a ",
|
||||
"message": "Adquira uma conta Premium por apenas $PRICE$ /ano, ou obtenha contas Premium para $FAMILYPLANUSERCOUNT$ utilizadores e partilha familiar ilimitada com um ",
|
||||
"placeholders": {
|
||||
"price": {
|
||||
"content": "$1",
|
||||
@ -1932,7 +1932,7 @@
|
||||
}
|
||||
},
|
||||
"bitwardenFamiliesPlan": {
|
||||
"message": "Bitwarden Families plan."
|
||||
"message": "plano Familiar do Bitwarden."
|
||||
},
|
||||
"addons": {
|
||||
"message": "Addons"
|
||||
@ -2029,7 +2029,7 @@
|
||||
"message": "Cancelar subscrição"
|
||||
},
|
||||
"subscriptionExpiration": {
|
||||
"message": "Subscription expiration"
|
||||
"message": "Validade da subscrição"
|
||||
},
|
||||
"subscriptionCanceled": {
|
||||
"message": "A subscrição foi cancelada."
|
||||
@ -2265,7 +2265,7 @@
|
||||
}
|
||||
},
|
||||
"planNameFamilies": {
|
||||
"message": "Famílias"
|
||||
"message": "Familiar"
|
||||
},
|
||||
"planDescFamilies": {
|
||||
"message": "Para uso pessoal, para partilhar com a família e amigos."
|
||||
@ -2472,7 +2472,7 @@
|
||||
"message": "Tem a certeza de que pretende eliminar este grupo?"
|
||||
},
|
||||
"deleteMultipleGroupsConfirmation": {
|
||||
"message": "Are you sure you want to delete the following $QUANTITY$ group(s)?",
|
||||
"message": "Tem a certeza de que pretende eliminar o(s) seguinte(s) $QUANTITY$ grupo(s)?",
|
||||
"placeholders": {
|
||||
"quantity": {
|
||||
"content": "$1",
|
||||
@ -2532,7 +2532,7 @@
|
||||
"message": "Editar membro"
|
||||
},
|
||||
"fieldOnTabRequiresAttention": {
|
||||
"message": "A field on the '$TAB$' tab requires your attention.",
|
||||
"message": "Um campo no separador '$TAB$' precisa da sua atenção.",
|
||||
"placeholders": {
|
||||
"tab": {
|
||||
"content": "$1",
|
||||
@ -2823,7 +2823,7 @@
|
||||
}
|
||||
},
|
||||
"deletedCollections": {
|
||||
"message": "Deleted collections"
|
||||
"message": "Coleções eliminadas"
|
||||
},
|
||||
"deletedCollectionId": {
|
||||
"message": "Coleção $ID$ eliminada.",
|
||||
@ -2871,7 +2871,7 @@
|
||||
}
|
||||
},
|
||||
"deletedManyGroups": {
|
||||
"message": "Deleted $QUANTITY$ group(s).",
|
||||
"message": "$QUANTITY$ grupo(s) eliminados.",
|
||||
"placeholders": {
|
||||
"quantity": {
|
||||
"content": "$1",
|
||||
@ -3363,7 +3363,7 @@
|
||||
}
|
||||
},
|
||||
"subscriptionFreePlan": {
|
||||
"message": "You cannot invite more than $COUNT$ members without upgrading your plan.",
|
||||
"message": "Não pode convidar mais do que $COUNT$ membros sem atualizar o seu plano.",
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"content": "$1",
|
||||
@ -3372,7 +3372,7 @@
|
||||
}
|
||||
},
|
||||
"subscriptionFamiliesPlan": {
|
||||
"message": "You cannot invite more than $COUNT$ members without upgrading your plan. Please contact Customer Support to upgrade.",
|
||||
"message": "Não pode convidar mais do que $COUNT$ membros sem atualizar o seu plano. Contacte o Apoio ao cliente para atualizar.",
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"content": "$1",
|
||||
@ -3381,7 +3381,7 @@
|
||||
}
|
||||
},
|
||||
"subscriptionSponsoredFamiliesPlan": {
|
||||
"message": "Your subscription allows for a total of $COUNT$ members. Your plan is sponsored and billed to an external organization.",
|
||||
"message": "A sua subscrição permite um total de $COUNT$ membros. O seu plano é patrocinado e faturado por uma organização externa.",
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"content": "$1",
|
||||
@ -5443,7 +5443,7 @@
|
||||
"message": "Histórico de faturação"
|
||||
},
|
||||
"backToReports": {
|
||||
"message": "Back to reports"
|
||||
"message": "Voltar aos relatórios"
|
||||
},
|
||||
"organizationPicker": {
|
||||
"message": "Organization picker"
|
||||
@ -5503,7 +5503,7 @@
|
||||
"message": "Palavra aleatória"
|
||||
},
|
||||
"service": {
|
||||
"message": "Service"
|
||||
"message": "Serviço"
|
||||
},
|
||||
"unknownCipher": {
|
||||
"message": "Item desconhecido, poderá ser necessário pedir autorização para aceder a este item."
|
||||
@ -5961,7 +5961,7 @@
|
||||
"message": "A eliminação de contas de serviço é permanente e irreversível."
|
||||
},
|
||||
"deleteServiceAccountsConfirmMessage": {
|
||||
"message": "Delete $COUNT$ service accounts",
|
||||
"message": "Eliminar $COUNT$ contas de serviço",
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"content": "$1",
|
||||
@ -5970,13 +5970,13 @@
|
||||
}
|
||||
},
|
||||
"deleteServiceAccountToast": {
|
||||
"message": "Service account deleted"
|
||||
"message": "Conta de serviço eliminada"
|
||||
},
|
||||
"deleteServiceAccountsToast": {
|
||||
"message": "Service accounts deleted"
|
||||
"message": "Contas de serviço eliminadas"
|
||||
},
|
||||
"searchServiceAccounts": {
|
||||
"message": "Search service accounts",
|
||||
"message": "Procurar contas de serviço",
|
||||
"description": "Placeholder text for searching service accounts."
|
||||
},
|
||||
"editServiceAccount": {
|
||||
@ -6071,7 +6071,7 @@
|
||||
}
|
||||
},
|
||||
"deleteProjectInputLabel": {
|
||||
"message": "Type \"$CONFIRM$\" to continue",
|
||||
"message": "Escreva \"$CONFIRM$\" para continuar",
|
||||
"description": "Users are prompted to type 'confirm' to delete a project",
|
||||
"placeholders": {
|
||||
"confirm": {
|
||||
@ -6081,7 +6081,7 @@
|
||||
}
|
||||
},
|
||||
"deleteProjectConfirmMessage": {
|
||||
"message": "Delete $PROJECT$",
|
||||
"message": "Eliminar $PROJECT$",
|
||||
"description": "Confirmation prompt to delete a specific project, where '$PROJECT$' is a placeholder for the name of the project.",
|
||||
"placeholders": {
|
||||
"project": {
|
||||
@ -6091,7 +6091,7 @@
|
||||
}
|
||||
},
|
||||
"deleteProjectsConfirmMessage": {
|
||||
"message": "Delete $COUNT$ Projects",
|
||||
"message": "Eliminar $COUNT$ projetos",
|
||||
"description": "Confirmation prompt to delete multiple projects, where '$COUNT$' is a placeholder for the number of projects to be deleted.",
|
||||
"placeholders": {
|
||||
"count": {
|
||||
@ -6113,22 +6113,22 @@
|
||||
"description": "Message to be displayed when there are no projects to display in the list."
|
||||
},
|
||||
"smConfirmationRequired": {
|
||||
"message": "Confirmation required",
|
||||
"message": "Confirmação necessária",
|
||||
"description": "Indicates that user confirmation is required for an action to proceed."
|
||||
},
|
||||
"bulkDeleteProjectsErrorMessage": {
|
||||
"message": "The following projects could not be deleted:",
|
||||
"message": "Os seguintes projetos não puderam ser eliminados:",
|
||||
"description": "Message to be displayed when there is an error during bulk project deletion."
|
||||
},
|
||||
"softDeleteSuccessToast": {
|
||||
"message": "Secret sent to trash",
|
||||
"message": "Segredo movido para o lixo",
|
||||
"description": "Notification to be displayed when a secret is successfully sent to the trash."
|
||||
},
|
||||
"hardDeleteSuccessToast": {
|
||||
"message": "Secret permanently deleted"
|
||||
"message": "Segredo eliminado permanentemente"
|
||||
},
|
||||
"accessTokens": {
|
||||
"message": "Access tokens",
|
||||
"message": "Tokens de acesso",
|
||||
"description": "Title for the section displaying access tokens."
|
||||
},
|
||||
"newAccessToken": {
|
||||
@ -6136,7 +6136,7 @@
|
||||
"description": "Button label for creating a new access token."
|
||||
},
|
||||
"expires": {
|
||||
"message": "Expires",
|
||||
"message": "Expira a",
|
||||
"description": "Label for the expiration date of an access token."
|
||||
},
|
||||
"canRead": {
|
||||
@ -6144,11 +6144,11 @@
|
||||
"description": "Label for the access level of an access token (Read only)."
|
||||
},
|
||||
"accessTokensNoItemsTitle": {
|
||||
"message": "No access tokens to show",
|
||||
"message": "Sem tokens de acesso para mostrar",
|
||||
"description": "Title to be displayed when there are no access tokens to display in the list."
|
||||
},
|
||||
"accessTokensNoItemsDesc": {
|
||||
"message": "To get started, create an access token",
|
||||
"message": "Para começar, crie um token de acesso",
|
||||
"description": "Message to be displayed when there are no access tokens to display in the list."
|
||||
},
|
||||
"downloadAccessToken": {
|
||||
@ -6156,7 +6156,7 @@
|
||||
"description": "Message to be displayed before closing an access token, reminding the user to download or copy it."
|
||||
},
|
||||
"expiresOnAccessToken": {
|
||||
"message": "Expires on:",
|
||||
"message": "Expira a:",
|
||||
"description": "Label for the expiration date of an access token."
|
||||
},
|
||||
"accessTokenCallOutTitle": {
|
||||
@ -6164,15 +6164,15 @@
|
||||
"description": "Notification to inform the user that access tokens are only displayed once and cannot be retrieved again."
|
||||
},
|
||||
"copyToken": {
|
||||
"message": "Copy token",
|
||||
"message": "Copiar token",
|
||||
"description": "Copies the generated access token to the user's clipboard."
|
||||
},
|
||||
"accessToken": {
|
||||
"message": "Access token",
|
||||
"message": "Token de acesso",
|
||||
"description": "A unique string that gives a client application (eg. CLI) access to a secret or set of secrets."
|
||||
},
|
||||
"accessTokenExpirationRequired": {
|
||||
"message": "Expiration date required",
|
||||
"message": "Data de validade necessária",
|
||||
"description": "Error message indicating that an expiration date for the access token must be set."
|
||||
},
|
||||
"accessTokenCreatedAndCopied": {
|
||||
@ -6226,7 +6226,7 @@
|
||||
}
|
||||
},
|
||||
"groupInfo": {
|
||||
"message": "Group info"
|
||||
"message": "Informações do grupo"
|
||||
},
|
||||
"editGroupMembersDesc": {
|
||||
"message": "Grant members access to the group's assigned collections."
|
||||
@ -6241,22 +6241,22 @@
|
||||
"message": "If checked, this will replace all other collection permissions."
|
||||
},
|
||||
"selectMembers": {
|
||||
"message": "Select members"
|
||||
"message": "Selecionar membros"
|
||||
},
|
||||
"selectCollections": {
|
||||
"message": "Select collections"
|
||||
"message": "Selecionar coleções"
|
||||
},
|
||||
"role": {
|
||||
"message": "Função"
|
||||
},
|
||||
"removeMember": {
|
||||
"message": "Remove member"
|
||||
"message": "Remover membro"
|
||||
},
|
||||
"collection": {
|
||||
"message": "Collection"
|
||||
"message": "Coleção"
|
||||
},
|
||||
"noCollection": {
|
||||
"message": "No collection"
|
||||
"message": "Sem coleções"
|
||||
},
|
||||
"canView": {
|
||||
"message": "Pode ver"
|
||||
@ -6271,7 +6271,7 @@
|
||||
"message": "Pode editar, excepto palavras-passe"
|
||||
},
|
||||
"noCollectionsAdded": {
|
||||
"message": "No collections added"
|
||||
"message": "Sem coleções adicionadas"
|
||||
},
|
||||
"noMembersAdded": {
|
||||
"message": "No members added"
|
||||
@ -6364,28 +6364,28 @@
|
||||
}
|
||||
},
|
||||
"domainStatusVerified": {
|
||||
"message": "Verified"
|
||||
"message": "Verificado"
|
||||
},
|
||||
"domainStatusUnverified": {
|
||||
"message": "Unverified"
|
||||
"message": "Não verificado"
|
||||
},
|
||||
"domainNameTh": {
|
||||
"message": "Name"
|
||||
"message": "Nome"
|
||||
},
|
||||
"domainStatusTh": {
|
||||
"message": "Status"
|
||||
"message": "Estado"
|
||||
},
|
||||
"lastChecked": {
|
||||
"message": "Last checked"
|
||||
},
|
||||
"editDomain": {
|
||||
"message": "Edit domain"
|
||||
"message": "Editar domínio"
|
||||
},
|
||||
"domainFormInvalid": {
|
||||
"message": "There are form errors that need your attention"
|
||||
},
|
||||
"addedDomain": {
|
||||
"message": "Added domain $DOMAIN$",
|
||||
"message": "Domínio $DOMAIN$ adicionado",
|
||||
"placeholders": {
|
||||
"DOMAIN": {
|
||||
"content": "$1",
|
||||
@ -6421,16 +6421,16 @@
|
||||
}
|
||||
},
|
||||
"membersColumnHeader": {
|
||||
"message": "Member/Group"
|
||||
"message": "Membro/Grupo"
|
||||
},
|
||||
"groupAndMemberColumnHeader": {
|
||||
"message": "Member"
|
||||
"message": "Membro"
|
||||
},
|
||||
"selectGroupsAndMembers": {
|
||||
"message": "Select groups and members"
|
||||
"message": "Selecionar grupos e membros"
|
||||
},
|
||||
"selectGroups": {
|
||||
"message": "Select groups"
|
||||
"message": "Selecionar grupos"
|
||||
},
|
||||
"userPermissionOverrideHelper": {
|
||||
"message": "Permissions set for a member will replace permissions set by that member's group"
|
||||
@ -6439,13 +6439,13 @@
|
||||
"message": "No members or groups added"
|
||||
},
|
||||
"deleted": {
|
||||
"message": "Deleted"
|
||||
"message": "Eliminado"
|
||||
},
|
||||
"memberStatusFilter": {
|
||||
"message": "Member status filter"
|
||||
},
|
||||
"inviteMember": {
|
||||
"message": "Invite member"
|
||||
"message": "Convidar membro"
|
||||
},
|
||||
"needsConfirmation": {
|
||||
"message": "Needs confirmation"
|
||||
@ -6496,10 +6496,10 @@
|
||||
}
|
||||
},
|
||||
"server": {
|
||||
"message": "Server"
|
||||
"message": "Servidor"
|
||||
},
|
||||
"exportData": {
|
||||
"message": "Export data"
|
||||
"message": "Exportar dados"
|
||||
},
|
||||
"exportingOrganizationSecretDataTitle": {
|
||||
"message": "Exporting Organization Secret Data"
|
||||
@ -6619,13 +6619,13 @@
|
||||
"message": "This user can access the Secrets Manager Beta"
|
||||
},
|
||||
"important": {
|
||||
"message": "Important:"
|
||||
"message": "Importante:"
|
||||
},
|
||||
"viewAll": {
|
||||
"message": "View all"
|
||||
"message": "Ver tudo"
|
||||
},
|
||||
"showingPortionOfTotal": {
|
||||
"message": "Showing $PORTION$ of $TOTAL$",
|
||||
"message": "A mostrar $PORTION$ de $TOTAL$",
|
||||
"placeholders": {
|
||||
"portion": {
|
||||
"content": "$1",
|
||||
@ -6638,16 +6638,16 @@
|
||||
}
|
||||
},
|
||||
"resolveTheErrorsBelowAndTryAgain": {
|
||||
"message": "Resolve the errors below and try again."
|
||||
"message": "Resolva os erros abaixo e tente novamente."
|
||||
},
|
||||
"description": {
|
||||
"message": "Description"
|
||||
"message": "Descrição"
|
||||
},
|
||||
"errorReadingImportFile": {
|
||||
"message": "An error occurred when trying to read the import file"
|
||||
"message": "Ocorreu um erro ao tentar ler o ficheiro de importação"
|
||||
},
|
||||
"accessedSecret": {
|
||||
"message": "Accessed secret $SECRET_ID$.",
|
||||
"message": "Segredo $SECRET_ID$ acedido.",
|
||||
"placeholders": {
|
||||
"secret_id": {
|
||||
"content": "$1",
|
||||
@ -6660,29 +6660,29 @@
|
||||
"description": "Software Development Kit"
|
||||
},
|
||||
"createSecret": {
|
||||
"message": "Create a secret"
|
||||
"message": "Criar um segredo"
|
||||
},
|
||||
"createProject": {
|
||||
"message": "Create a project"
|
||||
"message": "Criar um projeto"
|
||||
},
|
||||
"createServiceAccount": {
|
||||
"message": "Create a service account"
|
||||
"message": "Criar uma conta de serviço"
|
||||
},
|
||||
"downloadThe": {
|
||||
"message": "Download the",
|
||||
"message": "Descarregar o",
|
||||
"description": "Link to a downloadable resource. This will be used as part of a larger phrase. Example: Download the Secrets Manager CLI"
|
||||
},
|
||||
"smCLI": {
|
||||
"message": "Secrets Manager CLI"
|
||||
"message": "gestor de segredos CLI"
|
||||
},
|
||||
"importSecrets": {
|
||||
"message": "Import secrets"
|
||||
"message": "Importar segredos"
|
||||
},
|
||||
"getStarted": {
|
||||
"message": "Get started"
|
||||
"message": "Começar"
|
||||
},
|
||||
"complete": {
|
||||
"message": "$COMPLETED$/$TOTAL$ Complete",
|
||||
"message": "$COMPLETED$/$TOTAL$ concluídos",
|
||||
"placeholders": {
|
||||
"COMPLETED": {
|
||||
"content": "$1",
|
||||
@ -6695,25 +6695,25 @@
|
||||
}
|
||||
},
|
||||
"restoreSecret": {
|
||||
"message": "Restore secret"
|
||||
"message": "Restaurar segredo"
|
||||
},
|
||||
"restoreSecrets": {
|
||||
"message": "Restore secrets"
|
||||
"message": "Restaurar segredos"
|
||||
},
|
||||
"restoreSecretPrompt": {
|
||||
"message": "Are you sure you want to restore this secret?"
|
||||
"message": "Tem a certeza de que quer recuperar este segredo?"
|
||||
},
|
||||
"restoreSecretsPrompt": {
|
||||
"message": "Are you sure you want to restore these secrets?"
|
||||
"message": "Tem a certeza de que quer recuperar estes segredos?"
|
||||
},
|
||||
"secretRestoredSuccessToast": {
|
||||
"message": "Secret restored"
|
||||
"message": "Segredo restaurado"
|
||||
},
|
||||
"secretsRestoredSuccessToast": {
|
||||
"message": "Secrets restored"
|
||||
"message": "Segredos restaurados"
|
||||
},
|
||||
"selectionIsRequired": {
|
||||
"message": "Selection is required."
|
||||
"message": "É necessária uma seleção."
|
||||
},
|
||||
"secretsManagerSubscriptionDesc": {
|
||||
"message": "Turn on organization access to the Secrets Manager at no charge during the Beta program. Users can be granted access to the Beta in Members."
|
||||
@ -6740,25 +6740,25 @@
|
||||
"message": "This action will remove your access to the service account."
|
||||
},
|
||||
"removeAccess": {
|
||||
"message": "Remove access"
|
||||
"message": "Remover acesso"
|
||||
},
|
||||
"checkForBreaches": {
|
||||
"message": "Check known data breaches for this password"
|
||||
"message": "Verificar violações de dados conhecidas para esta palavra-passe"
|
||||
},
|
||||
"exposedMasterPassword": {
|
||||
"message": "Exposed Master Password"
|
||||
"message": "Palavra-passe mestra exposta"
|
||||
},
|
||||
"exposedMasterPasswordDesc": {
|
||||
"message": "Password found in a data breach. Use a unique password to protect your account. Are you sure you want to use an exposed password?"
|
||||
"message": "Palavra-passe encontrada numa violação de dados. Utilize uma palavra-passe única para proteger a sua conta. Tem a certeza de que pretende utilizar uma palavra-passe exposta?"
|
||||
},
|
||||
"weakAndExposedMasterPassword": {
|
||||
"message": "Weak and Exposed Master Password"
|
||||
"message": "Palavra-passe mestra fraca e exposta"
|
||||
},
|
||||
"weakAndBreachedMasterPasswordDesc": {
|
||||
"message": "Weak password identified and found in a data breach. Use a strong and unique password to protect your account. Are you sure you want to use this password?"
|
||||
"message": "Palavra-passe fraca identificada e encontrada numa violação de dados. Utilize uma palavra-passe forte e única para proteger a sua conta. Tem a certeza de que pretende utilizar esta palavra-passe?"
|
||||
},
|
||||
"characterMinimum": {
|
||||
"message": "$LENGTH$ character minimum",
|
||||
"message": "$LENGTH$ caracteres no mínimo",
|
||||
"placeholders": {
|
||||
"length": {
|
||||
"content": "$1",
|
||||
@ -6783,14 +6783,14 @@
|
||||
"message": "Dispensar"
|
||||
},
|
||||
"notAvailableForFreeOrganization": {
|
||||
"message": "This feature is not available for free organizations. Contact your organization owner to upgrade."
|
||||
"message": "Esta funcionalidade não está disponível para organizações gratuitas. Contacte o proprietário da organização para atualizar."
|
||||
},
|
||||
"smProjectSecretsNoItemsNoAccess": {
|
||||
"message": "Contact your organization's admin to manage secrets for this project.",
|
||||
"message": "Contacte o administrador da sua organização para gerir os segredos deste projeto.",
|
||||
"description": "The message shown to the user under a project's secrets tab when the user only has read access to the project."
|
||||
},
|
||||
"enforceOnLoginDesc": {
|
||||
"message": "Require existing members to change their passwords"
|
||||
"message": "Exigir que os membros existentes alterem as suas palavras-passe"
|
||||
},
|
||||
"region": {
|
||||
"message": "Região"
|
||||
@ -6804,18 +6804,18 @@
|
||||
"description": "United States"
|
||||
},
|
||||
"smProjectDeleteAccessRestricted": {
|
||||
"message": "You don't have permissions to delete this project",
|
||||
"message": "Não tem permissões para eliminar este projeto",
|
||||
"description": "The individual description shown to the user when the user doesn't have access to delete a project."
|
||||
},
|
||||
"smProjectsDeleteBulkConfirmation": {
|
||||
"message": "The following projects can not be deleted. Would you like to continue?",
|
||||
"message": "Os seguintes projetos não podem ser eliminados. Gostaria de continuar?",
|
||||
"description": "The message shown to the user when bulk deleting projects and the user doesn't have access to some projects."
|
||||
},
|
||||
"updateKdfSettings": {
|
||||
"message": "Update KDF settings"
|
||||
"message": "Atualizar definições KDF"
|
||||
},
|
||||
"trustedDeviceEncryption": {
|
||||
"message": "Trusted device encryption"
|
||||
"message": "Encriptação de dispositivo de confiança"
|
||||
},
|
||||
"memberDecryptionTdeDescriptionStart": {
|
||||
"message": "Uma vez autenticados, os membros desencriptam os dados do cofre utilizando uma chave armazenada no seu dispositivo. A",
|
||||
|
@ -88,11 +88,10 @@ export class EnvironmentSelectorComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
async updateEnvironmentInfo() {
|
||||
this.selectedEnvironment = this.environmentService.selectedRegion;
|
||||
this.euServerFlagEnabled = await this.configService.getFeatureFlagBool(
|
||||
FeatureFlag.DisplayEuEnvironmentFlag
|
||||
);
|
||||
|
||||
this.selectedEnvironment = this.environmentService.selectedRegion;
|
||||
}
|
||||
|
||||
close() {
|
||||
|
@ -6,6 +6,7 @@ import { OrganizationSsoResponse } from "../../../auth/models/response/organizat
|
||||
import { OrganizationSubscriptionUpdateRequest } from "../../../billing/models/request/organization-subscription-update.request";
|
||||
import { OrganizationTaxInfoUpdateRequest } from "../../../billing/models/request/organization-tax-info-update.request";
|
||||
import { PaymentRequest } from "../../../billing/models/request/payment.request";
|
||||
import { SecretsManagerSubscribeRequest } from "../../../billing/models/request/sm-subscribe.request";
|
||||
import { BillingResponse } from "../../../billing/models/response/billing.response";
|
||||
import { OrganizationSubscriptionResponse } from "../../../billing/models/response/organization-subscription.response";
|
||||
import { PaymentResponse } from "../../../billing/models/response/payment.response";
|
||||
@ -16,7 +17,6 @@ import { StorageRequest } from "../../../models/request/storage.request";
|
||||
import { VerifyBankRequest } from "../../../models/request/verify-bank.request";
|
||||
import { ListResponse } from "../../../models/response/list.response";
|
||||
import { OrganizationApiKeyType } from "../../enums";
|
||||
import { OrganizationEnrollSecretsManagerRequest } from "../../models/request/organization/organization-enroll-secrets-manager.request";
|
||||
import { OrganizationCreateRequest } from "../../models/request/organization-create.request";
|
||||
import { OrganizationKeysRequest } from "../../models/request/organization-keys.request";
|
||||
import { OrganizationUpdateRequest } from "../../models/request/organization-update.request";
|
||||
@ -37,7 +37,10 @@ export class OrganizationApiServiceAbstraction {
|
||||
save: (id: string, request: OrganizationUpdateRequest) => Promise<OrganizationResponse>;
|
||||
updatePayment: (id: string, request: PaymentRequest) => Promise<void>;
|
||||
upgrade: (id: string, request: OrganizationUpgradeRequest) => Promise<PaymentResponse>;
|
||||
updateSubscription: (id: string, request: OrganizationSubscriptionUpdateRequest) => Promise<void>;
|
||||
updatePasswordManagerSeats: (
|
||||
id: string,
|
||||
request: OrganizationSubscriptionUpdateRequest
|
||||
) => Promise<void>;
|
||||
updateSeats: (id: string, request: SeatRequest) => Promise<PaymentResponse>;
|
||||
updateStorage: (id: string, request: StorageRequest) => Promise<PaymentResponse>;
|
||||
verifyBank: (id: string, request: VerifyBankRequest) => Promise<void>;
|
||||
@ -60,8 +63,5 @@ export class OrganizationApiServiceAbstraction {
|
||||
getSso: (id: string) => Promise<OrganizationSsoResponse>;
|
||||
updateSso: (id: string, request: OrganizationSsoRequest) => Promise<OrganizationSsoResponse>;
|
||||
selfHostedSyncLicense: (id: string) => Promise<void>;
|
||||
updateEnrollSecretsManager: (
|
||||
id: string,
|
||||
request: OrganizationEnrollSecretsManagerRequest
|
||||
) => Promise<void>;
|
||||
subscribeToSecretsManager: (id: string, request: SecretsManagerSubscribeRequest) => Promise<void>;
|
||||
}
|
||||
|
@ -23,4 +23,8 @@ export class OrganizationCreateRequest {
|
||||
billingAddressState: string;
|
||||
billingAddressPostalCode: string;
|
||||
billingAddressCountry: string;
|
||||
|
||||
useSecretsManager: boolean;
|
||||
additionalSmSeats: number;
|
||||
additionalServiceAccounts: number;
|
||||
}
|
||||
|
@ -11,4 +11,8 @@ export class OrganizationUpgradeRequest {
|
||||
billingAddressCountry: string;
|
||||
billingAddressPostalCode: string;
|
||||
keys: OrganizationKeysRequest;
|
||||
|
||||
useSecretsManager: boolean;
|
||||
additionalSmSeats: number;
|
||||
additionalServiceAccounts: number;
|
||||
}
|
||||
|
@ -1,3 +0,0 @@
|
||||
export class OrganizationEnrollSecretsManagerRequest {
|
||||
enabled: boolean;
|
||||
}
|
@ -7,6 +7,7 @@ import { OrganizationSsoResponse } from "../../../auth/models/response/organizat
|
||||
import { OrganizationSubscriptionUpdateRequest } from "../../../billing/models/request/organization-subscription-update.request";
|
||||
import { OrganizationTaxInfoUpdateRequest } from "../../../billing/models/request/organization-tax-info-update.request";
|
||||
import { PaymentRequest } from "../../../billing/models/request/payment.request";
|
||||
import { SecretsManagerSubscribeRequest } from "../../../billing/models/request/sm-subscribe.request";
|
||||
import { BillingResponse } from "../../../billing/models/response/billing.response";
|
||||
import { OrganizationSubscriptionResponse } from "../../../billing/models/response/organization-subscription.response";
|
||||
import { PaymentResponse } from "../../../billing/models/response/payment.response";
|
||||
@ -19,7 +20,6 @@ import { ListResponse } from "../../../models/response/list.response";
|
||||
import { SyncService } from "../../../vault/abstractions/sync/sync.service.abstraction";
|
||||
import { OrganizationApiServiceAbstraction } from "../../abstractions/organization/organization-api.service.abstraction";
|
||||
import { OrganizationApiKeyType } from "../../enums";
|
||||
import { OrganizationEnrollSecretsManagerRequest } from "../../models/request/organization/organization-enroll-secrets-manager.request";
|
||||
import { OrganizationCreateRequest } from "../../models/request/organization-create.request";
|
||||
import { OrganizationKeysRequest } from "../../models/request/organization-keys.request";
|
||||
import { OrganizationUpdateRequest } from "../../models/request/organization-update.request";
|
||||
@ -120,7 +120,7 @@ export class OrganizationApiService implements OrganizationApiServiceAbstraction
|
||||
return new PaymentResponse(r);
|
||||
}
|
||||
|
||||
async updateSubscription(
|
||||
async updatePasswordManagerSeats(
|
||||
id: string,
|
||||
request: OrganizationSubscriptionUpdateRequest
|
||||
): Promise<void> {
|
||||
@ -294,13 +294,16 @@ export class OrganizationApiService implements OrganizationApiServiceAbstraction
|
||||
);
|
||||
}
|
||||
|
||||
async updateEnrollSecretsManager(id: string, request: OrganizationEnrollSecretsManagerRequest) {
|
||||
await this.apiService.send(
|
||||
async subscribeToSecretsManager(
|
||||
id: string,
|
||||
request: SecretsManagerSubscribeRequest
|
||||
): Promise<void> {
|
||||
return await this.apiService.send(
|
||||
"POST",
|
||||
"/organizations/" + id + "/enroll-secrets-manager",
|
||||
"/organizations/" + id + "/subscribe-secrets-manager",
|
||||
request,
|
||||
true,
|
||||
true
|
||||
false
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -304,13 +304,16 @@ export class AuthService implements AuthServiceAbstraction {
|
||||
).encKey,
|
||||
pubKey.buffer
|
||||
);
|
||||
const encryptedMasterPassword = await this.cryptoService.rsaEncrypt(
|
||||
let encryptedMasterPassword = null;
|
||||
if ((await this.stateService.getKeyHash()) != null) {
|
||||
encryptedMasterPassword = await this.cryptoService.rsaEncrypt(
|
||||
Utils.fromUtf8ToArray(await this.stateService.getKeyHash()),
|
||||
pubKey.buffer
|
||||
);
|
||||
}
|
||||
const request = new PasswordlessAuthRequest(
|
||||
encryptedKey.encryptedString,
|
||||
encryptedMasterPassword.encryptedString,
|
||||
encryptedMasterPassword?.encryptedString,
|
||||
await this.appIdService.getAppId(),
|
||||
requestApproved
|
||||
);
|
||||
|
@ -0,0 +1,4 @@
|
||||
export class SecretsManagerSubscribeRequest {
|
||||
additionalSmSeats: number;
|
||||
additionalServiceAccounts: number;
|
||||
}
|
@ -6,9 +6,9 @@ import { BitwardenProductType } from "../../enums/bitwarden-product-type.enum";
|
||||
export class PlanResponse extends BaseResponse {
|
||||
type: PlanType;
|
||||
product: ProductType;
|
||||
bitwardenProduct: BitwardenProductType;
|
||||
name: string;
|
||||
isAnnual: boolean;
|
||||
bitwardenProduct: BitwardenProductType;
|
||||
nameLocalizationKey: string;
|
||||
descriptionLocalizationKey: string;
|
||||
canBeUsedByBusiness: boolean;
|
||||
@ -99,6 +99,7 @@ export class PlanResponse extends BaseResponse {
|
||||
this.seatPrice = this.getResponseProperty("SeatPrice");
|
||||
this.additionalStoragePricePerGb = this.getResponseProperty("AdditionalStoragePricePerGb");
|
||||
this.premiumAccessOptionPrice = this.getResponseProperty("PremiumAccessOptionPrice");
|
||||
|
||||
this.bitwardenProduct = this.getResponseProperty("BitwardenProduct");
|
||||
this.additionalPricePerServiceAccount = this.getResponseProperty(
|
||||
"AdditionalPricePerServiceAccount"
|
||||
|
@ -28,6 +28,7 @@ export abstract class EnvironmentService {
|
||||
usUrls: Urls;
|
||||
euUrls: Urls;
|
||||
selectedRegion?: Region;
|
||||
initialized = true;
|
||||
|
||||
hasBaseUrl: () => boolean;
|
||||
getNotificationsUrl: () => string;
|
||||
|
@ -12,6 +12,7 @@ export class EnvironmentService implements EnvironmentServiceAbstraction {
|
||||
private readonly urlsSubject = new Subject<void>();
|
||||
urls: Observable<void> = this.urlsSubject.asObservable();
|
||||
selectedRegion?: Region;
|
||||
initialized = true;
|
||||
|
||||
protected baseUrl: string;
|
||||
protected webVaultUrl: string;
|
||||
@ -49,6 +50,9 @@ export class EnvironmentService implements EnvironmentServiceAbstraction {
|
||||
this.stateService.activeAccount$
|
||||
.pipe(
|
||||
concatMap(async () => {
|
||||
if (!this.initialized) {
|
||||
return;
|
||||
}
|
||||
await this.setUrlsFromStorage();
|
||||
})
|
||||
)
|
||||
@ -157,22 +161,23 @@ export class EnvironmentService implements EnvironmentServiceAbstraction {
|
||||
|
||||
// fix environment urls for old users
|
||||
if (savedUrls.base === "https://vault.bitwarden.com") {
|
||||
this.setRegion(Region.US);
|
||||
await this.setRegion(Region.US);
|
||||
return;
|
||||
}
|
||||
if (savedUrls.base === "https://vault.bitwarden.eu") {
|
||||
this.setRegion(Region.EU);
|
||||
await this.setRegion(Region.EU);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (region) {
|
||||
case Region.EU:
|
||||
this.setRegion(Region.EU);
|
||||
await this.setRegion(Region.EU);
|
||||
return;
|
||||
case Region.US:
|
||||
this.setRegion(Region.US);
|
||||
await this.setRegion(Region.US);
|
||||
return;
|
||||
case Region.SelfHosted:
|
||||
case null:
|
||||
default:
|
||||
this.baseUrl = envUrls.base = savedUrls.base;
|
||||
this.webVaultUrl = savedUrls.webVault;
|
||||
@ -182,9 +187,9 @@ export class EnvironmentService implements EnvironmentServiceAbstraction {
|
||||
this.notificationsUrl = savedUrls.notifications;
|
||||
this.eventsUrl = envUrls.events = savedUrls.events;
|
||||
this.keyConnectorUrl = savedUrls.keyConnector;
|
||||
await this.setRegion(Region.SelfHosted);
|
||||
// scimUrl is not saved to storage
|
||||
this.urlsSubject.next();
|
||||
this.setRegion(Region.SelfHosted);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -270,7 +275,7 @@ export class EnvironmentService implements EnvironmentServiceAbstraction {
|
||||
case Region.SelfHosted:
|
||||
// if user saves with empty fields, default to US
|
||||
if (this.isEmpty()) {
|
||||
this.setRegion(Region.US);
|
||||
await this.setRegion(Region.US);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -881,7 +881,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
// Plan APIs
|
||||
|
||||
async getPlans(): Promise<ListResponse<PlanResponse>> {
|
||||
const r = await this.send("GET", "/plans/", null, false, true);
|
||||
const r = await this.send("GET", "/plans/all", null, false, true);
|
||||
return new ListResponse(r, PlanResponse);
|
||||
}
|
||||
|
||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -189,7 +189,7 @@
|
||||
},
|
||||
"apps/browser": {
|
||||
"name": "@bitwarden/browser",
|
||||
"version": "2023.5.0"
|
||||
"version": "2023.5.1"
|
||||
},
|
||||
"apps/cli": {
|
||||
"name": "@bitwarden/cli",
|
||||
@ -243,7 +243,7 @@
|
||||
},
|
||||
"apps/web": {
|
||||
"name": "@bitwarden/web-vault",
|
||||
"version": "2023.5.0"
|
||||
"version": "2023.5.1"
|
||||
},
|
||||
"libs/angular": {
|
||||
"name": "@bitwarden/angular",
|
||||
|
Loading…
Reference in New Issue
Block a user