terraform-provider-vcd icon indicating copy to clipboard operation
terraform-provider-vcd copied to clipboard

Add resource for controlling Identity providers

Open nikolaifa opened this issue 4 years ago • 7 comments

Add resource for setting up identity providers. I imagine two seperate resources, one for a SAML type and one for a LDAP one.

Our use case for this one is as a service provider. When hosting multiple customers on the platform.

nikolaifa avatar Oct 02 '20 07:10 nikolaifa

With vcd_org_group I can add LDAP groups for Organization. But before it can succeed I need to manually configure LDAP Settings in Organization Identity Providers. Or is there some way other than wait this feature requrest?

twekkis avatar Mar 02 '21 06:03 twekkis

+1 for this. It would be nice to be able to automate the process of setting up 2FA for a tenant end-to-end.

nilic avatar Mar 26 '21 13:03 nilic

On top of that, I have an issue (with vcd 9.7 and 10.1.2): if I add the ldap configuration manually, I cannot modify the org anymore with terraform:

2021/05/19 17:01:24 --------------------------------------------------------------------------------
2021/05/19 17:01:24 Request caller: govcd.(*AdminOrg).Update-->govcd.(*AdminOrg).Update-->govcd.executeRequestWithApiVersion-->govcd.(*Client).executeTaskRequest-->govcd.executeRequestCustomErr-->govcd.(*Client).NewRequestWithApiVersion-->govcd.(*Client).newRequest
2021/05/19 17:01:24 PUT https://10.23.92.173/api/admin/org/458b28e3-e3ab-4e4e-8c7a-3cee0131a088
2021/05/19 17:01:24 --------------------------------------------------------------------------------
2021/05/19 17:01:24 Request data: [10287]
<?xml version="1.0" encoding="UTF-8"?>
  <AdminOrg xmlns="http://www.vmware.com/vcloud/v1.5" name="org-test_2">
      <Description>org created by terraform, test for delivery on selfdc vcloud</Description>
      <FullName>org-test_2 organization</FullName>
      <IsEnabled>true</IsEnabled>
      <Settings href="https://10.23.92.173/api/admin/org/458b28e3-e3ab-4e4e-8c7a-3cee0131a088/settings" type="application/vnd.vmware.admin.orgSettings+xml">
          . . .
          <OrgLdapSettings href="https://10.23.92.173/api/admin/org/458b28e3-e3ab-4e4e-8c7a-3cee0131a088/settings/ldap" type="application/vnd.vmware.admin.organizationLdapSettings+xml">
              <OrgLdapMode>CUSTOM</OrgLdapMode>
              <CustomOrgLdapSettings>
              . . .
              </CustomOrgLdapSettings>
          </OrgLdapSettings>
      </Settings>
  </AdminOrg>
2021/05/19 17:01:24 Req header:
2021/05/19 17:01:24 	X-Vmware-Vcloud-Token-Type: [Bearer]
2021/05/19 17:01:24 	Authorization: [********]
2021/05/19 17:01:24 	User-Agent: [terraform-provider-vcd/v3.2.0 (linux/amd64; isProvider:true)]
2021/05/19 17:01:24 	X-Vmware-Vcloud-Access-Token: [********]
2021/05/19 17:01:24 	Accept: [application/*+xml;version=32.0]
2021/05/19 17:01:24 ################################################################################
2021/05/19 17:01:24 Response caller govcd.(*AdminOrg).Update-->govcd.(*AdminOrg).Update-->govcd.executeRequestWithApiVersion-->govcd.(*Client).executeTaskRequest-->govcd.executeRequestCustomErr-->govcd.checkRespWithErrType-->govcd.ParseErr-->govcd.decodeBody
2021/05/19 17:01:24 Response status 400 Bad Request
2021/05/19 17:01:24 ################################################################################

carmine73 avatar May 19 '21 15:05 carmine73

Hi, I still have this problem: a vcd_org cannot be modified if it has ldap configurations. Any news on that?

carmine73 avatar Feb 25 '22 13:02 carmine73

Anyone working on a patch to add this functionality? 🤔

prologic avatar May 23 '22 03:05 prologic

Just referencing other issues: https://github.com/vmware/terraform-provider-vcd/issues/672 https://github.com/vmware/terraform-provider-vcd/issues/597

lvirbalas avatar Sep 21 '22 12:09 lvirbalas

A resource for configuring LDAP in organizations has been just merged (PR #909)

dataclouder avatar Sep 21 '22 12:09 dataclouder

SAML configuration is implemented in PR #1064 Testing it thoroughly, however, is not a simple matter. Could anyone interested in this feature build a provider using the branch of PR #1024 and see if it does what you expect? Feel free to contact the team in Slack channel #vcd-terraform-dev ( in slack space vmwarecode.slack.com ) for feedback.

dataclouder avatar Jun 09 '23 13:06 dataclouder

implemented in v3.10.0

dataclouder avatar Jul 20 '23 12:07 dataclouder