Commit Graph

42 Commits

Author SHA1 Message Date
Helen Qin
433013a6d6 Update CreateCredentialRequest and GetCredentialOption with recent changes.
Specifically:
1. for the create request, add the api for prefetch data that's the partial request data used
   during the initial ping to each provider. This is needed for security
   reason, so that we don't send sensitive request data to providers
   until the user explicitly consents.
2. for both requests, add(unhide) the requireSystemProvider api, which when true indicates
   this request can only be fulfilled by system providers.

Bug: 246564035
Bug: 253153445
CTS-Coverage-Bug: 246637346
Test: Local Build & Deployment
Change-Id: I9f4a96dc28e87f92924abda8412b15010ee431b7
2022-12-01 04:00:33 +00:00
Helen Qin
d4984fab25 Require an app activity for launching UIs.
Apis (get/create credentials) that involves UIs now requires an app
activity as an input paramter that's used to launch UIs throughout the
flows. This way the UIs will be launched within the app activity task
stack.

Bug: 246564035
Bug: 253156924
Bug: 253156958
CTS-Coverage-Bug: 246637346
Test: Local Build & Deployment
Change-Id: Ia099c387adce516ebc52deb9ae00a6b046e9d296
2022-11-29 02:01:46 +00:00
Helen Qin
1db4fabbeb Unhide clearCredentialState framework api.
This API is independent of the get-credential api because at
the time of the get call, information about whether the previous /
existing user state should be cleared has already been lost. That is,
we can't have this as a parameter to the get call because it'd be
impossible to set it at that point.

Bug: 246564035
CTS-Coverage-Bug: 246637346
Test: Local Build & Deployment

Change-Id: Icc12a89039e7088bcee8fd6ae20a6349f730ac91
2022-11-29 01:51:17 +00:00
Reema Bajwa
63ef108320 Small fixes in create flow
Test: Locally built & deployed
Bug: 253155431

Change-Id: I0bd6b3dadf7cb1b228feeb7cfeaa0fe4b210510b
2022-11-22 17:40:02 +00:00
Reema Bajwa
211f017e10 Small fix an issue with extracting the provider list in the UI app for the get flow
Test: Built locally

Change-Id: I76aa910104eb04a5dac1f40ed45ba64e0757f19d
2022-11-19 02:46:21 +00:00
Helen Qin
3f3724a53b Launch the CredentialManager UI from the app context.
This is a temporary version that does not impact public apis. A
follow-up change will be sent out that adds the api changes and properly
launches the UI using an app activity, not just the context.

Test: deployed locally.
Bug: 246564035
Bug: 253156924
Bug: 253156958
Change-Id: I3f43fb7332d58f2baffab7a80c4550d95c67854e
2022-11-17 07:51:47 +00:00
Reema Bajwa
ca9571161d Adding authentication entry and remote entry piping
Test: Built & deployed locally
Bug: 253155340

Change-Id: I5e0e0479960caa14b1b782054fa10e74d146e73e
2022-11-16 23:18:25 +00:00
Qinmei Du
b78f3eed0e Add the Another device row in the more options screen
screencast: https://screencast.googleplex.com/cast/NTEwMDE0ODM2MDIxNjU3NnxmODFmOGRjMy0zMw

Test: deployed locally

Bug: 253157211
Change-Id: Ib0572d4b1b0e1f576b1cc748252782f382f8a4b1
2022-11-11 21:07:55 +00:00
Helen Qin
3e8c8a163a Merge "Properly define the Credential Manager dialog component name." 2022-11-09 07:59:55 +00:00
Helen Qin
9135b2e157 Properly define the Credential Manager dialog component name.
Bug: 247855226
Bug: 253156958
Test: local deployment
Change-Id: I562a8bae0fa1c7132cf262909525add34dbda19a
2022-11-08 19:58:45 +00:00
Helen Qin
b4e2a7040d Get flow fundamental E2E.
Get the regular paths (credential selection, cancellation, navigations
etc.) functional E2E.

Still missing cases like authentication entry, remote entry, etc. Those
will be added later.

Recording: http://shortn/_fEseNusjo2

