Permissions-Policy Header Builder

Permissions-Policy Header Builder: Constructs W3C Feature Policy / Permissions Policy header directives restricting browser capabilities.

Permissions Policy Builder · Client runtimeSandboxed
Formatted results will render here in real time.

About this permissions-policy header builder

Constructs W3C Feature Policy / Permissions Policy header directives restricting browser capabilities Runs entirely in-memory using Web Crypto primitives to keep sensitive tokens, certificates, and cryptographic keys secure from third-party interception.

Encoding & cryptographic principles

Decodes, inspects, and validates authentication tokens and cryptographic credentials conforming to RFC 7519 (JSON Web Token - JWT), RFC 7515 (JSON Web Signature - JWS), and RFC 6238 (TOTP: Time-Based One-Time Password Algorithm). Decodes Base64URL-encoded JWT headers and claims payloads into syntax-highlighted JSON, parsing UNIX timestamps (iat, exp, nbf) into human-readable UTC dates and evaluating token expiration status without exposing private signing keys.

Worked verification example

Scenario: Serialize two documented Permissions-Policy directives from JSON.

Sample input:

{"features":{"camera":["self"],"microphone":[]}}

Processing: Validate feature names and each allowlist item; serialize self as a token and HTTP(S) origins as quoted strings, then join directives with comma-space.

Illustrative output:

Permissions-Policy: camera=(self), microphone=()

Security parameters & input constraints

Feature names must start with a lowercase letter and contain only lowercase letters, digits or hyphens. Allowlist values must be self (legacy 'self' is normalized), a sole *, or explicit HTTP(S) origins without path or query; other values are rejected. Missing/empty features produce camera=(), microphone=(), geolocation=(). This is a header draft, not a browser enforcement or feature-support test.

Cryptographic digests, encoded strings, and signatures generated by Permissions-Policy Header Builder should be verified against target authentication systems before production use.

Client-side Web Crypto boundary

Key derivation, hashing, and encoding in Permissions-Policy Header Builder execute in local memory using Web Crypto APIs without remote socket transmission.

Cryptographic specifications & RFC standards

Technical specifications and cryptographic RFC standards governing algorithms and key representations:

Permissions-Policy Header Builder verification · Audit standards

How to use it

  1. Enter JSON with a features object, for example {"features":{"camera":[]}}.
  2. Run locally to turn each feature and origin list into a Permissions-Policy header directive.
  3. Read or copy the generated header and check every feature and origin against current browser support before deployment.

Frequently asked questions

What JSON shape does Permissions-Policy Builder accept?+

It reads a JSON object with a features object. Feature names use lowercase letters, digits and hyphens with an initial letter; each allowlist is an array or one string containing self, a sole *, or an explicit HTTP(S) origin.

How is a directive serialized?+

The HTTP header uses structured-field tokens self and *, quoted HTTP(S) origin strings, and empty parentheses for no origins. camera ["self"] and microphone [] produce Permissions-Policy: camera=(self), microphone=(). Legacy 'self' input is normalized to self.

What example can I run locally?+

produced exactly that header for the camera and microphone JSON example. It verifies this local string builder, not a browser permission decision.

Which policy behavior is outside scope?+

It does not query a device, enforce a header, parse every specification edge case, model iframe allow attributes, inspect server responses, or prove that a feature is blocked.