Skip to content

Feat/add ping idp provider - #156

Merged
jadiaconu merged 3 commits into
mainfrom
feat/add-ping-idp-provider
Jan 22, 2026
Merged

Feat/add ping idp provider#156
jadiaconu merged 3 commits into
mainfrom
feat/add-ping-idp-provider

Conversation

@jadiaconu

@jadiaconu jadiaconu commented Jan 16, 2026

Copy link
Copy Markdown
Contributor

Description

This pull request adds support for Ping Identity as an OIDC provider. The changes introduce the detection and handling of Ping providers throughout the OIDC parser and ID generation logic, and improve claim extraction from JWTs to handle Ping’s conventions.

Ping Identity support:

  • Added PingProviderName constant and logic to detect Ping providers based on hostname suffixes in pkg/oidc/provider.go and pkg/oidc/parser.go. [1] [2] [3]
  • Introduced PingScheme for ID generation and updated the provider-to-scheme mapping in internal/node/id_generator.go. [1] [2]

OIDC claim extraction improvements:

  • Enhanced JWT subject extraction to fall back to cid or client_id claims if sub is missing, improving compatibility with Ping and similar providers in pkg/oidc/parser.go.

Code consistency:

  • Refactored constants for cache settings in pkg/oidc/parser.go to use a grouped const block for clarity.

Type of Change

  • Bugfix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

Signed-off-by: jdiaconu <jdiaconu@cisco.com>
Signed-off-by: jdiaconu <jdiaconu@cisco.com>
Copilot AI review requested due to automatic review settings January 16, 2026 10:25
@github-actions

github-actions Bot commented Jan 16, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for Ping Identity as an OIDC provider, introducing detection logic for Ping domains and enhancing JWT claim extraction to support alternative subject claims (cid, client_id) as fallbacks.

Changes:

  • Added Ping Identity provider detection and ID generation scheme
  • Enhanced JWT claim extraction to support cid and client_id as fallback subject claims
  • Refactored constant declarations for improved code organization

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
pkg/oidc/provider.go Adds isPing() function to detect Ping Identity providers based on hostname suffixes
pkg/oidc/parser.go Adds PingProviderName constant, refactors cache constants into grouped block, and enhances subject claim extraction with fallback logic
internal/node/id_generator.go Adds PingScheme constant and mapping for Ping provider in ID generation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +69 to +70
case oidc.PingProviderName:
scheme = PingScheme

Copilot AI Jan 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new PingProviderName case in the switch statement lacks test coverage. The existing tests in id_service_test.go cover other providers like DuoProviderName and SelfProviderName, but there's no test case verifying that Ping provider generates IDs with the "PING-" prefix. Consider adding a test similar to TestGenerateID_Should_Not_Return_Errors but using oidc.PingProviderName to verify the ID generation for Ping providers.

Copilot uses AI. Check for mistakes.
Signed-off-by: jdiaconu <jdiaconu@cisco.com>
@jadiaconu
jadiaconu marked this pull request as ready for review January 20, 2026 14:24
@agntcy agntcy deleted a comment from Copilot AI Jan 21, 2026
@agntcy agntcy deleted a comment from Copilot AI Jan 21, 2026
@agntcy agntcy deleted a comment from Copilot AI Jan 21, 2026
@jadiaconu
jadiaconu merged commit acfdd35 into main Jan 22, 2026
6 checks passed
@jadiaconu
jadiaconu deleted the feat/add-ping-idp-provider branch January 22, 2026 08:44
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.

3 participants