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

Provide SASL/SCRAM based client-authentication for aws_msk_cluster #15298

Closed
dishantkamble opened this issue Sep 23, 2020 · 5 comments
Closed
Labels
enhancement Requests to existing resources that expand the functionality or scope. new-resource Introduces a new resource. service/kafka Issues and PRs that pertain to the kafka service.
Milestone

Comments

@dishantkamble
Copy link

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

In addition to client_authentication possible via tls there is no option provided for SASL/SCRAM based client_authentication in aws_msk_cluster resource. Additionally, there are no/selective resources available for the list of operations possible for kafka (AWS MSK) as mentioned in the reference below.

I am specifically looking for batch-associate-scram-secret operation to enable SASL/SCRAM based authentication via terraform.

New or Affected Resource(s)

  • aws_msk_cluster
  • aws_msk_configuration

Potential Terraform Configuration

Possible option for SASL/SCRAM based authentication can be as follows for the client_authentication Argument Reference

resource "aws_msk_cluster" "example" {
 cluster_name           = "example"
 kafka_version          = "2.4.1"
 number_of_broker_nodes = 3

 broker_node_group_info {
   instance_type   = "kafka.m5.large"
   ebs_volume_size = 1000
   client_subnets = [
     aws_subnet.subnet_az1.id,
     aws_subnet.subnet_az2.id,
     aws_subnet.subnet_az3.id,
   ]
   security_groups = [aws_security_group.sg.id]
 }

 client_authentication {
   sasl {
     secretArnList = [aws_secretsmanager_secret.example-1.arn, aws_secretsmanager_secret.example-2.arn]
   }
 }

 encryption_info {
   encryption_at_rest_kms_key_arn = aws_kms_key.kms.arn
 }

 open_monitoring {
   prometheus {
     jmx_exporter {
       enabled_in_broker = true
     }
     node_exporter {
       enabled_in_broker = true
     }
   }
 }

References

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

Related (enabling SASL/SCRAM on aws_msk_cluster):

The SCRAM secret will need to be a new resource.
It looks like #15302 will address both.

@ewbankkit ewbankkit added new-resource Introduces a new resource. and removed needs-triage Waiting for first response or review from a maintainer. labels Sep 23, 2020
@PavelDemyanenko
Copy link

Any news so far?

@anGie44
Copy link
Contributor

anGie44 commented Nov 25, 2020

Hi @dishantkamble et al. 👋 dropping a note here that we've just merged in (PR #15302) sasl/scram authentication support in the msk_cluster resource in addition to adding a new resource, namely aws_msk_scram_secret_association for associating secrets with an MSK cluster. These additions will be in v3.18.0 of the Terraform AWS Provider, expected out later today.

sasl/scram auth can be enabled by configuring your resource cluster such as:

resource "aws_msk_cluster" "example" {
  # ... other configuration ...
  client_authentication {
    sasl {
      scram = true
   }
  }

and secrets can be associated with something like:

resource "aws_msk_scram_secret_association" "example" {
  cluster_arn     = aws_msk_cluster.test.arn
  secret_arn_list = [aws_secretsmanager_secret.example1.arn, aws_secretsmanager_secret.example2.arn]
}

a more detailed example is available in https://github.com/hashicorp/terraform-provider-aws/blob/master/website/docs/r/msk_scram_secret_association.html.markdown

@anGie44 anGie44 added this to the v3.18.0 milestone Nov 25, 2020
@anGie44 anGie44 closed this as completed Nov 25, 2020
@ghost
Copy link

ghost commented Nov 25, 2020

This has been released in version 3.18.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 for triage. Thanks!

@ghost
Copy link

ghost commented Dec 25, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Dec 25, 2020
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. new-resource Introduces a new resource. service/kafka Issues and PRs that pertain to the kafka service.
Projects
None yet
Development

No branches or pull requests

4 participants