According to the WInnForum requirements, certain Citizens Broadband Radio Service Devices (CBSDs) require
that a [Certified Professional Installer (CPI)](https://docs.cloud.google.com/spectrum-access-system/docs/key-terms.md.txt#cpi)
validate the installation parameters *before* they are sent to Spectrum Access System (SAS).
[![CPI identity validation flow](https://docs.cloud.google.com/static/spectrum-access-system/docs/images/user-with-role-cpi.svg)](https://docs.cloud.google.com/static/spectrum-access-system/docs/images/user-with-role-cpi.svg) CPI identity validation flow (click to enlarge)

In the Google SAS Portal API, validate that a given user has a valid CPI
certification before they call the [`SignDevice()` method](https://docs.cloud.google.com/spectrum-access-system/docs/reference/rest/customers.devices/signDevice.md.txt).
You can validate a user's CPI certification by using the following
validation method:

1. Make sure that the user is signed in with their Google Account, and the traffic uses HTTPS.
2. A [`role_cpi`](https://docs.cloud.google.com/spectrum-access-system/docs/roles-and-permissions.md.txt#cpi) user calls the [`GenerateSecret()` method](https://docs.cloud.google.com/spectrum-access-system/docs/reference/rest/installer/generateSecret.md.txt), which returns a [secret](https://docs.cloud.google.com/spectrum-access-system/docs/key-terms.md.txt#secret) in the form of a token.
3. The user then signs the secret with their private key and uses the [`ValidateInstaller()` method](https://docs.cloud.google.com/spectrum-access-system/docs/reference/rest/installer/validate.md.txt) to send the encoded version back as a [JSON Web Token (JWT)](https://jwt.io/), along with their CPI ID and the original secret. For more details about token creation, see [JSON Web Token format](https://docs.cloud.google.com/spectrum-access-system/docs/json-web-token-format.md.txt).

The CPI role permissions become effective only after a user with the `role_cpi`
role successfully completes the CPI validation flow.

## What's next

- To get an overview of the SAS Portal API, see [Google SAS Portal API overview](https://docs.cloud.google.com/spectrum-access-system/docs/overview-api.md.txt).
- For information about each API, see [Customers API](https://docs.cloud.google.com/spectrum-access-system/docs/customers-api.md.txt) and [Device Manager API](https://docs.cloud.google.com/spectrum-access-system/docs/device-manager-api.md.txt).
- For examples of how to use the API, see [API code samples](https://docs.cloud.google.com/spectrum-access-system/docs/samples.md.txt).
- For reference documentation, see [APIs and reference](https://docs.cloud.google.com/spectrum-access-system/docs/apis.md.txt).