Skip to content

Implement Play Integrity attestation flow. #3618

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 6 commits into from
Apr 7, 2022

Conversation

rosalyntan
Copy link
Member

Add Play Integrity attestation logic, which includes obtaining a challenge nonce from the App Check backend.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 6, 2022

Coverage Report 1

Affected Products

  • firebase-appcheck

    Overall coverage changed from 81.09% (295c8f5) to 81.35% (fa67d0d) by +0.26%.

    FilenameBase (295c8f5)Merge (fa67d0d)Diff
    NetworkClient.java75.68%77.78%+2.10%
  • firebase-appcheck-playintegrity

    Overall coverage changed from 89.29% (295c8f5) to 92.86% (fa67d0d) by +3.57%.

    FilenameBase (295c8f5)Merge (fa67d0d)Diff
    GeneratePlayIntegrityChallengeRequest.java?100.00%?
    GeneratePlayIntegrityChallengeResponse.java?100.00%?
    PlayIntegrityAppCheckProvider.java88.89%91.11%+2.22%

Test Logs

Notes

  • Commit (fa67d0d) is created by Prow via merging PR base commit (295c8f5) and head commit (cd7b81e).
  • 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/1nFVvdAE3Z.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 6, 2022

Size Report 1

Affected Products

  • firebase-appcheck

    TypeBase (295c8f5)Merge (fa67d0d)Diff
    aar37.3 kB37.5 kB+220 B (+0.6%)
  • firebase-appcheck-playintegrity

    TypeBase (295c8f5)Merge (fa67d0d)Diff
    aar8.10 kB12.6 kB+4.46 kB (+55.0%)
    apk (release)984 kB985 kB+972 B (+0.1%)

Test Logs

Notes

  • Commit (fa67d0d) is created by Prow via merging PR base commit (295c8f5) and head commit (cd7b81e).

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

@rosalyntan rosalyntan marked this pull request as ready for review April 6, 2022 20:43
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, Approval

@rosalyntan
Copy link
Member Author

/test smoke-tests

Copy link

@weixifan weixifan 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

@abzaloid abzaloid left a comment

Choose a reason for hiding this comment

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

the initial integration looks good, please also ping me when adding error handling, retry etc. thanks!!

@rosalyntan rosalyntan merged commit c32c180 into play-integrity Apr 7, 2022
@rosalyntan rosalyntan deleted the rosalyntan.attest branch April 7, 2022 17:52
rosalyntan added a commit that referenced this pull request Apr 19, 2022
* Initial App Check <> Play Integrity commit (#3607)

* 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 token exchange. (#3613)

* Implement Play Integrity exchange.

* Update and add unit tests.

* Add @nonnull annotation.

* Implement Play Integrity attestation flow. (#3618)

* 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.

* Update test app. (#3655)

* Update version in `gradle.properties`.

* Fix tests broken after merge.

* Address review comments.

* Address review comment.
@firebase firebase locked and limited conversation to collaborators May 8, 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.

5 participants