-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PM-12606] Move Vault Timeout and Vault Timeout Settings to KM #13405
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #13405 +/- ##
===========================================
- Coverage 35.33% 15.76% -19.58%
===========================================
Files 3130 27 -3103
Lines 92592 1884 -90708
Branches 16809 0 -16809
===========================================
- Hits 32720 297 -32423
+ Misses 57431 1587 -55844
+ Partials 2441 0 -2441 ☔ View full report in Codecov by Sentry. |
Great job, no security vulnerabilities found in this Pull Request |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use relative imports when referencing the module we are in.
https://bitwarden.atlassian.net/wiki/spaces/EN/pages/1472626735/KM+Library+Strategy#Within-the-same-package
@@ -251,6 +253,7 @@ import AutofillService from "../autofill/services/autofill.service"; | |||
import { InlineMenuFieldQualificationService } from "../autofill/services/inline-menu-field-qualification.service"; | |||
import { SafariApp } from "../browser/safariApp"; | |||
import { BackgroundBrowserBiometricsService } from "../key-management/biometrics/background-browser-biometrics.service"; | |||
import VaultTimeoutService from "../key-management/vault-timeout/vault-timeout.service"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import VaultTimeoutService from "../key-management/vault-timeout/vault-timeout.service"; | |
import { VaultTimeoutService } from "../key-management/vault-timeout/vault-timeout.service"; |
VaultTimeout, | ||
VaultTimeoutAction, | ||
VaultTimeoutStringType, | ||
} from "@bitwarden/common/key-management/vault-timeout"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} from "@bitwarden/common/key-management/vault-timeout"; | |
} from "../../key-management/vault-timeout"; |
VaultTimeout, | ||
VaultTimeoutAction, | ||
VaultTimeoutStringType, | ||
} from "@bitwarden/common/key-management/vault-timeout"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} from "@bitwarden/common/key-management/vault-timeout"; | |
} from "../../key-management/vault-timeout"; |
@@ -7,6 +7,7 @@ import { | |||
UserDecryptionOptions, | |||
UserDecryptionOptionsServiceAbstraction, | |||
} from "@bitwarden/auth/common"; | |||
import { VaultTimeoutSettingsService } from "@bitwarden/common/key-management/vault-timeout"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { VaultTimeoutSettingsService } from "@bitwarden/common/key-management/vault-timeout"; | |
import { VaultTimeoutSettingsService } from "../../key-management/vault-timeout"; |
import { | ||
VaultTimeoutAction, | ||
VaultTimeoutSettingsService, | ||
} from "@bitwarden/common/key-management/vault-timeout"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} from "@bitwarden/common/key-management/vault-timeout"; | |
} from "../../key-management/vault-timeout"; |
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; | ||
import { Policy } from "@bitwarden/common/admin-console/models/domain/policy"; | ||
import { TokenService } from "@bitwarden/common/auth/abstractions/token.service"; | ||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; | ||
import { Utils } from "@bitwarden/common/platform/misc/utils"; | ||
import { | ||
FakeAccountService, | ||
mockAccountServiceWith, | ||
FakeStateProvider, | ||
} from "@bitwarden/common/spec"; | ||
import { UserId } from "@bitwarden/common/types/guid"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should use relative imports
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; | ||
import { PolicyType } from "@bitwarden/common/admin-console/enums"; | ||
import { Policy } from "@bitwarden/common/admin-console/models/domain/policy"; | ||
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; | ||
import { TokenService } from "@bitwarden/common/auth/abstractions/token.service"; | ||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; | ||
import { StateProvider } from "@bitwarden/common/platform/state"; | ||
import { UserId } from "@bitwarden/common/types/guid"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
relative imports
import { | ||
UserKeyDefinition, | ||
VAULT_TIMEOUT_SETTINGS_DISK_LOCAL, | ||
} from "@bitwarden/common/platform/state"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} from "@bitwarden/common/platform/state"; | |
} from "../../../platform/state"; |
import { SearchService } from "@bitwarden/common/abstractions/search.service"; | ||
import { AccountInfo } from "@bitwarden/common/auth/abstractions/account.service"; | ||
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; | ||
import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; | ||
import { FakeMasterPasswordService } from "@bitwarden/common/auth/services/master-password/fake-master-password.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 { StateService } from "@bitwarden/common/platform/abstractions/state.service"; | ||
import { Utils } from "@bitwarden/common/platform/misc/utils"; | ||
import { TaskSchedulerService } from "@bitwarden/common/platform/scheduling"; | ||
import { StateEventRunnerService } from "@bitwarden/common/platform/state"; | ||
import { FakeAccountService, mockAccountServiceWith } from "@bitwarden/common/spec"; | ||
import { UserId } from "@bitwarden/common/types/guid"; | ||
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; | ||
import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
relative import
import { SearchService } from "@bitwarden/common/abstractions/search.service"; | ||
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; | ||
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; | ||
import { InternalMasterPasswordServiceAbstraction } from "@bitwarden/common/auth/abstractions/master-password.service.abstraction"; | ||
import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; | ||
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 { StateService } from "@bitwarden/common/platform/abstractions/state.service"; | ||
import { TaskSchedulerService, ScheduledTaskNames } from "@bitwarden/common/platform/scheduling"; | ||
import { StateEventRunnerService } from "@bitwarden/common/platform/state"; | ||
import { UserId } from "@bitwarden/common/types/guid"; | ||
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; | ||
import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
relative import
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-12606
📔 Objective
Attempt 2 at moving Vault Timeout and Vault Timeout Settings to Key Management. This time keeping everything in common. Tested web, extension, desktop, and CLI.
This is mostly pure moves, only real change was exporting VaultTimeoutService as DefaultVaultTimeoutService and VaultTimeoutSettingsService as DefaultVaultTimeoutSettingsService. This meant renaming in consuming files.
📸 Screenshots
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes