Skip to content

Security checks: API and MCP tokens

REST API and MCP tokens: expiry, scope and use.

From V8.5.0, these checks run in php artisan rconfig:security-check and in Security Center. Run only this group with:

Terminal window
cd /var/www/html/rconfig8
php artisan rconfig:security-check --only=tokens

Each failing check shows the exact fix for your server, including paths, on the page and in the command output. The sections below explain what each check looks for.

Check Severity Checks that
tokens.no_expiry Medium API and MCP tokens expire
tokens.expired_present Low Expired tokens are cleaned up
tokens.unused Low No long-unused tokens are still valid
tokens.wildcard Medium Tokens are scoped, not all-powerful

Check ID: tokens.no_expiry · Severity: Medium

A token that never expires stays valid long after the script, integration or person it was made for is gone, and a leaked one works forever.

References: NIST IA-5(1), NIST AC-2, OWASP ASVS V3.5, SEC-EXT-004


Check ID: tokens.expired_present · Severity: Low

Expired tokens no longer work, but their records clutter the token list and hide which tokens are really in use.

In-app fix: users with the security.update permission can click Delete expired tokens on the finding. rConfig shows what will change first, records the fix in the activity log and runs the checks again.

References: NIST AC-2


Check ID: tokens.unused · Severity: Low

A valid token nobody has used for months is usually forgotten, and nobody would notice if someone else started using it.

In-app fix: users with the security.update permission can click Choose tokens to revoke on the finding. rConfig shows what will change first, records the fix in the activity log and runs the checks again.

References: NIST AC-2(3), NIST IA-5


Check ID: tokens.wildcard · Severity: Medium

A token with every ability (”*”) or no abilities list can do anything its owner can. Give each integration only the abilities it needs.

References: NIST AC-6, OWASP ASVS V4.1, SEC-EXT-004


See Hardening guides for the configuration snippets behind these checks, and NIS2 Article 21 mapping for the controls they give evidence for.