1165 Commits

Author SHA1 Message Date
Jared Snider
0f93346a90 Auth/PM-21300 - Move registration from libs/auth to libs/angular (#24475)
* PM-21300 - Move registration from libs/auth to libs/angular

Relocates the registration feature (registration-start, registration-finish,
registration-link-expired, registration-env-selector) to
libs/angular/src/auth/registration with its own barrel. Browser, desktop, web,
and jslib-services now import from the new location. Adds the libs/angular mdx
glob to Storybook so the registration-start docs page keeps rendering.

* PM-21300 - Remove leftover import comment
2026-11-13 11:12:07 -05:00
Daniel Riera
80507e69c7 PM-44318 Add Autotype Default Keyboard Shortcut to Autotype GA Policy (#24427)
* PM-44318 Add Autotype Default Keyboard Shortcut to Autotype GA Policy

* address aikido feedback

* address design feedback

* address feedback
2026-11-13 14:11:32 +00:00
Jared
4d76bbfb69 Feature flag is no longer required, keep code that is relevant to the feature flag being on. Revoke the rest (#24645) 2026-11-12 14:30:54 -05:00
Bernd Schoolmann
6b8ce54785 [PM-46036] perf(browser): Stop decrypting and caching the whole vault (#24277) 2026-11-12 03:35:37 +09:00
Patrik Svensson
88fa09626a [PAM-574] Vault: CipherService stops messaging the overlay (#24659) 2026-11-11 11:01:31 +01:00
Jared Snider
2e7ca12dc5 Move FingerprintDialogComponent from libs/auth to libs/angular (#24451)
Relocates the fingerprint dialog to a new libs/angular/src/auth/fingerprint-dialog
feature folder with its own barrel. Browser and desktop now import it from
@bitwarden/angular/auth/fingerprint-dialog.
2026-11-09 13:26:36 -05:00
Jared Snider
bd4034b99a Move AuthRequestApiService from libs/auth to libs/common (#24453)
* Move AuthRequestApiService from libs/auth to libs/common

Relocates AuthRequestApiServiceAbstraction and DefaultAuthRequestApiService
to a new libs/common/src/auth/auth-request-api feature folder. Consumers now
import them from @bitwarden/common/auth/auth-request-api, which also removes
a restricted @bitwarden/auth/common import from DeviceManagementComponent.

* Rename auth-request-api feature folder to login-via-auth-request
2026-11-09 13:25:02 -05:00
adudek-bw
7f916b7d67 [PM-38256] Remove pm-30110-sdk-sends-api feature flag (#23913)
* [PM-38256] Remove pm-30110-sdk-sends-api feature flag

Remove the Pm30110SdkSendsApi feature flag and its checks so the SDK-backed
Send path is the only path.

- Drop the flag from the feature flag enum and defaults.
- Make Send decryption, key rotation and send push-notification sync
  SDK-only, and always run the pending Send deletion retry on sync.
- Always apply the 500 MB file Send size limit.
- Delete SendApiServiceSelector and fold SendSdkApiService into
  SendApiService. The merged class uses the SDK and makes REST calls itself
  for new-file save, cross-instance (apiUrl) access, and the read-back after
  each mutation.
- Remove getSend, getSends, putSendRemovePassword and deleteSend from the
  SendApiService abstraction; nothing outside the class called them.
- Inject the concrete SendApiService into ShareLinkService so share links
  keep resolving it.
- Update DI wiring and tests.

* [PM-38256] fix: Mock policiesByType$ in desktop send component spec

SendPolicyService now calls policiesByType$ unconditionally, so the
PolicyService mock must provide it.
2026-11-09 10:32:54 -05:00
adudek-bw
2fa9073746 [PM-42855] Rename Send removePassword/putSendRemovePassword to removeAuth (#23361)
* Rename Send removePassword/putSendRemovePassword to removeAuth (PM-42855)

The server collapsed the old password-only (V1) endpoint into remove-all-auth
(V2) logic a while back (server PR #6929 / PM-31497), so these methods remove
all auth on a Send today -- a password or an email-verification requirement
-- not just a password. Renames removePassword/putSendRemovePassword to
removeAuth/putSendRemoveAuth across SendApiService, SendSdkApiService,
SendApiServiceSelector, and every caller (DefaultSendFormService, send-details/
send-table/send-list components, web/desktop send components, the CLI's
internal call site), and corrects the matching user-facing copy that had the
same password-only framing bug.

Deliberately out of scope, left unchanged: the SDK's own remove_password
(WASM-exposed, a separate breaking change requiring its own SDK release), and
the CLI's public `remove-password` command name/class (SendRemovePasswordCommand)
-- only its internal call to the renamed service method was updated.

* [PM-42855] Show which kind of Send access control is being removed

Label the Send menu item, edit-page button, confirmation dialogs and success
toasts as "Remove password" or "Remove email verification" based on the
Send's authType, falling back to the generic wording when it is unknown. The
menu item now also appears for email-verified Sends.
2026-11-09 09:16:17 -05:00
Bernd Schoolmann
5eb14b4eca [PM-45502] Track icon loads on a DevTools track (#24049)
* Track icon loads on a DevTools track

Icons load too often in the desktop app, and nothing shows how often.
Record each icon image load, from URL bind to load or error, under
Performance > Vault > Icons. The URL is omitted: its hostname is vault
data.

* Provide LogService in specs rendering IconComponent

IconComponent now injects LogService to record icon loads, so specs
whose components render it need a provider.

* Provide LogService in icon stories

IconComponent now injects LogService to record load measurements.
Stories rendering it lacked the provider or mocked it without
startMeasurement, so the vault list failed to render.

* Fix import order in collections vault story

* Provide LogService in badge seam spec

* Provide LogService in applications table story

The story renders the vault icon, which now injects LogService for
load tracking. Without the provider the story failed to render.
2026-11-06 08:40:52 +09:00
Thomas Rittson
c5180132cb [PM-39833] Migrate POLICIES_NEW back to POLICIES (#24407)
Before this commit:
- POLICIES contains policies for confirmed organizations only, and is no longer used.
- POLICIES_NEW contains policies for accepted and confirmed organizations, and is used by policyService.

This commit copies POLICIES_NEW back to POLICIES; updates consumers to read from POLICIES; and drops POLICIES_NEW. This closes the loop so that we have a single state definition without the NEW suffix.
2026-11-06 09:05:33 +10:00
Andreas Coroiu
b4b11d8d5d [PM-42408] feat: Push lock and logout from LockService and LogoutService (#23880)
* [PM-42408] feat: Push lock and logout from LockService and LogoutService

Lock clears the SDK client's in-memory user key before USER_KEY is wiped,
so the client can't do crypto while the account is already reported as
locked. Logout disposes the client before the logout broadcast.

* Explain why the SDK client locks before the caches are cleared
2026-11-03 09:12:22 +01:00
vchauhan-bitwarden
41f307c001 [PM-45197] refactor: Move provider domain into libs/common/src/provider (#24257)
* [PM-45197] refactor: Move provider domain into libs/common/src/provider

* [PM-45197] refactor: Add barrel export for libs/common/src/provider Add libs/common/src/provider/index.ts and import provider types from
@bitwarden/common/provider outside libs/common, so the folder can move
again without touching every consumer. The service implementations stay
out of the barrel because the abstraction and the implementation are
both named ProviderService. Code inside libs/common keeps relative
imports to avoid circular imports. No behavior change.
2026-10-30 20:55:14 +05:30
Jared Snider
96f157b3e7 PM-46027 - Rename AccountDeletionService to AccountDeletionDialogService (#24287)
The libs/angular service only decides which dialog to show for account deletion and opens it, so its name now says so. This frees the AccountDeletionService name for a non-Angular service in libs/common that will delete the account and log the user out. Adds an index.ts barrel so consumers import from @bitwarden/angular/auth/account-deletion. No behavior change.
2026-10-29 21:58:29 +00:00
Jared Snider
cb5d262617 PM-46016 - Move LogoutService from libs/auth to libs/common/src/auth/logout (#24275)
Moves LogoutService, DefaultLogoutService, LogoutReason, and NewActiveUser to libs/common/src/auth/logout so libs/common code can depend on them. Updates all imports to @bitwarden/common/auth/logout and removes the no-restricted-imports suppressions that libs/common needed to import them from libs/auth. No behavior change.
2026-10-29 20:34:53 +00:00
Shane Melton
818548aa3f [PAM-336] Vault: edit, attach and delete for restricted ciphers (#24077) 2026-10-26 13:49:49 -07:00
Jared Snider
b58657797c KM/PM-44091 - Rename LegacyCompatKeyService.makeMasterKey() email parameter to salt (#23466)
* Rename makeMasterKey email parameter to salt

LegacyCompatKeyService.makeMasterKey took an `email: string`, but not every
valid master password salt is a valid email. Rename the parameter to
`salt: MasterPasswordSalt` so the signature matches what the value actually is.

Email-derived callers now produce the salt through MasterPasswordService.emailToSalt
rather than passing a raw email:
  - PasswordLoginStrategy (both non-SDK prelogin branches)
  - KeyConnectorService.convertNewSsoUserToKeyConnectorV1
  - DefaultChangeEmailService (legacy path)
  - SetInitialPasswordComponent, replacing a hand-rolled trim().toLowerCase()

Server-supplied salts (prelogin response, saltForUser$) assert at the call site,
matching how MasterPasswordUnlockResponse already reaches MasterPasswordSalt.

makeMasterKey keeps normalizing its input. Callers can reach MasterPasswordSalt by
type assertion, so normalization is not guaranteed upstream, and MasterPasswordService
normalizes defensively for the same reason.

* Use the resolved salt from PasswordInputResult when setting an initial password

InputPasswordComponent already resolves the salt through saltForUser$ and emits
it on the result. Deriving it again from this.email gave the legacy set-password
request a second, independent source. The two agree today, but they stop agreeing
once salt is disconnected from email.

Matches the other four call sites in this component and the guidance on
saltForUser$ to keep salt resolution inside that bottleneck.

* PM-44091 - Keep key rotation salt typed as MasterPasswordSalt

saltForUser$ already emits MasterPasswordSalt, but getCryptographicStateForUser,
MasterPasswordAuthenticationAndUnlockData, and makeServerMasterKeyAuthenticationHash
widened it to string, which forced an assertion before makeMasterKey. Narrow all
three so the salt keeps its type from saltForUser$ through to makeMasterKey.
2026-10-26 20:09:19 +00:00
Andreas Coroiu
c609e67180 [PM-42403][PM-42406] feat: Push unlock and organization keys ahead of their state writes (#23879)
* [PM-42403] refactor: Extract KeyService.toUserEncryptedOrgKeys

Pushing organization keys into a long-lived SDK client needs the same
conversion that encryptedOrgKeys$ does, from paths that hold the user's
private key directly. Pull it into a helper that takes the private key and
provider keys as arguments, and cover encryptedOrgKeys$ with tests.

* [PM-42406] feat: Push unlock and organization keys ahead of their state writes

Unlock tries the long-lived SDK client first and falls back to the
register client when there is none. After every unlock, and whenever
organization keys change, KeyService pushes the user-encrypted
organization keys to SdkService before they are written to state.
Organization keys cross into SdkService as the SDK's UnsignedSharedKey,
converted from EncString in KeyService. Building the payload never fails
an unlock or a sync.

* Remove dead guard from toUserEncryptedOrgKeys

* Test buildSdkUnlockData with no stored organization keys

* refactor: Signal unlock with a boolean and read the user key from state

* refactor: Return the unlocked SDK client from unlock instead of a boolean
2026-10-26 13:00:19 +01:00
Bryan Cunningham
57a9759866 [CL-1374] feat: Update illustration colors and token names (#24065)
* [CL-1374] feat: Update illustration colors and token names

Map the illustration tokens onto the new color palette per the
Design System color swaps, and rename them to match Figma:
outline -> stroke, bg-* -> fill-*, tertiary -> fill-accent.
illustration-logo is unchanged.

* Update Party and Gear illustrations to new artwork

* Use illustration tokens in SearchFolder icon
2026-10-23 11:01:22 -04:00
Jordan Aasen
1f0f20e130 [PM-28207] Remove pm-28192-cipher-attachment-ops-to-sdk feature flag (#23902) 2026-10-20 10:27:03 -07:00
SmithThe4th
d991f26560 [PM-43959] feat: Add the nav walkthrough steps (#23774)
* [PM-43959] feat: Add the VFO1 walkthrough steps

Defines the switch products, vault list and shared folders steps and provides
them to web and desktop. The shared folders step has its own id so the
new-user tour's step stays as it is.

* Show Done on the last coachmark step

* Anchor the vault list and shared folders walkthrough steps in the vault nav

* Anchor the switch products walkthrough step on the product switcher

* Drop the route constants test

* Provide a CoachmarkService mock in the product switcher story

* Skip the vault list walkthrough step when the nav has no Vaults section

* [PM-43959] feat: Let a spotlight anchor mark itself as the target

SpotlightService only searched an anchor's descendants for data-spotlight-target, so a marker on the anchor was ignored and a group of nav items spotlighted only its first item.

* Spotlight the whole Vaults block in the vault list step

* [PM-43959] feat: Add the VFO1 walkthrough steps

Defines the switch products, vault list and shared folders steps and provides
them to web and desktop. The shared folders step has its own id so the
new-user tour's step stays as it is.

* Anchor the vault list and shared folders walkthrough steps in the vault nav

* Drop the route constants test

* Skip the vault list walkthrough step when the nav has no Vaults section

* Let a spotlight anchor opt out of nested target lookup

Add spotlightTargetBoundary to bitPopoverAnchorFor and PopoverOptions so the anchor is ringed itself, and use it on the Vaults block in the nav.

* Show the VFO1 walkthrough to every account created before GA

* Remove spotlight target changes ahead of the UIF fix

* Update the tour callout copy to match the design

* Add the arrow to the intro dialog explore button
2026-10-16 10:29:58 -04:00
Nick Krantz
928f0440c4 [PM-34414] Remove pm-34410-attachment-upload-progress feature flag (#23604)
* [PM-34414] refactor: Always use progress-aware Azure attachment upload path

pm-34410-attachment-upload-progress is always true in production, so
AzureFileUploadService no longer needs to branch on it. Removes the
dead legacy (non-progress) upload path and the now-unused ConfigService
dependency, cascading through FileUploadService and its construction
sites.

* Always pass upload progress options through cipher attachment upload

* Remove unused pm-34410-attachment-upload-progress feature flag

* Check response status on progress-reporting attachment upload

ApiService.postAttachmentFile's XHR branch (used whenever onProgress is
set) never checked the response status before returning, unlike the
send() fallback and the Azure upload paths. A failed Direct (self-hosted)
attachment upload would resolve successfully with no thrown error, so
CipherFileUploadService never rolled back and the UI showed a false
success toast. Now always passing upload options through (PM-34414)
makes onProgress unconditional for these uploads, so this latent bug
needed fixing alongside it.

* Propagate XHR response headers so attachment upload errors keep server message

* [PM-34414] Guard XHR attachment upload against insecure API URLs

Add the same https:// check that fetch() enforces before calling
nativeXMLHttpRequest in postAttachmentFile, so bearer tokens are
not sent over plaintext HTTP for self-hosted users with http:// API URLs.

Add a test to assert InsecureUrlNotAllowedError is thrown and that
nativeXMLHttpRequest is never called when the API URL is insecure.
2026-10-15 15:45:18 -05:00
Andreas Coroiu
4f702cc498 [PM-42405] feat: Push feature flags from ConfigService.renewConfig (#23867)
A long-lived SDK client keeps the feature flags it was given, so
ConfigService pushes them on every per-user config renewal, before the
new config is written to state. The manual-DI apps construct SdkService
(and the AppIdService it needs) before KeyService and ConfigService so
both can depend on it.
2026-10-15 16:52:47 +02:00
Bernd Schoolmann
474596bee2 [PM-44494] fix(biometrics): fix biometric id update enrollment despite failed biometrics (#23646) 2026-10-15 20:57:41 +09:00
Andreas Coroiu
73246fb5ce [PM-42402] refactor: Resolve SdkService's cycle-forming dependencies lazily (#23861)
KeyService and ConfigService will take SdkService as a dependency, and
ApiService already reaches it at runtime through VaultTimeoutSettingsService
and KeyService. Taking those services as thunks lets SdkService be injected
into them without closing a construction cycle.
2026-10-15 13:41:21 +02:00
Jared Snider
c6c5deb3e7 Auth/PM-38259 - Desktop - Fix account switch loop and add AccountSwitcherService (#23699)
* PM-38259 - Add common AccountSwitcherService

Add AccountSwitcherService to libs/common/src/auth/account-switcher as the
shared home for account switching decisions. A logged-out account is never a
switch target.

- entries$: every account that is not logged out, the active account
  included, most recently active first, with the data an account switcher
  shows (status, avatar color, server hostname, isActive).
- nextSwitchableAccount$: the most recently active account, other than the
  active one, that is not logged out. Unlike AccountService.nextUpAccount$,
  it skips logged-out accounts.
- resolveActiveAccount(): keep, switch, or clear a logged-out active account.

Performing the switch and navigating stay with each client. Provided in
jslib-services so every Angular client can consume it; desktop is the first
consumer, and porting the browser extension is tracked as follow-up work.

* PM-38259 - Fix desktop account switch loop with AccountSwitcherService

With two or more accounts that use the "Log out" vault timeout action, the
desktop app could freeze on launch: the active account flipped between the
accounts in a loop.

Cause: those accounts keep their access token in memory only, so after a
restart they are logged out but keep their account info and activity. The
account switcher's ngOnInit switched a logged-out active account to
nextUpAccount$, which can pick another logged-out account. The switchAccount
handler treated any status other than Locked as unlocked, so it toggled
`loading`, which re-creates the router outlet and remounts the switcher. Its
ngOnInit then ran again and switched back.

Fix:
- AppComponent resolves a logged-out active account once per renderer load
  through AccountSwitcherService.resolveActiveAccount(), and switches through
  the existing switchAccount message so routing and sync still apply.
- The account switcher no longer runs that check in ngOnInit. It renders
  AccountSwitcherService.entries$, so the menu lists accounts by recency and a
  logged-out active account no longer shows an avatar.
- The switchAccount handler routes a logged-out target to login without
  syncing and without toggling `loading`.
- logOut() picks the next account with nextSwitchableAccount$, so it no
  longer switches to another logged-out account.

* PM-38259 - Rename AccountSwitcherEntry.server to serverHostname

The field holds the hostname of the account's server, so the name now says
so and no longer needs a comment.

* PM-38259 - Rename ActiveAccountResolution userId to targetUserId

The switch variant names the account that should become active, so
targetUserId states its role rather than leaving it as a generic userId.

* PM-38259 - Split AccountSwitcherService entries and own the account limit

entries$ now emits one AccountSwitcherEntries value: the active entry, the
inactive entries (most recently active first), and canAddAccount. Consumers
no longer split a flat list themselves, and one emission per change keeps the
active and inactive parts consistent during a switch. AccountSwitcherEntry no
longer carries isActive.

The service now owns the limit of five accounts that are not logged out:
- canAddAccount on entries$ for display, and canAddAccount$ for callers that
  need only the decision, without avatar or server lookups.
- The desktop switcher shows "Add account" from canAddAccount in place of a
  hard-coded count.
- The desktop max-accounts guard reads canAddAccount$ in place of its own
  constant and status filter, and gains a spec.

* PM-38259 - Add AccountSwitcherV2Component render spec

* PM-38259 - Document account switch loading and load-time resolution constraints

* PM-38259 - Deprecate nextUpAccount$ and add TODOs to adopt AccountSwitcherService

* PM-38259 - Add AccountSwitcherService tests for empty and changing account lists

* PM-38259 - Simplify AccountSwitcherService entry building

* PM-38259 - Rename toEntries$ variables to match their values
2026-10-13 22:00:11 +00:00
SmithThe4th
80a3122d82 [PM-44026] feat: Add the tour callout to the side nav (#23745)
* [PM-44026] feat: Add rocket icon

Used by the VFO1 tour callout in the side nav.

* Add the VFO1 tour callout to the web and desktop side navs

Adds the walkthrough nudge with a 30-day-before-GA account cutoff, the callout
service and component, and opens the side nav after the new-look dialog so the
callout is visible on small screens.

* Show the upgrade callout until the tour callout is visible

The tour callout only claims the callout slot once the new-look dialog is
dismissed, so users who never open that dialog keep the Premium callout.
2026-10-13 14:55:38 -04:00
Jackson Engstrom
e87d4568de [PM-44965] Update GA date (#23844) 2026-10-13 18:04:02 +00:00
Todd Martin
93832cc349 [PM-28650] Add logout reason in all remaining cases (#23317)
* Initial changes.

* Route direct logout paths through LogoutService and log callback logouts

Converts every direct messagingService.send("logout") site to
logoutService.logout(userId, reason). Introduces the reasons the new
sites needed: userInitiated, deauthorizedSessions, emailChanged,
kdfChanged, tooManyInvalidPinAttempts, keyConnectorError (existing).

Two paths cannot inject LogoutService and carry the reason on the message
payload instead: AccountService.delete (libs/common cannot depend on
libs/auth) and the Electron main-process menu (main process has no
Angular DI). LOGOUT_CALLBACK factory now logs the reason so
TokenService, SyncService, ServerNotifications, KeyConnector, and
ApiService paths get the same log line. Deletes an unreachable logOut
method from DefaultLoginDecryptionOptionsService.

* Log logout reason in browser background service worker

The browser background context wires its own logoutCallback into
TokenService, KeyConnectorService, SyncService, and
ServerNotificationsService. That callback bypassed the Angular DI
LOGOUT_CALLBACK factory that logs the reason, so background auth-failure
logouts (invalid access token, refresh-token retrieval failure,
key-connector error, sync-triggered accountDeleted or invalidSecurityStamp,
server logoutNotification) had no diagnostic log line.

Same one-line info log now fires at the callback entry, matching the
Angular factory.

* Assert new LogoutReason at each converted callsite in unit tests

Adds explicit expect(logoutService.logout).toHaveBeenCalledWith(userId, reason)
assertions to seven specs that were touched by the reason conversions but
did not verify the reason string. Prevents silent regressions if a reason
value is renamed or a callsite is refactored without updating the log.

Coverage added:
- AccountSecurityComponent logOut: userInitiated (or none when cancelled)
- ChangeEmailComponent submit: emailChanged
- ChangeKdfConfirmationComponent submit: kdfChanged (updates existing
  messagingService.send assertion)
- UserKeyRotationService rotate paths: userKeyRotation (SDK and TypeScript
  paths)
- LoginDecryptionOptionsComponent: missingEmailError on missing email,
  userInitiated on user-cancelled logout dialog
- KeyRotationDialogService: userKeyRotation on all three rotation paths
- LockComponent: userInitiated on user log-out, noUnlockOptionsAvailable
  on the fallback when no unlock options are available

* Fixed test input.

* Fixed incorrect "expired" property on msg.

* Made sure to get the right userId

* Add unit tests for logout-reason threading

Locks in behavior of the callers converted in this PR:

- RuntimeBackground.processMessage forwards `msg.logoutReason` (and
  `msg.userId`) to `MainBackground.logout`. Guards against a
  regression to the stale `msg.expired` field the prior code read.
- DefaultOrganizationInviteService passes
  `"masterPasswordPolicyEnforcement"` when the MP-policy detour logs
  the user out, on both `validateAndAcceptDirectOrgInvite` and
  `acceptOpenOrgInvite`.
- AccountMenuComponent passes `"userInitiated"` when the user hits
  the logout menu item.
- DeauthorizeSessionsComponent posts the security stamp then routes
  through `LogoutService.logout(userId, "deauthorizedSessions")`
  instead of the fire-and-forget `messagingService.send("logout")`.

* Drop unused MessagingService constructor dependency

`change-password.component.ts` and `set-initial-password.component.ts`
switched their sole `messagingService.send("logout")` call over to
`logoutService.logout(userId, ...)` earlier in this PR, leaving
`private messagingService: MessagingService` as a declared-but-unread
parameter property. The workspace has `noUnusedLocals` off and the
lint rule ignores unused parameter properties, so the compiler doesn't
catch it — every consumer still has to satisfy the dependency.

Removes the parameter and its import from both components, matching
the same cleanup this PR performed for
`DefaultLoginDecryptionOptionsService`/`WebLoginDecryptionOptionsService`.

* fix: prettier on account-menu.component.spec.ts

* Fixed test.

* Add missing log on app logout.

* Remove obsolete logout reason for KDF change.
2026-10-13 10:50:45 -04:00
Jonathan Prusik
f2cd9086e1 [PM-44316] Harden basic auth responses (#23585)
* limit scenarios in which a basic auth challenge is automatically responded to

* constrain responses to challenges by allowlisted subresource types

* additional adjustments for Firefox

* further exclude subresources entirely from auth challenge response

* catch source errors

* ensure the user basic auth setting is rechecked upon account switch

* move the basic auth resolved state up to the autofill settings service

* skip basic auth for Safari
2026-10-09 09:47:17 -04:00
Maciej Zieniuk
9bb0ef3457 remove no logout key upgrade rotation feature flag (#23758)
The #22849 PR changes how users get upgraded to v2 and the feature flag does not do anything useful anymore, hence can be safely removed from codebase.
2026-10-09 11:40:56 +00:00
Andreas Coroiu
f9c2570053 feat(automation-driver): expose the SDK client in dev builds (#23655)
* feat(automation-driver): expose the SDK debug tree as a capability

Adds SdkDebugCapability ("sdkDebug"), registered for every Angular
client. forUser(userId, fn) resolves the user's SDK client and runs fn
against client.debug(), the dev-only debug tree from sdk-internal#1512.
The tree is typed when linked against a debug-capabilities SDK build and
the call rejects on builds without it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* feat(automation-driver): expose the whole SDK client in dev builds

Replaces the debug-tree-only capability with SdkCapability ("sdk"),
whose forUser(userId, fn) hands fn the user's full PasswordManagerClient;
the debug tree is reachable as client.debug() on debug-capabilities SDK
builds. The provider returns null outside development builds
(PlatformUtilsService.isDev()) and the driver skips null capabilities, so
production builds do not register it at all.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 13:06:03 +00:00
Thomas Rittson
e0a7b861a8 [PM-41211] Move remaining invite link logic to sdk (#23308)
Update clients to use the new SDK invite-link client structure
and new admin methods that have been ported to the SDK.
Delete old TS api methods.

Methods consumed by Auth Team are marked as deprecated only.
2026-10-06 21:00:40 -05:00
Jackson Engstrom
ef59e9625d [PM-43953] Extension introduce new experience (#23467)
* add new experience dialog component

* create vfo1-onboarding-nudge service

* wire the new-experience-dialog to the extension

* changes from bit-simple-dialog to bit-dialog

* make dialog description text subtle

* prune comments

* update pngs

* fix learn more not dismissing nudge

* update comment

* update GA date

* update learn more url from placeholder

* update dismissal logic to only fire from one of the 3 buttons

* guard for failure to save nudge dismissal
2026-10-06 21:00:26 +00:00
Renee Lund
7329737655 Add PAM core icons (access connector, managed credential, target system) (#23689)
Adds three Bitwarden-objects icons for the Privileged Controls →
Rotation surface. Together they cover the three primary nouns the
rotation copy terminology uses — follows the pattern established in
#23346 (calendar, pause-circle, resume) for the same surface.

  - bwi-access-connector     An access connector (daemon) running
                             inside the customer's network that
                             performs rotation on target systems.
  - bwi-managed-credential   A vault item configured for scheduled
                             or on-demand rotation.
  - bwi-target-system        The external system (Entra, SQL Server,
                             custom script, etc.) where a managed
                             credential's password lives and is
                             rotated.

All three slot into the bitwardenObjects icon-data category
alphabetically — access-connector before admin-console,
managed-credential between id-card and passport, target-system
between sticky-note and users.

Co-authored-by: reneelund08 <222028173+reneelund08@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-10-06 20:27:36 +00:00
Jared
e47e97f297 [PM-43843] custom user with manage user permission is logged out when inviting member (#23201)
* Do not hit endpoint of prefillFromVerifiedDomains if the user cannot manage domain verification

* Utilizes new endpoint for invite by link tab of modal

* Utilize mini endpoint going forward

* Revert changes to frontend for adding new method for API call. API calls get added to SDK going forward

* Fixing up clients code to support latest changes to SDK method changes

* Fixes via PR comments from Brandon

* Fix tech debt comment from claude for PR

* Update to latest SDK
2026-10-06 15:51:49 -04:00
Bernd Schoolmann
ae828b43c2 [PM-44108] perf: Add performance measurements to unlock and sync (#23476) 2026-10-06 16:22:21 +00:00
Maciej Zieniuk
c3cb584330 Remove enroll-aead-on-key-rotation feature flagged code (#23671) 2026-10-06 09:48:18 +00:00
Jared
915ac1e9b4 [PM-38906] bulk decrypt collections with failures unstacked (#22886)
* Bulk decrypt with decrypt with failures new PR

* Implements rename feature for when a collection fails decryption via SDK call

* PR comments actioned on

* PR claude comment fixes

* PR claude comment fixes

* PR claude comments fixed

* PR Claude Comment fixes

* Rid of unused signal

* Fix up PR comments from Thomas

* Updates feature flag to proper key from epic

* Fix PR claude finding 1

* PR Claude comment fixes

* Fix PR comments

* Fix up message

* Rids of error badge in table to go back to existing behavior since no design/product capacity right now. Also rids of warning box above name of broken collection name
2026-10-05 13:58:27 -04:00
Jared Snider
9ce55cd212 Platform/PM-44117 - SDK client settings - Set device identifier (#23539)
* PM-44117 - Set device identifier on SDK client settings

* PM-44117 - Add client$ device identifier spec
2026-09-30 11:13:41 -04:00
Daniel García
787bad698e [PM-39411] feat: Wire flight recorder into clients behind flag (#23448)
* [PM-39411] feat: Wire flight recorder into clients behind flag

* Use cached backend

* Fix comments

* Change constructor interface

* Add flag removal note
2026-09-25 18:30:15 +02:00
Todd Martin
0ef19b577c chore(userId): Remove unused KeyApiService (#23376)
Originally slated for the ApiService userId opt-in migration in PR #23321, but KeyApiService.getUserPublicKeys has zero in-tree callers. Deleting the dead abstraction, its default implementation, its DI registration, and the PublicKeysResponseModel (also unused after this removal) is the correct move rather than migrating dead code.
2026-09-23 10:50:28 -04:00
Bernd Schoolmann
cbf86c23f0 chore(crypto): drop TS key connector; the master key and master-key-wrapped-user-key state (#23207)
* drop master key

* remove set master key

* rename key connector availability check

* cleanup

* cleanup

* cleanup

* fix tests

* cleanup

* cleanup

* Clean up tests
2026-09-23 20:43:20 +09:00
Renee Lund
7919d6f028 Add rotation icons (#23346)
Adds three icons used together for scheduled credential rotation
patterns (Admin Console → Privileged Controls → Rotation):

  - bwi-calendar      Date-based views (schedule / next rotation)
  - bwi-pause-circle  Pause a scheduled or recurring job
  - bwi-resume        Resume a paused scheduled or recurring job

Calendar sits in the miscObjects category alongside bwi-clock (its
time-based sibling). Pause-circle and resume sit in the actions
category with the other verb icons (bwi-refresh, bwi-download,
bwi-close, etc.); they're paired affordances a UI toggles between.

Co-authored-by: reneelund08 <222028173+reneelund08@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-09-21 14:01:42 -05:00
adudek-bw
8018df5735 [PM-42963] Roll back an orphaned file Send when its creation is cancelled mid-upload (#23220)
* Roll back an orphaned file Send when its creation is cancelled mid-upload (PM-42963)

Cancelling a file Send's dialog while the upload was still in flight left the
Send behind on the server with a corrupted/incomplete file: the create/upload
call kept running detached, and the existing rollback only fired when the
upload threw (e.g. a network failure), never on a user cancel. Thread an
AbortSignal through the save path as a "user asked to stop" flag; once the
upload settles, roll the Send back the same way a failed upload already does,
for both the SDK-backed and legacy Send-creation paths. Wrapping the dialog's
closePredicate (rather than only the Cancel button) covers every way of
closing the dialog — the header X and Escape key included.

* Fix CI failures: outdated selector spec assertions and a strict-mode DI mismatch

send-api-service.selector.spec.ts wasn't updated for the new saveView signal
param, so several toHaveBeenCalledWith assertions were missing the extra
argument. Separately, the new dialog integration spec injected the concrete
DefaultSendFormService directly instead of via the SendFormService token,
which fails TypeScript's strict-mode pass: DefaultSendFormService.sendFormConfig
is typed `SendFormConfig | null` against the abstract class's `SendFormConfig
| undefined`, a pre-existing mismatch that was never checked before nothing
assigned the concrete class where the abstract type was expected directly.

* Bail before uploading when the signal is already aborted

An abort landing before create_file_send/upload even starts still uploaded
the whole file and immediately deleted it, wasting the round trip for no
benefit — the same rollback contract is preserved either way, since
DefaultSendFormService already maps AbortError to undefined. Adds an early
check to both the legacy and SDK paths.

* Update libs/common/src/tools/send/services/send-api.service.abstraction.ts

Co-authored-by: John Harrington <84741727+harr1424@users.noreply.github.com>

* Trim the integration spec's top-of-describe comment to one sentence

Drop the ticket reference and backstory; keep only what the tests actually
do and why they drive dialogRef.close() directly.

---------

Co-authored-by: John Harrington <84741727+harr1424@users.noreply.github.com>
2026-09-17 11:38:22 -04:00
Jared Snider
400f2a0b45 Auth/PM-43265 - Password Prelogin - Adopt new SDK LoginClient Constructor (#23183)
* PM-43265 - Adopt argument-less SDK AuthClient.login()

The SDK's AuthClient.login() no longer takes ClientSettings; the
LoginClient now reuses the Client backing the AuthClient it came from.
Update the single call site in DefaultPasswordPreloginService to call
login() with no argument. The SDK client is already built with the
environment's identity URL, so the login request still targets the same
server.

This leaves environmentService unused on DefaultPasswordPreloginService,
so drop it from the constructor along with its registrations in the
Angular provider list and the CLI service container.

* PM-43265 - Bump sdk-internal to 0.2.0-main.1028

Picks up the published AuthClient.login() argument-less constructor change.
2026-09-16 13:35:06 -04:00
Shane Melton
f5dd74b5e4 Fix circular dependency in view password history service (#23215) 2026-09-16 16:21:38 +00:00
Shane Melton
381877f611 [PM-37378] VFO1 persist active filters (#22533)
* [PM-37379] Persist and restore vault filter state

* [PM-37379] Key vault filter memory on the shared VaultScope model

* [PM-37378] Cleanup Readme.md

* [PM-37378] Cleanup comments

* [PM-37378] Restore package-lock.json to main

* [PM-37378] Fix filter persistence leak when changing vault scope
2026-09-16 08:39:08 -07:00
neuronull
10854768ae Autotype: move shortcut component to shared lib (#22898)
Moves the Autotype shortcut component to the shared Angular libs space. This is in preparation for downstream work that will involve leveraging the component from the Admin Console.
2026-09-11 10:24:00 -06:00
Jared Snider
29af15b6ce Auth/PM-42704 - Rename auth icons to be generic for reuse (#22786)
* Rename TwoFactorTimeoutIcon to ExpiredIcon

* Rename TwoFactorAuthEmailIcon to EmailSentIcon

* Rename TwoFactorAuthSecurityKeyIcon/Failed to SecurityKeyIcon/SecurityKeyWarningIcon

* Rename EmailSentIcon to EmailCodeSentIcon
2026-09-09 23:32:28 -04:00