Tutorial: Experiencing OP Implementation in the Playground Environment
Overview
In this tutorial, you will use the Content Attestation Server Playground to verify the steps required for OP (Originator Profile) implementation within a test environment. The goal is to gain a step-by-step understanding of the entire workflow—from the issuance and deployment of Site Profiles and Content Attestations to their verification.
This tutorial allows you to verify the following processes in the test environment:
- Issuance and deployment of Site Profiles (SP)
- Issuance and deployment of Content Attestations (CA)
This tutorial is an "experimental OP implementation" that does not require production registration.
Step 1: Issue the Site Profile in the Playground
- Open the SP Issuance API for the Content Attestation Server Playground.
- Use the "Test Request" section on the right side of the screen.
- Include the origin of the site you are trying to enable for OP support in the
allowedOriginfield of the request body.- Example:
http://localhost:8080 - Refer to Site Profile or Website Profile for details on each property.
- If you are using both Japanese and English Website Profiles, please include the origin of the site you intend to make OP-compatible in the
allowedOriginfield for both profiles.
- Example:
- Press Send.
- If authentication is requested, please use the credentials found at the Content Attestation Server Playground.
- Verify that the Site Profile is returned along with a 200 OK status.
Step 2: Deploy the Site Profile on the site
- Take the returned JSON, name it
sp.json, and place it so that it is accessible at the website's well-known URL:/.well-known/sp.json.
Example:
$ curl -i http://localhost:8080/.well-known/sp.json
HTTP/2 200
content-type: application/json
{
"originators": [
{ "core": "eyJ...", "annotations": ["eyJ..."], "media": ["eyJ..."] }
],
"sites": ["eyJ..."]
}
At this point, you will be able to check the Site Profile using the test build of OP Inspector. Refer to the instructions in Step 5 for information on how to obtain and install the test build of OP Inspector.
For Step 1 and Step 2, please also refer to the Site Profile setup guide.
Step 3: Issue a Content Attestation in the Playground
- Open the CA Issuance API for the Content Attestation Server Playground.
- Use the "Test Request" section on the right side of the screen.
- Include the URL where the CA will be placed in the
allowedUrlfield of the request body.- Example:
http://localhost:8080/*
- Example:
- Set the
targetin the request body to a Content Integrity Descriptor appropriate for the content.- Example:
{"type": "TextTargetIntegrity","cssSelector": "#text-target-integrity","integrity": "sha256-TL6t/lWLByyNME0lFhb6JrT3RaTF+f2md84n5YTQtx4="}
- Example:
- Additionally, you may modify the value of
credentialSubjectto suit the content.- Refer to Content Attestation for details on each property.
- Press Send.
- If authentication is requested, please use the credentials found at the Content Attestation Server Playground.
- Verify that a Content Attestation is returned along with a 200 OK response.
Step 4: Deploy Content Attestation
- Add the returned JSON to the page HTML as a Content Attestation Set.
- Use the following script tag.
Example:
<script type="application/ca-set+json">
["eyJ..."]
</script>
For Steps 3 and 4, please also refer to the Content Attestation setup guide.
Step 5: Verify using the test build of OP Inspector
- Install the test build of OP Inspector.
- For instructions on installing the test build of OP Inspector, please refer to the Content Attestation Server Playground guide.
- Refer to the OP Inspector Guide for information on how to use OP Inspector.
- Follow the OP Inspector guide and confirm that verification has been successful.