Skip to content

Conversation

@SaintPatrck
Copy link
Contributor

@SaintPatrck SaintPatrck commented Mar 13, 2025

๐ŸŽŸ๏ธ Tracking

PM-19108

๐Ÿ“” Objective

Allow users to manage trusted privileged applications and view
privileged applications that are trusted by external sources.

๐Ÿ“ธ Screenshots

Screen_recording_20250313_161906.mp4

โฐ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

๐Ÿฆฎ 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

@codecov
Copy link

codecov bot commented Mar 13, 2025

Codecov Report

All modified and coverable lines are covered by tests โœ…

Project coverage is 83.05%. Comparing base (ad6bc88) to head (3c1ef13).
Report is 403 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4862      +/-   ##
==========================================
- Coverage   89.49%   83.05%   -6.44%     
==========================================
  Files         499      628     +129     
  Lines       42507    48904    +6397     
  Branches     5985     6758     +773     
==========================================
+ Hits        38040    40619    +2579     
- Misses       2399     6011    +3612     
- Partials     2068     2274     +206     

โ˜” View full report in Codecov by Sentry.
๐Ÿ“ข Have feedback on the report? Share it here.

๐Ÿš€ New features to boost your workflow:
  • โ„๏ธ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 13, 2025

Logo
Checkmarx One โ€“ Scan Summary & Details โ€“ 0353ddad-9ae9-49b5-8f77-a1f963a0fb28

Great job, no security vulnerabilities found in this Pull Request

@SaintPatrck SaintPatrck force-pushed the innovation-sprint/privileged-apps/settings-mgmt branch from e26c43a to 15ae542 Compare March 13, 2025 20:26
}

item {
Spacer(modifier = Modifier.height(88.dp))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually reserve the 88.dp for screens that have a FAB and 16.dp for the rest of them

}

@Composable
private fun LazyItemScope.PrivilegedAppHeaderItem(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A LazyItemScope should not be composable?

if (canDelete) {
BitwardenStandardIconButton(
vectorIconRes = R.drawable.ic_send_pending_delete,
contentDescription = "",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have a contentDescription

cardStyle: CardStyle,
modifier: Modifier = Modifier,
) {
Row(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should already have standard components for this sort of thing already


@Preview
@Composable
private fun PrivilegedAppsListScreenPreview() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we call this function PrivilegedAppsListScreen_preview

Spacer(modifier = Modifier.height(8.dp))
}
itemsIndexed(
key = { _, item -> "communityTrust_${item.packageName}_${item.signature}" },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐Ÿ‘

cardStyle = state.communityTrustedApps
.toListItemCardStyle(index = index),
modifier = Modifier
.padding(horizontal = 16.dp)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the standardHorizontalMargin() function here

modifier = Modifier
.padding(horizontal = 16.dp)
.fillMaxWidth()
.animateItem(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐Ÿ‘

data class Fido2TrustState(
val googleTrustedApps: ImmutableList<PrivilegedAppListItem>,
val communityTrustedApps: ImmutableList<PrivilegedAppListItem>,
val userTrustedApps: ImmutableList<PrivilegedAppListItem>,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love that we can put ImmutableLists directly into parcelable classes now ๐Ÿ‘จโ€๐Ÿณ

}

override suspend fun getCommunityTrustedPrivilegedAppsOrNull(): PrivilegedAppAllowListJson? {
return withContext(ioScope.coroutineContext) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this specifically for the json .decodeFromStringOrNull part?

Introduces the ability to trust privileged applications for FIDO2 operations.

If a calling application is acting as a privileged application but is not yet trusted, the user will be given the option to trust the app and continue the operation, or to cancel the operation without trusting the application. If the application is trusted, subsequent requests from the application will be treated as a trusted application without user interaction.
@SaintPatrck SaintPatrck force-pushed the innovation-sprint/privileged-apps/trust-dialog branch from 465c5ce to 9beb3ec Compare March 19, 2025 20:03
Allow users to manage trusted privileged applications and view
privileged applications that are trusted by external sources.
โ€ฆps list

- Added a new vector graphic file `ic_delete.xml` for the delete icon.
- Updated the delete button icon in the `PrivilegedAppsListScreen` from `ic_send_pending_delete` to `ic_delete`.
- Removed unused string resources: `trusted_by_google_x`, `trusted_by_you_x`, and `trusted_by_the_community_c`.
@SaintPatrck SaintPatrck force-pushed the innovation-sprint/privileged-apps/settings-mgmt branch from 208e972 to 3c1ef13 Compare March 19, 2025 20:10
@SaintPatrck SaintPatrck linked an issue Apr 28, 2025 that may be closed by this pull request
1 task
@SaintPatrck SaintPatrck force-pushed the innovation-sprint/privileged-apps/trust-dialog branch 4 times, most recently from 51c8a2e to 1f201b0 Compare June 6, 2025 16:29
Base automatically changed from innovation-sprint/privileged-apps/trust-dialog to main June 6, 2025 18:20
@SaintPatrck SaintPatrck deleted the innovation-sprint/privileged-apps/settings-mgmt branch June 18, 2025 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

All lesser known browsers can't use passkeys

3 participants