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

Support for SAML/AD principals in aws_lakeformation_permissions #16848

Closed
chrisbulgaria opened this issue Dec 19, 2020 · 9 comments · Fixed by #16916
Closed

Support for SAML/AD principals in aws_lakeformation_permissions #16848

chrisbulgaria opened this issue Dec 19, 2020 · 9 comments · Fixed by #16916
Assignees
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/lakeformation Issues and PRs that pertain to the lakeformation service.
Milestone

Comments

@chrisbulgaria
Copy link
Contributor

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

The brand new aws_lakeformation_permissions does not seem to support SAML/AD principals (see console, the CLI accepts them without issues)

on lakeformation.tf line 65, in resource "aws_lakeformation_permissions" "xxx":
65: principal = "${local.saml_provider}:group/xxx"
Error: "principal" doesn't look like a user or role: "arn:aws:iam::yyyy:saml-provider/zzz:group/xxx"

New or Affected Resource(s)

aws_lakeformation_permissions

@chrisbulgaria chrisbulgaria added the enhancement Requests to existing resources that expand the functionality or scope. label Dec 19, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Dec 19, 2020
@chrisbulgaria
Copy link
Contributor Author

chrisbulgaria commented Dec 19, 2020

Probably “validateprincipal” should be replaced by something lighter for this field - given the wider possibilities of what a LF principal can be - not only SAML/AD but as well Quicksight.

@colonmelvin
Copy link

colonmelvin commented Mar 16, 2021

How about support for IAM federated users? We're using aws_cloudformation_stack resources since aws_lakeformation_permissions doesn't support "arn:aws:iam::account:federated-user/username" principals.

@chrisbulgaria
Copy link
Contributor Author

Hi , federated-user ? You mean SAml or AD ? The linked pull request supports all allowed principals , as listed here https://docs.aws.amazon.com/lake-formation/latest/dg/lf-permissions-reference.html
It just needs to be merged ....
Chris

@colonmelvin
Copy link

Hi , federated-user ? You mean SAml or AD ? The linked pull request supports all allowed principals , as listed here https://docs.aws.amazon.com/lake-formation/latest/dg/lf-permissions-reference.html
It just needs to be merged ....
Chris

In this case, authentication is done via GetFederationToken (FederatedUser), I was able to apply Lake Formation permissions via CLI using the ARN pattern arn:aws:iam::account:federated-user/username. I'm also working with the Lake Formation team to potentially add console support for federated users as to not be forced to use AWS CLI to manage them.

@chrisbulgaria
Copy link
Contributor Author

ok, yes, I see. Interesting , never used that.
I will adapt the pull request to include this.

Chris

@colonmelvin
Copy link

Thanks so much!

@YakDriver
Copy link
Member

YakDriver commented Apr 29, 2021

Additional Principals Perm Delete/Revoke
Related #16848 (Issue)
Related #16916
Related #18034 (Issue)
Related #18374
Related #17633 (Issue)
Related #18446 (Issue)
Related #18505
Related #19063 (Issue)
Related #19064 (Issue)

@ghost
Copy link

ghost commented Apr 30, 2021

This has been released in version 3.38.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!

@github-actions
Copy link

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 May 31, 2021
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/lakeformation Issues and PRs that pertain to the lakeformation service.
Projects
None yet
4 participants