Bug: 253157237
Test: local deployment
Change-Id: I715c0143c03f7a99a94da784542260590ab4767c
2022-11-08 16:45:46 +00:00
Helen Qin
7910cce410 Merge "Remove action chips from the create interface." 2022-11-03 21:12:35 +00:00
Helen Qin
2bcfd9810d Remove action chips from the create interface.
Test: local deployment
Bug: 247855226
Bug: 253156958
Change-Id: I6454fed7f100d4f5f985b5cd5d35753f81cf9732
2022-11-03 18:17:29 +00:00
Helen Qin
05537d6345 Change the app display name to app package name in RequestInfo.
Test: local deployment
Bug: 247855226
Bug: 253156958
Change-Id: I37c6748776fa51997add95453b4d7f02f5c82b91
2022-11-03 18:03:45 +00:00
Helen Qin
30ac7cbd1f Add the clearCredentialSession api to CredentialManager.
This api is similar to the web preventSilentAccess api that clears the
user credential session to prevent future automatic sign-in.

Test: local deployment
Bug: 256848673
Change-Id: I510fd0160d5689ef396fbf1078c42c0e1b643669
2022-11-01 21:05:07 +00:00
Helen Qin
1a0805ddce Modify the UI interface according to new product decisions.
Also split up the ProviderData into type specific subclasses: one for
get, one for create, and one for disabled providers.

Test: local deployment
Bug: 247855226
Bug: 253156958
Change-Id: I453e615c30a150dc2d3cf987c1affa7a9f4f9356
2022-11-01 16:54:18 +00:00
Helen Qin
2c7142a2f7 Merge "Define converter methods to parse the app requests." 2022-10-31 16:43:33 +00:00
Reema Bajwa
ad3a1f542d Add basic piping for providers and ux
Test: Built & deployed locally
Bug: 253155340

General TODOs :
- Locking
- Reduce logging post debugging phase
- More generalization/abstraction as create flow is added

Change-Id: Ib35fbe8a9118a62df346ecb19207e5b54f95b019
2022-10-28 16:57:15 +00:00
Helen Qin
0ff65e14f1 Define converter methods to parse the app requests.
Provides conversion between the framework requests and the jetpack
requests. Note that these classes technically should be defined in the
jetpack library but are temporarily left util we are able to ship the
jetpack code into the framework.

Bug: 255688485
Test: local deployment
Change-Id: I31ae459bb1578ee41492de1a2b0523f9ed72cee2
2022-10-28 06:04:50 +00:00
Helen Qin
c4f099a79a Merge "Change the entry id to key + subkey." 2022-10-25 04:41:01 +00:00
Helen Qin
1bf852b1b9 Change the entry id to key + subkey.
Test: deployed locally
Bug: 247855226
Bug: 253156958
Change-Id: I514c26a7db6c1ca77cadf5f214f165d26ec2fc24
2022-10-25 00:24:37 +00:00
Helen Qin
656b3eddc5 Define the password type value in the framework.
Bug: 246564035
Test: Local Build & Deployment
Change-Id: I6c4e55a9e8a6112598014b7917ed95050159c8e9
2022-10-24 23:18:45 +00:00
Helen Qin
da762f62f7 Finish the RequestInfo interface definition.
Test: deployed locally
Bug: 247855226
Bug: 253156958
Change-Id: I1669f66e1d1b4f7107e45521f4d6533f8801cb36
2022-10-24 16:42:16 +00:00
Helen Qin
85ec206396 Merge "Define the UI result code and corresponding data structures." 2022-10-24 16:32:41 +00:00
Helen Qin
2b2e8343c3 Define the UI result code and corresponding data structures.
Test: deployed locally
Bug: 247855226
Bug: 253156958
Change-Id: I489e4f44b09030bba20075eb3c174e9f5275e5ac
2022-10-21 19:19:37 +00:00
Helen Qin
56f629275b Fix the intent component name to launch the real UI.
Test: deployed locally
Bug: 247855226
Bug: 253156958
Change-Id: Ic1c4e2f0d848e845012421bf476810c485b71677
2022-10-21 18:56:07 +00:00
Helen Qin
ab4b22a3b5 Define all the entry-level display info in Entry.
Note that the UI has not started using the
new jetpack entry classes (defined under
packages/CredentialManager/src/com/android/credentialmanager/jetpack).
Next, the existing *UI.kt files under
packages/CredentialManager/src/com/android/credentialmanager needs to be
removed and the UI begin adopting these new structures.

Test: deployed locally
Bug: 247855226
Bug: 253156958
Change-Id: I35c48a4a224fad019efc10b841a1910ae940185c
2022-10-21 02:00:39 +00:00
Helen Qin
c0b50b7de4 Define all the provider-level info in ProviderData.
Test: deployed locally
Bug: 247855226
Change-Id: I7dee8e151cbd0c717c9266d223844c671d47c844
2022-10-19 18:51:06 +00:00
Helen Qin
b9243d392b Add utils for launching the ux.
This abstracts the understanding of the extra key mapping and result
recever parcelling.

