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

Client VPN Endpoint - Add Optional Self-Service Portal Arguments #16019

Closed
connor-tyndall opened this issue Nov 4, 2020 · 8 comments · Fixed by #20846
Closed

Client VPN Endpoint - Add Optional Self-Service Portal Arguments #16019

connor-tyndall opened this issue Nov 4, 2020 · 8 comments · Fixed by #20846
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@connor-tyndall
Copy link
Contributor

connor-tyndall commented Nov 4, 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

This request asks for the ability to add the optional Self-service SAML provider ARN within the authentication option for a Client VPN (CVPN) endpoint using Federated authentication as well as the option to enable the self-service portal.

Based on the release by AWS today (11/4/20), Client VPN now supports a self-service portal to download VPN profiles and desktop applications.

New or Affected Resource(s)

  • aws_ec2_client_vpn_endpoint
self_service_portal

authentication_options {
    self_service_saml_provider_arn
  }

Potential Terraform Configuration

resource "aws_ec2_client_vpn_endpoint" "example" {
  description            = "terraform-clientvpn-example"
  server_certificate_arn = aws_acm_certificate.cert.arn
  client_cidr_block      = "10.0.0.0/16"
  split_tunnel = true
  self_service_portal = true

  authentication_options {
    type                       = "federated-authentication"
    saml_provider_arn          = aws_iam_saml_provider.okta.arn
    self_service_saml_provider_arn = aws_iam_saml_provider.okta_self_service.arn
  }

  connection_log_options {
    enabled               = true
    cloudwatch_log_group  = aws_cloudwatch_log_group.lg.name
    cloudwatch_log_stream = aws_cloudwatch_log_stream.ls.name
  }
}

References

@connor-tyndall connor-tyndall added the enhancement Requests to existing resources that expand the functionality or scope. label Nov 4, 2020
@ghost ghost added the service/ec2 Issues and PRs that pertain to the ec2 service. label Nov 4, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Nov 4, 2020
@ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Nov 7, 2020
@nbsdan
Copy link
Contributor

nbsdan commented Mar 3, 2021

I've started a PR which allows specifying the self service portal and saml provider options like so:

resource "aws_ec2_client_vpn_endpoint" "example" {
  description            = "terraform-clientvpn-example"
  server_certificate_arn = aws_acm_certificate.cert.arn
  client_cidr_block      = "10.0.0.0/16"
  split_tunnel = true
  self_service_portal = "enabled"

  authentication_options {
    type                       = "federated-authentication"
    saml_provider_arn          = aws_iam_saml_provider.okta.arn
    self_service_saml_provider_arn = aws_iam_saml_provider.okta_self_service.arn
  }

  connection_log_options {
    enabled               = true
    cloudwatch_log_group  = aws_cloudwatch_log_group.lg.name
    cloudwatch_log_stream = aws_cloudwatch_log_stream.ls.name
  }
}

This differs from the original request, which asked for true or false for the self_service_portal attribute. The AWS API use the strings "enabled" and "disabled" and so I thought it would be best to stick with that.

I have not run acceptance tests, however I have tried to write them.

I would love some feedback on what else would need to be done to achieve this and if someone could confirm the acceptance tests work then that would be awesome.

@coffeewithayman
Copy link

This is really necessary for IDP providers that do not support multiple ACS URLs: https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/client-authentication.html#saml-self-service-support

@ariellev
Copy link

ariellev commented May 3, 2021

We also need a way to set not just the description but also the endpoint "Name", so it would be awesome to have a name attribute

@nbsdan
Copy link
Contributor

nbsdan commented May 13, 2021

Hi @ariellev, I believe you can already set the name by using a tag with the key "Name", though I have not verified this myself.

@clee-newclassrooms
Copy link

As a meager workaround, I was able to have this in my Terraform graph/state and still set the self-service portal provider by manually creating the CVPN endpoint and then importing the CVPN resource into Terraform state. The provider appears to ignore the self-service portal provider ARN argument/attribute. This means that as long as Terraform doesn't compute some change to the CVPN resource (which might remove the self-service provider ARN when the change is applied), I can still depend on the CVPN by reference in other resources without breaking self-service.

@github-actions
Copy link

This functionality has been released in v3.59.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Jun 8, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
7 participants