Backend Authentication Flow
The diagram below illustrates how authentication works between the Fiskil Data Provider and your Resource Server:JWT
The Fiskil Data Provider uses JSON Web Tokens (JWTs) to authenticate to your Resource Server. JWTs are well-suited to Open Data platforms since they support fine-grained access control and short lifetimes. Requests to your API include a JWT in theAuthorization header using the Bearer scheme.
Each JWT is signed by the Data Provider. The public keys are exposed via a JWKS endpoint (shared during onboarding). Tokens include a kid JOSE header so your server can select the correct JWK.
The JWKS URL for your instance is available in the Console under Settings → Domains.
Validating the JWT
Once you have the public key you must validate the JWT. When you validate the JWT, ensure that:- The signature is valid.
- The token is not expired (check the
expclaim). - The
subandissclaims match your Data Provider subdomain (provided during onboarding). - The
audis the URI of the resource being requested on the Data API. - The
jtihas not been used before.
Node.js Implementation Example
Here’s a complete Node.js example showing how to validate JWTs from Fiskil’s Data Provider:Example: authenticated request
The example below shows a JWT used to authenticate a request to a hypothetical utilities provider, Acme Company.For security and readability, avoid logging full tokens. Log only minimal metadata (for example, the jti).
Decoded JWT
Header
Claims
JWT.IO — JSON Web Tokens Introduction
JWT.IO — JSON Web Tokens Libraries
Firewall
While JWT is sufficient to authenticate the Data Provider with your API, we recommend adding a firewall IP allow-list to further protect your data.- Fiskil provides IP addresses for allow-listing during onboarding.
- The IP addresses are also available in the Console under Settings → Resource Server.