Skip to content

feat(sso): add sysdig_sso_openid and sysdig_sso_saml resources#688

Merged
tembleking merged 6 commits intomasterfrom
feat/sso-openid-resource
Feb 5, 2026
Merged

feat(sso): add sysdig_sso_openid and sysdig_sso_saml resources#688
tembleking merged 6 commits intomasterfrom
feat/sso-openid-resource

Conversation

@tembleking
Copy link
Copy Markdown
Member

@tembleking tembleking commented Jan 28, 2026

Summary

  • Add sysdig_sso_openid resource for OpenID Connect SSO configuration
  • Add sysdig_sso_saml resource for SAML SSO configuration

Both resources use the /platform/v1/sso-settings/ endpoint with different type discriminators.

sysdig_sso_openid features:

  • Issuer URL with optional metadata discovery
  • Client ID/Secret authentication
  • Manual metadata configuration when discovery is disabled
  • Additional OAuth scopes support

sysdig_sso_saml features:

  • Metadata via URL or inline XML (mutually exclusive)
  • Email parameter mapping
  • Security settings (signature validation, signed assertions, destination verification, encryption)

Common SSO features (both resources):

  • Product selection (monitor/secure)
  • Group mapping configuration
  • Single logout support
  • Auto user creation on login
  • Optimistic locking via version field

Test plan

  • Run acceptance tests for OpenID: go test ./sysdig -v -run TestAccSSOOpenID -tags=tf_acc_sysdig_secure -timeout 120m
  • Run acceptance tests for SAML: go test ./sysdig -v -run TestAccSSOSaml -tags=tf_acc_sysdig_secure -timeout 120m
  • Verify import functionality for both resources
  • Test update operations with version-based optimistic locking

Add new Terraform resource to manage OpenID Connect SSO configurations
via /api/v1/sso-settings/ endpoint.

Refs: ET-553
Add SAML SSO configuration resource for Sysdig, allowing users to
configure SAML-based Single Sign-On via Terraform.

Features:
- Support for metadata_url or metadata_xml (mutually exclusive)
- SAML security settings (signature validation, signed assertions,
  destination verification, encryption support)
- Common SSO fields (group mapping, single logout, auto user creation)
- Full CRUD operations with optimistic locking via version field
@tembleking tembleking changed the title feat(sso): add sysdig_sso_openid resource feat(sso): add sysdig_sso_openid and sysdig_sso_saml resources Jan 28, 2026
- Change endpoint from /api/v1/sso-settings to /platform/v1/sso-settings
- Move disable-before-delete logic to resource layer (API requires client_secret)
- Add ForceNew to integration_name (cannot be updated via API)
- Preserve additional_scopes from state when API returns null
- Skip WithMetadata test due to Platform API bug (returns 500 for manual metadata)
Comment thread website/docs/r/sso_saml.md Outdated
Comment thread sysdig/resource_sysdig_sso_openid.go Outdated
Copy link
Copy Markdown
Collaborator

@dbonf dbonf left a comment

Choose a reason for hiding this comment

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

related to sso settings we also have group mappings (/platform/v1/group-mappings, to be used when we define group mapping in this resource) and global sso settings (/platform/v1/global-sso-settings/, to enable / disable password login), are we planning also to include them?

@tembleking
Copy link
Copy Markdown
Member Author

related to sso settings we also have group mappings (/platform/v1/group-mappings, to be used when we define group mapping in this resource) and global sso settings (/platform/v1/global-sso-settings/, to enable / disable password login), are we planning also to include them?

Yes, we plan to add those as well.

Copilot AI review requested due to automatic review settings February 5, 2026 15:20
@tembleking tembleking requested a review from a team as a code owner February 5, 2026 15:20
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 SSO configuration resources for OpenID Connect and SAML authentication to the Sysdig Terraform provider, enabling users to manage single sign-on configurations declaratively through Terraform.

Changes:

  • Added sysdig_sso_openid and sysdig_sso_saml resources with full CRUD operations
  • Implemented client interfaces and API handlers for the /platform/v1/sso-settings/ endpoint
  • Added comprehensive documentation and acceptance tests for both resources

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sysdig/provider.go Registered new SSO resource types in provider
sysdig/resource_sysdig_sso_openid.go OpenID Connect SSO resource implementation with metadata discovery support
sysdig/resource_sysdig_sso_saml.go SAML SSO resource implementation with metadata URL/XML options
sysdig/resource_sysdig_sso_openid_test.go Acceptance tests for OpenID SSO configurations
sysdig/resource_sysdig_sso_saml_test.go Acceptance tests for SAML SSO configurations
sysdig/internal/client/v2/sso_openid.go HTTP client methods for OpenID SSO API operations
sysdig/internal/client/v2/sso_saml.go HTTP client methods for SAML SSO API operations
sysdig/internal/client/v2/model.go Data models for SSO configurations
sysdig/internal/client/v2/sysdig.go Interface registration for SSO clients
website/docs/r/sso_openid.md Documentation for OpenID SSO resource
website/docs/r/sso_saml.md Documentation for SAML SSO resource
sysdig/resource_sysdig_secure_cloud_auth_account_test.go Removed trailing blank line

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

Comment thread sysdig/resource_sysdig_sso_openid.go Outdated
Comment thread sysdig/resource_sysdig_sso_saml.go Outdated
The Platform API bug that returned 500 when creating SSO OpenID
configurations with isMetadataDiscoveryEnabled=false has been fixed.
Re-enable the TestAccSSOOpenID_WithMetadata test.
- Remove redundant group_attribute_name field from OpenID resource
  (use group_mapping_attribute_name instead)
- Fix metadata validation to return error instead of ForceNew
- Remove unnecessary empty validation function from SAML resource
- Update integration_name description to clarify its purpose
Copilot AI review requested due to automatic review settings February 5, 2026 15:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.


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

@tembleking tembleking added this pull request to the merge queue Feb 5, 2026
Merged via the queue into master with commit ec8ce60 Feb 5, 2026
171 checks passed
@tembleking tembleking deleted the feat/sso-openid-resource branch February 5, 2026 17:39
fcracker79 pushed a commit that referenced this pull request Mar 5, 2026
## Summary

- Add `sysdig_sso_openid` resource for OpenID Connect SSO configuration
- Add `sysdig_sso_saml` resource for SAML SSO configuration

Both resources use the `/platform/v1/sso-settings/` endpoint with
different `type` discriminators.

### sysdig_sso_openid features:
- Issuer URL with optional metadata discovery
- Client ID/Secret authentication
- Manual metadata configuration when discovery is disabled
- Additional OAuth scopes support

### sysdig_sso_saml features:
- Metadata via URL or inline XML (mutually exclusive)
- Email parameter mapping
- Security settings (signature validation, signed assertions,
destination verification, encryption)

### Common SSO features (both resources):
- Product selection (monitor/secure)
- Group mapping configuration
- Single logout support
- Auto user creation on login
- Optimistic locking via version field

## Test plan

- [ ] Run acceptance tests for OpenID: `go test ./sysdig -v -run
TestAccSSOOpenID -tags=tf_acc_sysdig_secure -timeout 120m`
- [ ] Run acceptance tests for SAML: `go test ./sysdig -v -run
TestAccSSOSaml -tags=tf_acc_sysdig_secure -timeout 120m`
- [ ] Verify import functionality for both resources
- [ ] Test update operations with version-based optimistic locking
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.

4 participants