Skip to main content

Security

API keys​

  • Only the SHA-256 hash of a key is stored. A key is random with 256 bit, so a fast hash is sufficient.
  • A new key is shown directly in the answer of the form (Cache-Control: no-store). It is never written to the session, which xTIPP stores unencrypted.
  • A key has the full rights of its user, there are no scopes.
  • See When a key is refused for the 401 and 429 rules.

No browser session​

The API does not use the middleware group web of Laravel: no session, no cookie, no CSRF. So the API cannot be called with the browser login of a user. Active user, deleted user and maintenance mode are checked by the plugin itself.

Transport​

  • Only HTTPS is allowed by default, see HTTPS only, including the setup behind a reverse proxy.
  • There are no CORS headers. Browser applications on another address cannot call the API.

Headers of the answers​

  • Answers of the API are marked Cache-Control: no-store, private.
  • Answers of the API set no cookie. Cookies that xTIPP sets itself on every request (for example xtipp-current-league-id) are removed from API answers.
  • Since xTIPP 1.0.36, xTIPP adds its security headers to every answer, also of the API: Content-Security-Policy, X-Frame-Options, X-Content-Type-Options: nosniff, Referrer-Policy and, with an https:// domain, Strict-Transport-Security. The key page and Swagger UI therefore use no inline scripts.

Swagger UI​

Swagger UI is delivered by the plugin itself, with no CDN and no requests to third parties. It is the unchanged swagger-ui-dist 5.34.1 (Apache License 2.0, see resources/swagger-ui/LICENSE).

The web root of xTIPP is public/, so the plugin delivers the CSS and JavaScript of Swagger UI and the script of the key page through the route /api/docs/assets/<file>.