URL-Safe Base64 Token
technology.cryptographic.token_urlsafeRandom token encoded in URL-safe Base64 (uses - and _ instead of + and /). Commonly used for auth tokens, reset links, and secure identifiers.
Shape
^[A-Za-z0-9_-]{12,128}$| Value | Length | Shape |
|---|---|---|
| SFMyNDI5STExOjEwMQ | 18 | matches |
| dGVzdC10b2tlbg | 14 | matches |
| aGVsbG8td29ybGQ | 15 | matches |
Told apart
Going the other way, this type's own rule accepts 3 of 3 samples of Cryptographic Hash.
Background
Origin
RFC 4648 notes that the pad character = is typically percent-encoded when used in a URI, and that padding can be skipped if the data length is known implicitly.[1] RFC 7515, JSON Web Signature (JWS), defines Base64url Encoding as the RFC 4648 URL-safe alphabet with all trailing = characters omitted.[2]
Use
Python's secrets.token_urlsafe returns a random URL-safe text string containing a given number of random bytes, Base64 encoded.[3] The Python documentation says each random byte becomes approximately 1.3 characters on average in a token_urlsafe string.[3] The illustrative implementation in PEP 506 strips the trailing = padding from the URL-safe Base64 output.[4] Node.js's base64url Buffer encoding follows RFC 4648 Section 5 and omits padding when encoding a Buffer to a string.[5]
A column of reset tokens or session identifiers is sensitive, so it is worth masking or dropping before a file is shared. (Meridian's view)
Sources
- [1]RFC 4648: The Base16, Base32, and Base64 Data Encodingsstandard
- [2]RFC 7515: JSON Web Signature (JWS)standard
- [3]secrets — Generate secure random numbers for managing secretsdocumentation
- [4]PEP 506 – Adding A Secrets Module To The Standard Librarydocumentation
- [5]Bufferdocumentation
Detection notes
v1 migration: Was cryptographic.token_urlsafe. URL-safe Base64 avoids characters that need escaping in URLs. Length typically 12-128 chars.
Use it
$ finetype infer -i "SFMyNDI5STExOjEwMQ" --mode column
→ technology.cryptographic.token_urlsafe
SELECT ft_infer('SFMyNDI5STExOjEwMQ');
-- → 'technology.cryptographic.token_urlsafe'CAST({col} AS VARCHAR)Schema
https://meridian.online/schemas/technology.cryptographic.token_urlsafe · Frictionless type string
finetype taxonomy technology.cryptographic.token_urlsafe -o json-schema