The repo provides an example REST API Server that can check the integrity of clients and their requests. It supports iOS clients (for now) and the clients need to use App Attest API's to certify their integrity (reference). This server checks the integrity using guidance here.
The server is implemented using Node.js and Express framework. It uses appattest-checker-nodelibrary for core of the Attestation verification. An example client app that uses Attestation can be found at RNHelloAttestationClient.
- Clone this repo.
npm install
- Use VSCode and install REST Client extension.
- Use common env params:
cp sample.env .env. This contains the test App id that made sample requests inrequests/*.httpfiles. Without this step, the server will error out at startup. - Run the server:
npm run dev - Open up files
request/registerAppAttestKey.httpandrequest/highValueRequest.http. Execute the requests one by one. They show the sequence of requests a client would execute to first register their public Attestation Key and then make high-value requests.
See instructions in RNHelloAttestationClient
repo to get your app building and running. From Xcode, get the app-Id.
It should be of the form: <team-id>.<bundle-id>.
- Setup config for the server.
cp sample.env .env. Then replace IOS_APP_ID in.envwith your app-Id. - Run the server:
npm run dev. - Run the app and use its UI to register App Attest keys and make attested requests.