Datatypes

URI with embedded password

ID uri_with_password

DatatypePersonal data (PII)identifierDraft

This record is a draft: it has not been reviewed yet and may be incomplete or wrong. Do not rely on it for compliance decisions. Help improve it (see CONTRIBUTING.md).

URI whose user information part contains a password, as in scheme://user:password@host/. RFC 3986 deprecates this form, but database and message broker connection URIs still use it. The user name may be empty, as in Redis URIs.

Parent datatype
Uniform Resource Identifier (URI) uri
Categories
Secrets and credentials (passwords, keys, tokens), Internet
Countries
Global (not tied to a country)
Languages
Common to most languages
Quality
78/100 · missing: second example, mapping (Wikidata, Schema.org, ...), translation
Metacrafter rules
no detection rule yet
Supported by tools
detect-secrets, Semgrep, TruffleHog

Regular expression

^[A-Za-z][A-Za-z0-9+.-]*://[^\s:/?#@]*:[^\s/?#@]+@[^\s/?#]+(?:[/?#]\S*)?$

Python re syntax.

Examples

ValueDescription
postgresql://user:secret@localhostExample connection URI from the PostgreSQL documentation
postgresql://user@localhost invalidUser name without a password

Sources

Use this record