fix: use constant-time comparison for admin secret by lakhansamani · Pull Request #490 · authorizerdev/authorizer

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@lakhansamani

Copy link Copy Markdown

Contributor

Summary

  • Replaced secret == p.config.AdminSecret with crypto/subtle.ConstantTimeCompare
  • Prevents timing side-channel attacks on admin secret verification

Test plan

  • Verify admin authentication still works correctly
  • Verify invalid admin secrets are rejected

Fixes #479

Replaced direct string comparison with crypto/subtle.ConstantTimeCompare
to prevent timing side-channel attacks on admin secret verification.

Fixes #479

@lakhansamani lakhansamani merged commit 844dadd into main

Mar 1, 2026

@lakhansamani lakhansamani deleted the fix/admin-secret-constant-time-compare branch

March 1, 2026 07:02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Admin secret comparison vulnerable to timing attacks

1 participant

@lakhansamani