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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LDAPS configuration support for aws_directory_service_directory #12636

Open
ablackrw opened this issue Apr 2, 2020 · 6 comments
Open

Add LDAPS configuration support for aws_directory_service_directory #12636

ablackrw opened this issue Apr 2, 2020 · 6 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ds Issues and PRs that pertain to the ds service.

Comments

@ablackrw
Copy link

ablackrw commented Apr 2, 2020

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Per Microsoft security advisory ADV190023, Microsoft is deprecating the use of insecure LDAP connections to domain controllers. As such, it will be necessary to configure the CA certificates and LDAPS configuration of aws_directory_service_directory resources of type ADConnector or MicrosoftAD to avoid communications disruptions.

New or Affected Resource(s)

  • aws_directory_service_directory

Potential Terraform Configuration

resource "aws_directory_service_directory" "example" {
  name = var.adc_domain
  password = var.adc_pass
  size = "Small"
  type = "ADConnector"
  certificates = {
    file("path/to/file"),
    file("path/to/file")
  }
}

This design assumes that LDAPS is to be enabled if one or more certificates are specified.

An alternate design would be similar to the following:

resource "aws_directory_service_directory" "example" {
  name = var.adc_domain
  password = var.adc_pass
  size = "Small"
  type = "ADConnector"
  ldaps = true
}

resource "aws_directory_service_certificate" "example" {
  directory = aws_directory_service_directory.example.arn
  file = file("path/to/file")
}

However, this design fails to encapsulate the requirement that at least one certificate be associated with a directory before ldaps can be enabled.

References

@ablackrw ablackrw added the enhancement Requests to existing resources that expand the functionality or scope. label Apr 2, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Apr 2, 2020
@LozanoMatheus
Copy link

LozanoMatheus commented Jul 12, 2021

I think we'll also need to add the EnableLDAPS, DisableLDAPS and DescribeLDAPSSettings. I'm curious how the Enable/Disable works since both have the same fields/values.

@breathingdust breathingdust removed the needs-triage Waiting for first response or review from a maintainer. label Sep 21, 2021
@OriBenHur-akeyless
Copy link

Anything new about this?

@ewbankkit ewbankkit added the service/ds Issues and PRs that pertain to the ds service. label Jul 26, 2022
@wxGold
Copy link

wxGold commented Sep 28, 2022

Any update please?

@stefano-n26
Copy link

is this still on going?

@cacack
Copy link

cacack commented Dec 13, 2022

I found my way here for the same needs -- enabling LDAPS for Active Directory Connector.

Pending a feature improvement to the provider, has anyone solved via a workaround? I'm specifically thinking the use of the local provisioner to run a Python script and leverage boto3 to inject the certs and enable LDAPS mode. Or will this be more trouble than it is worth and should just stick to doing this out-of-band to our TF pipelines?

@uo-thomas
Copy link

@cacack We currently use a null_resource with a local-exec provisioner and just call the API:

`resource "null_resource" "ad_connector_cert_register" {
provisioner "local-exec" {
command = "aws ds register-certificate --region ${local.region} --directory-id ${aws_directory_service_directory.ad_connector.id} --certificate-data file://FILE.cer"
}

depends_on = [
aws_directory_service_directory.ad_connector
]
}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ds Issues and PRs that pertain to the ds service.
Projects
None yet
Development

No branches or pull requests

10 participants