Test: deployed locally
Bug: 247855226
Change-Id: Idc671f2f8118d098463f006e7d05d20e1e65cf77
2022-10-19 05:35:04 +00:00
Helen Qin
a85ae625b3 Handle finishing up a dialog.
Includes propagating the result back to the service and closing the
activity, when the user cancels (cancel code) or selects an entry
(success code + request token + provider chosen + entry chosen)

Test: deployed locally
Bug: 247855226
Change-Id: Ibbe2fa183d12eb43093aa1191b2691244f58e00c
2022-10-18 23:14:30 +00:00
Helen Qin
0bc03e3032 Use the launch intent data in the ux.
Note: The intent data is not a full list of everything we need yet so
the ux is looking a bit raw operating on the only information it can
get. Following up will be improving this.

Test: deployed locally
Bug: 247855226
Change-Id: Icd66866d37210486f3c5223c9e93b9b589476f96
2022-10-14 15:32:56 +00:00
Helen Qin
ecd059a111 Add entries to ProviderData.
Test: deployed locally
Bug: 247855226
Change-Id: Idcea420e90f5c995566556367cdafe009555b2d9
2022-10-11 16:27:35 +00:00
Helen Qin
c894292a02 Define UserSelectionResult for when a UI flow completes.
Contains information about what user has chosen during the credential
selection UI flow. Returned as part of the intent extras when the
activity completes successfully.

Test: deployed locally
Bug: 247855226
Change-Id: Ia8252280882407e4c766dca7a36e5fb79108240b
2022-10-06 16:37:17 +00:00
Helen Qin
2b6c3501c0 Merge "Add type and isFirstUsage to RequestInfo." 2022-10-05 18:20:35 +00:00
Helen Qin
30f7698c2d Merge "Allow requests to require system providers." 2022-10-05 16:48:03 +00:00
Helen Qin
9e5ed0027f Allow requests to require system providers.
With this bit set to true, a given request can only be fulfilled by
system providers matching the given credential type.

Bug: 246564035
Test: Local Build & Deployment
Change-Id: Ic842894bfa092e551f20a4f8c1a969395ede663f
2022-10-04 22:28:17 +00:00
Helen Qin
a22289147a Add error codes to CredentialManagerException.
Bug: 246564035
Test: Local Build & Deployment
Change-Id: Ib4817998135772c42c67d26638b669d2367da5a6
2022-10-04 21:51:39 +00:00
Helen Qin
3b3f177c3f Add type and isFirstUsage to RequestInfo.
Which will be used to decide which type of dialog to render, and whether
to render the provider-centric selection page, respectively.

Test: deployed locally
Bug: 247855226
Change-Id: Ief3d26dc85ead5df6f2031a20c61b29206cd0bdc
2022-10-04 19:50:30 +00:00
Helen Qin
6d6da715c5 Define the Request and Provider Info as part of the UI protocol.
The CredMan selector UI will expect request/provider info from the
launching intent. ProviderInfo contains metadata and entry info for a
single provider. RequestInfo contains metadata about the app request
that initiated this ui flow.

Test: deployed locally
Bug: 247855226
Change-Id: I3348ec582920d7d8019b272b8fc2b3c2d48404c6
2022-10-03 18:27:34 +00:00
Helen Qin
20ff355163 Framework credential manager developer APIs definitions.
The CredentialManager module provides solution for developers to create
or get credential from a user that can be used to authenticate to the app.
It can potentially launch system level UI flows to collect user consent,
render a unified selector when more than one credential exists, and
perform anything else needed.

Check bug id for detailed design.

Note that this is still very early stage of productionizing the module
and proper test cases will be added subsequently when the service
gets more concrete business logic.

Bug: 246564035
CTS-Coverage-Bug: 246637346
Test: Local Build & Deployment
Change-Id: Ia5884a7f6a3908de3b8b4b29f154f98e25730bd7
2022-10-03 07:28:30 +00:00
Reema Bajwa
461c8e3b2d Add initial skeleton implementation of Credential Manager
Test: built and tested locally

Change-Id: Ide7a4b586929b4175001ed02fce2f7245f9e31f2
2022-09-04 23:55:10 +00:00
Reema Bajwa
827821d058 Add dirtectories and OWNER files
Change-Id: I8c6cf6632696f128e1cc68e3850448a33c3d79f3
2022-08-23 18:15:22 +00:00