![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
server-side-app-integrity-check
Advanced tools
Server side library to generate nonces and check attestation tokens received from client apps within Android's Play Integrity API or Apple's App Attest API. It supports both classic and standard requests of Play Integrity API.
This is a Node.js module that is to be used in your app server to validate Android's app integrity tokens (or, attestation objects) sent by your clients. It can validate tokens of Android's Play Integrity API (either classic or standard requests). It does NOT support Android's SafetyNet API, as it is deprecated.
The decryptPlayIntegrity function returns the attestation token. The verifyPlayIntegrity function returns 'success' only if high security standards are met in the device environment.
It is your responsibility to handle Google/Apple server outages (as those must inevitably always be used in the attestations), to design your platform logic to conform to the API request rate limits, and to have a plan on how to handle clients that do not meet the maximum standards (for example, rooted devices or Play Protect disabled), among other considerations.
See also: https://github.com/srinivas1729/appattest-checker-node
This work (code and documentation) is based on https://github.com/herzhenr/spic-server. See the attached license.
Define the necessary environment variables in a .env
file at the root of your project.
Use example.env
as a sample. Don't forget to rename it to .env
Run npm install server-side-app-integrity-check
from your project root.
If, for example, you have a CommonJS project, you can use the library in this way:
/* 'token' is the token the client received from the PlayIntegrity Server in the previous step
* 'mode': Set to 'server' to check integrity locally. Set to 'google' to offload the check to Google servers
* 'none_truth' is the ground truth of the nonce as stored by your app server
*/
let attestcheckerlibrary = await import('server-side-app-integrity-check');
decryptedToken = await attestcheckerlibrary.decryptPlayIntegrity(token, mode);
attestationresult = attestcheckerlibrary.verifyPlayIntegrity(decryptedToken, nonce_truth);
Possible return values for attestationresult
:
{status: "fail", message: "Some explanatory message here", decryptedToken: "Here you will have the decrypted token"}
:=
Attestation was not successful. The app integrity is compromised or some other condition has occurred. Bear in mind that attestations will likely not succeed if an Android device has been rooted or if the device does not meet maximum standards.
{status: "error", message: "Some explanatory message here", decryptedToken: "Here you will have the decrypted token"}
:=
An unexpected error has occurred. Do not forget to also embrace the sample code above within a try-catch clause to capture any errors throwed by the module.
{status: "success", message: "Some explanatory message here", decryptedToken: "Here you will have the decrypted token"}
:=
Nice! The client passed the attestation.
FAQs
Server side library to generate nonces and check attestation tokens received from client apps within Android's Play Integrity API or Apple's App Attest API. It supports both classic and standard requests of Play Integrity API.
The npm package server-side-app-integrity-check receives a total of 22 weekly downloads. As such, server-side-app-integrity-check popularity was classified as not popular.
We found that server-side-app-integrity-check demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.