Feat/add ping idp provider - #156
Conversation
Signed-off-by: jdiaconu <jdiaconu@cisco.com>
Signed-off-by: jdiaconu <jdiaconu@cisco.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
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
cidandclient_idas 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.
| case oidc.PingProviderName: | ||
| scheme = PingScheme |
There was a problem hiding this comment.
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.
Signed-off-by: jdiaconu <jdiaconu@cisco.com>
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:
PingProviderNameconstant and logic to detect Ping providers based on hostname suffixes inpkg/oidc/provider.goandpkg/oidc/parser.go. [1] [2] [3]PingSchemefor ID generation and updated the provider-to-scheme mapping ininternal/node/id_generator.go. [1] [2]OIDC claim extraction improvements:
cidorclient_idclaims ifsubis missing, improving compatibility with Ping and similar providers inpkg/oidc/parser.go.Code consistency:
pkg/oidc/parser.goto use a groupedconstblock for clarity.Type of Change
Checklist