Skip to content

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

Merged
cisco-dmytro-hissa merged 2 commits into
masterfrom
user-agent-ca-pinning
Jul 21, 2026
Merged

Add CA bundle version and pinning status to the user agent string#46
cisco-dmytro-hissa merged 2 commits 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
Comment thread lib/duo_api/api_client.rb Outdated
@cisco-dmytro-hissa
cisco-dmytro-hissa merged commit cbbc050 into master Jul 21, 2026
6 checks passed
@cisco-dmytro-hissa
cisco-dmytro-hissa deleted the user-agent-ca-pinning branch July 21, 2026 13:25
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.

2 participants