Skip to content

Hydra customizable token prefixes #3856

Description

@K3das

Preflight checklist

Ory Network Project

No response

Describe your problem

Hydra currently has hardcoded token prefixes (ory_at_). This was initially a Fosite limitation due to @aeneasr's hesitation to make them customizable (ory/fosite#733 (comment)). However, ory/fosite#733 gained significant community support for this feature, and ory/fosite#816 makes it easy to modify prefixes through an HMACSHAStrategy wrapper.

Notably, making this a user-configurable option makes it easier for security teams to scan for leaks, enabling them to use systems like the GitHub secret scanning partner program, where security teams will get their own notifications for leaked secrets from their own Hydra instances, rather than ory.sh.

Some users, like @mattslocum, also cite the prefixes as unnecessary exposure of information, giving attackers extra information about their environment, worsening the impact of any future security issues in Hydra.

Describe your ideal solution

Ideally there will be a set of optional config options for customizing the token prefixes with something other than ory_

Workarounds or alternatives

None

Version

n/a

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    featNew feature or request.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions