Skip to content

Add Play Integrity support to App Check #3658

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

Merged
merged 9 commits into from
Apr 19, 2022
Merged

Add Play Integrity support to App Check #3658

merged 9 commits into from
Apr 19, 2022

Conversation

rosalyntan
Copy link
Member

@rosalyntan rosalyntan commented Apr 15, 2022

All commits to this PR have been previously reviewed.

* Initial commit of App Check Play Integrity files.

* Added skeleton code for PlayIntegrityAppCheckProviderFactory and PlayIntegrityAppCheckProvider.

* Set version in gradle.properties to 16.0.0-beta01 for now.

* Updated wrong gradle.properties file in last commit.
* Implement Play Integrity exchange.

* Update and add unit tests.

* Add @nonnull annotation.
* Add method to call the `GeneratePlayIntegrityChallenge` endpoint to `NetworkClient`.

* Implement Play Integrity attestation flow.

* Add project number to IntegrityTokenRequest.

* Fix `PlayIntegrityAppCheckProviderTest`s.

* Add unit tests.

* Address review comments.
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 15, 2022

Size Report 1

Affected Products

  • firebase-appcheck

    TypeBase (2cbed1d)Merge (53695ef)Diff
    aar37.1 kB37.6 kB+416 B (+1.1%)
    apk (release)973 kB973 kB+204 B (+0.0%)
  • firebase-appcheck-debug

    TypeBase (2cbed1d)Merge (53695ef)Diff
    apk (release)975 kB976 kB+196 B (+0.0%)
  • firebase-appcheck-debug-testing

    TypeBase (2cbed1d)Merge (53695ef)Diff
    apk (release)1.01 MB1.01 MB+300 B (+0.0%)
  • firebase-appcheck-playintegrity

    TypeBase (2cbed1d)Merge (53695ef)Diff
    aar?9.75 kB? (?)
    apk (aggressive)?330 kB? (?)
    apk (release)?985 kB? (?)
  • firebase-appcheck-safetynet

    TypeBase (2cbed1d)Merge (53695ef)Diff
    apk (release)986 kB986 kB+292 B (+0.0%)

Test Logs

Notes

  • Commit (53695ef) is created by Prow via merging PR base commit (2cbed1d) and head commit (0fed01d).

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/bu3heTcu0T.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 15, 2022

Coverage Report 1

Affected Products

  • firebase-appcheck

    Overall coverage changed from 81.01% (2cbed1d) to 81.39% (53695ef) by +0.38%.

    FilenameBase (2cbed1d)Merge (53695ef)Diff
    NetworkClient.java75.34%77.78%+2.44%
  • firebase-appcheck-playintegrity

    Overall coverage changed from ? (2cbed1d) to 91.80% (53695ef) by ?.

    FilenameBase (2cbed1d)Merge (53695ef)Diff
    ExchangePlayIntegrityTokenRequest.java?100.00%?
    GeneratePlayIntegrityChallengeRequest.java?100.00%?
    GeneratePlayIntegrityChallengeResponse.java?100.00%?
    PlayIntegrityAppCheckProvider.java?88.24%?
    PlayIntegrityAppCheckProviderFactory.java?75.00%?
  • firebase-database

    Overall coverage changed from 50.16% (2cbed1d) to 50.19% (53695ef) by +0.03%.

    FilenameBase (2cbed1d)Merge (53695ef)Diff
    BooleanNode.java92.31%100.00%+7.69%
    ViewProcessor.java91.79%92.10%+0.30%
    WriteTree.java76.67%77.22%+0.56%
  • firebase-firestore

    Overall coverage changed from 46.11% (2cbed1d) to 46.28% (53695ef) by +0.17%.

    FilenameBase (2cbed1d)Merge (53695ef)Diff
    AsyncQueue.java78.11%78.61%+0.50%
    Datastore.java29.76%32.14%+2.38%
    FirestoreChannel.java16.38%18.10%+1.72%
    FirestoreClient.java31.11%38.52%+7.41%
    GrpcCallProvider.java62.35%69.41%+7.06%
    IndexBackfiller.java76.56%92.19%+15.63%
    LruGarbageCollector.java84.11%93.46%+9.35%
    PatchMutation.java98.39%100.00%+1.61%
  • firebase-messaging

    Overall coverage changed from 84.82% (2cbed1d) to 84.74% (53695ef) by -0.08%.

    FilenameBase (2cbed1d)Merge (53695ef)Diff
    MessagingAnalytics.java82.19%81.38%-0.81%
  • firebase-storage

    Overall coverage changed from 85.85% (2cbed1d) to 86.24% (53695ef) by +0.39%.

    FilenameBase (2cbed1d)Merge (53695ef)Diff
    StorageException.java65.45%69.09%+3.64%
    StorageTask.java84.29%84.89%+0.60%
    UploadTask.java80.58%82.37%+1.80%

Test Logs

Notes

  • Commit (53695ef) is created by Prow via merging PR base commit (2cbed1d) and head commit (0fed01d).
  • Run gradle <product>:checkCoverage to produce HTML coverage reports locally. After gradle commands finished, report files can be found under <product-build-dir>/reports/jacoco/.

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/kUlMSBDhIZ.html

@rosalyntan
Copy link
Member Author

/retest

@rosalyntan rosalyntan marked this pull request as ready for review April 18, 2022 17:52
Copy link
Contributor

@malcolmdeck malcolmdeck left a comment

Choose a reason for hiding this comment

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

LGTM :)

Copy link
Member

@vkryachko vkryachko left a comment

Choose a reason for hiding this comment

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

Could you also please run ./gradlew :appcheck:firebase-appcheck-playintegrity:apiInformation and check-in the resulting file?

@rosalyntan
Copy link
Member Author

Could you also please run ./gradlew :appcheck:firebase-appcheck-playintegrity:apiInformation and check-in the resulting file?

I tried running this, and got this error: Unable to parse signature file /Users/rosalyntan/firebase-android-sdk/empty-api.txt: Unknown file format of /Users/rosalyntan/firebase-android-sdk/empty-api.txt

@rosalyntan
Copy link
Member Author

/test check-changed

@rosalyntan rosalyntan merged commit 20da1e7 into master Apr 19, 2022
@rosalyntan rosalyntan deleted the play-integrity branch April 19, 2022 20:18
@firebase firebase locked and limited conversation to collaborators May 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants