Skip to content

Add CA bundle version and pinning status to the user agent string#46

Open
cisco-dmytro-hissa wants to merge 1 commit into
masterfrom
user-agent-ca-pinning
Open

Add CA bundle version and pinning status to the user agent string#46
cisco-dmytro-hissa wants to merge 1 commit into
masterfrom
user-agent-ca-pinning

Conversation

@cisco-dmytro-hissa

Copy link
Copy Markdown
Contributor

Description

  • Added a CA_BUNDLE_VERSION = '1.0' constant.
  • Added a private user_agent helper that builds the string from runtime state, reading @ca_pinning_disabled to reflect the actual pinning state.
  • Replaced the hard-coded "duo_api_ruby/#{VERSION}" header with a call to user_agent.

How Has This Been Tested?

  • TestUserAgent — verifies the composed string for both pinning states and that the CA bundle version is present.
  • TestUserAgentHeader — verifies the actual User-Agent header sent on a request for both a pinned and unpinned client.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@cisco-dmytro-hissa
cisco-dmytro-hissa marked this pull request as ready for review July 16, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant