Add SSS client config#5082
Conversation
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io> Assisted by [OpenAI](https://platform.openai.com/) Assisted by [GitHub Copilot](https://github.com/features/copilot) Assisted by [Claude](https://claude.ai)
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughAdds SSS support: new SSS config fields in Config, best-effort SSM loading of SSS parameters, and NewClientFromPlatformCredentials which builds an SSS client from platform Auth0 M2M credentials (returns nil,nil to disable when baseURL or audience are blank). Tests added. ChangesSSS Configuration and Client Integration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies" Comment |
There was a problem hiding this comment.
Pull request overview
Adds first-class configuration support for the Sanctions Screening Service (SSS) in the Go backend, including optional SSM parameter loading and a helper to construct an SSS client using existing Auth0 platform (M2M) credentials.
Changes:
- Introduces
config.SSSconfig model (BaseURL + Auth0 audience) and wires optional SSM lookup for its parameters. - Adds
sss.NewClientFromPlatformCredentials(...)helper to derive the Auth0 domain from the platform token URL and build an SSS client. - Adds unit tests covering the new helper’s “disabled” behavior and Auth0 domain derivation.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| cla-backend-go/sss/from_config.go | Adds helper to build an SSS client from existing platform/Auth0 credentials. |
| cla-backend-go/sss/from_config_test.go | Adds unit tests for the new helper. |
| cla-backend-go/config/ssm.go | Loads SSS SSM parameters leniently (optional) during config load. |
| cla-backend-go/config/config.go | Adds SSS config struct to the main config model. |
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io> Assisted by [OpenAI](https://platform.openai.com/) Assisted by [GitHub Copilot](https://github.com/features/copilot) Assisted by [Claude](https://claude.ai)
Signed-off-by: Lukasz Gryglicki lgryglicki@cncf.io
Assisted by OpenAI
Assisted by GitHub Copilot
Assisted by Claude