-
Notifications
You must be signed in to change notification settings - Fork 24
Upload OIDC discovery data to disco backend #762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
c5cffaf to
c140a0e
Compare
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
There was a problem hiding this comment.
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 OIDC discovery data collection and upload functionality to the disco-agent. The agent now gathers OpenID Connect configuration and JWKS (JSON Web Key Set) information from the Kubernetes API server's well-known OIDC endpoints and uploads this data to the CyberArk backend.
Changes:
- Introduced a new OIDC data gatherer that fetches OIDC configuration from
/.well-known/openid-configurationand JWKS from/openid/v1/jwksendpoints - Modified the OIDC data gatherer to return a pointer to
OIDCDiscoveryDatainstead of a value, consistent with other data gatherers - Added OIDC fields to the CyberArk snapshot structure for data upload
- Configured the OIDC gatherer in the default agent deployment templates
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/datagatherer/oidc/oidc.go | Changed return type from value to pointer for consistency with other data gatherers |
| pkg/datagatherer/oidc/oidc_test.go | Updated type assertions to handle pointer type |
| api/datareading.go | Added OIDCDiscoveryData type to the unmarshal priority list |
| pkg/client/client_cyberark.go | Added extractOIDCFromReading function and registered it in defaultExtractorFunctions |
| pkg/client/client_cyberark_test.go | Added OIDC test data with error scenarios |
| internal/cyberark/dataupload/dataupload.go | Added OIDC-related fields to the Snapshot struct |
| examples/machinehub.yaml | Added OIDC gatherer configuration example |
| examples/machinehub/input.json | Added example OIDC data with configuration and JWKS |
| deploy/charts/disco-agent/templates/configmap.yaml | Enabled OIDC gatherer in default configuration |
| deploy/charts/disco-agent/tests/snapshot/configmap_test.yaml.snap | Updated test snapshots to include OIDC gatherer |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
This PR adds OIDC discovery data upload functionality to the disco-agent.
The data gatherer itself was added in #758.