Skip to content
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

feat(me): add support for SSO configuration #494

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

psauvage0
Copy link

@psauvage0 psauvage0 commented Nov 10, 2023

Description

This PR adds support for the /me/identity/provider routes of the API, which handle the configuration of SSO.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • Documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A: TF_ACC=1 go test -v ./... -run 'TestAccMeIdentityProvider.*'"

Test Configuration:

  • Terraform version: terraform version: Terraform v1.6.2
  • Existing HCL configuration you used:
    group_attribute_name = "http://schemas.xmlsoap.org/claims/Group"
    metadata = <<EOT
<?xml version="1.0" encoding="UTF-8"?>
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" entityID="https://ovhcloud.com/">
  <IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
    <KeyDescriptor use="signing">
      <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
        <X509Data>
          <X509Certificate>MIIFlTCCA32gAwIBAgIUP8WQwHQwrvTa00RU9JROZAJj9ccwDQYJKoZIhvcNAQELBQAwWjELMAkGA1UEBhMCRlIxEzARBgNVBAgMClNvbWUtU3RhdGUxDDAKBgNVBAcMA1JCWDERMA8GA1UECgwIT1ZIY2xvdWQxFTATBgNVBAMMDG92aGNsb3VkLmNvbTAeFw0yMzExMDkxMDA2MjRaFw0zMzExMDYxMDA2MjRaMFoxCzAJBgNVBAYTAkZSMRMwEQYDVQQIDApTb21lLVN0YXRlMQwwCgYDVQQHDANSQlgxETAPBgNVBAoMCE9WSGNsb3VkMRUwEwYDVQQDDAxvdmhjbG91ZC5jb20wggIiMA0GCSqGSI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Ub1zYJ+lEhYK0pj4RORainJX+PU+mIMUwQtfBByuI7RP0a2Vny0gffrtPuNfhRJb8Pwt2UYw2niWUDOfXuk9RYgqX/1wLVqk72KJJlD3c7+abZ6BcNEJax5e/icilUrxcs4MymDPjk63kQURRVzcC4hCXYqJVQmRfVT4fdLLKPmeg3ysl+U4eJZ8odmaqoVGqZryncdAC+nT5lnLRm6m2lv3v+YhConctLxzCwV/xA8jU2w9VVRw2gkY8bdkvOb7c2OpXU6J3TYtaltG7foQiuXbRd37GWzzzEspxiAI9y8uIEJTsASaufsEdpR+a1sPy3rYJom/Li3dH9p9Ch+tp51pMYhSRGEiNu9g5918zMbrKvwkl6h/PQlTOlb65qUUoNKC5Baxhz3VkGxSKMUwS4Lj/WHvCGU5OteGFHglDgDm125FDakOYU1dnMm/P55yNhnSUH2sXngybxnw/w=</X509Certificate>
        </X509Data>
      </KeyInfo>
    </KeyDescriptor>
    <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</NameIDFormat>
    <SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://ovhcloud.com/"></SingleSignOnService>
    <SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://ovhcloud.com/"></SingleSignOnService>
  </IDPSSODescriptor>
</EntityDescriptor>
EOT
    disable_users = false
    requested_attributes {
      is_required = false
      name = "group"
      name_format = "urn:oasis:names:tc:SAML:2.0:attrname-format:basic"
      values = ["test"]
    }
    requested_attributes {
      is_required = false
      name = "aaa"
      name_format = "urn:oasis:names:tc:SAML:2.0:attrname-format:basic"
      values = ["bbb"]
    }
}

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or issues
  • I have added acceptance tests that prove my fix is effective or that my feature works
  • New and existing acceptance tests pass locally with my changes
  • I ran succesfully go mod vendor if I added or modify go.mod file

@psauvage0 psauvage0 force-pushed the dev/psauvage/UIAM-591/add-sso-management branch from c380e1e to 3ee38c9 Compare November 10, 2023 16:11
@fehrnah fehrnah requested a review from yomovh November 13, 2023 09:20
@psauvage0 psauvage0 force-pushed the dev/psauvage/UIAM-591/add-sso-management branch from 23ec443 to a8ca662 Compare November 23, 2023 10:39
@rbeuque74 rbeuque74 self-requested a review November 23, 2023 10:53
ovh/types_me.go Outdated Show resolved Hide resolved
website/docs/r/me_identity_provider.html.markdown Outdated Show resolved Hide resolved
website/docs/r/me_identity_provider.html.markdown Outdated Show resolved Hide resolved
website/docs/r/me_identity_provider.html.markdown Outdated Show resolved Hide resolved
website/docs/r/me_identity_provider.html.markdown Outdated Show resolved Hide resolved
ovh/resource_me_identity_provider.go Show resolved Hide resolved
ovh/resource_me_identity_provider.go Outdated Show resolved Hide resolved
ovh/resource_me_identity_provider.go Outdated Show resolved Hide resolved
ovh/types_me.go Outdated Show resolved Hide resolved
@rbeuque74
Copy link
Member

On hold until we find a good way to test it.

If unclear, to check with me before merging or launching test in CI on this one.

  • Wait

@rbeuque74 rbeuque74 self-assigned this Dec 13, 2023
@rbeuque74 rbeuque74 marked this pull request as draft December 13, 2023 18:22
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.

None yet

3 participants