package aws

import (
	"errors"
	"fmt"
	"testing"
	"time"

	"regexp"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/credentials"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/iam"
	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
	"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
	"github.com/terraform-providers/terraform-provider-aws/aws/internal/vault/helper/pgpkeys"
)

func TestGenerateIAMPassword(t *testing.T) {
	p, err := generateIAMPassword(6)
	if err != nil {
		t.Fatalf(err.Error())
	}
	if len(p) != 6 {
		t.Fatalf("expected a 6 character password, got: %q", p)
	}

	p, err = generateIAMPassword(128)
	if err != nil {
		t.Fatalf(err.Error())
	}
	if len(p) != 128 {
		t.Fatalf("expected a 128 character password, got: %q", p)
	}
}

func TestIAMPasswordPolicyCheck(t *testing.T) {
	for _, tc := range []struct {
		pass  string
		valid bool
	}{
		// no symbol
		{pass: "abCD12", valid: false},
		// no number
		{pass: "abCD%$", valid: false},
		// no upper
		{pass: "abcd1#", valid: false},
		// no lower
		{pass: "ABCD1#", valid: false},
		{pass: "abCD11#$", valid: true},
	} {
		t.Run(tc.pass, func(t *testing.T) {
			valid := checkIAMPwdPolicy([]byte(tc.pass))
			if valid != tc.valid {
				t.Fatalf("expected %q to be valid==%t, got %t", tc.pass, tc.valid, valid)
			}
		})
	}
}

func TestAccAWSUserLoginProfile_basic(t *testing.T) {
	var conf iam.GetLoginProfileOutput

	username := fmt.Sprintf("test-user-%d", acctest.RandInt())

	resource.ParallelTest(t, resource.TestCase{
		PreCheck:     func() { testAccPreCheck(t) },
		Providers:    testAccProviders,
		CheckDestroy: testAccCheckAWSUserLoginProfileDestroy,
		Steps: []resource.TestStep{
			{
				Config: testAccAWSUserLoginProfileConfig_Required(username, "/", testPubKey1),
				Check: resource.ComposeTestCheckFunc(
					testAccCheckAWSUserLoginProfileExists("aws_iam_user_login_profile.user", &conf),
					testDecryptPasswordAndTest("aws_iam_user_login_profile.user", "aws_iam_access_key.user", testPrivKey1),
					resource.TestCheckResourceAttrSet("aws_iam_user_login_profile.user", "encrypted_password"),
					resource.TestCheckResourceAttrSet("aws_iam_user_login_profile.user", "key_fingerprint"),
					resource.TestCheckResourceAttr("aws_iam_user_login_profile.user", "password_length", "20"),
					resource.TestCheckResourceAttr("aws_iam_user_login_profile.user", "password_reset_required", "true"),
					resource.TestCheckResourceAttr("aws_iam_user_login_profile.user", "pgp_key", testPubKey1+"\n"),
				),
			},
			{
				ResourceName:      "aws_iam_user_login_profile.user",
				ImportState:       true,
				ImportStateVerify: true,
				ImportStateVerifyIgnore: []string{
					"encrypted_password",
					"key_fingerprint",
					"password_length",
					"password_reset_required",
					"pgp_key",
				},
			},
		},
	})
}

func TestAccAWSUserLoginProfile_keybase(t *testing.T) {
	var conf iam.GetLoginProfileOutput

	username := fmt.Sprintf("test-user-%d", acctest.RandInt())

	resource.ParallelTest(t, resource.TestCase{
		PreCheck:     func() { testAccPreCheck(t) },
		Providers:    testAccProviders,
		CheckDestroy: testAccCheckAWSUserLoginProfileDestroy,
		Steps: []resource.TestStep{
			{
				Config: testAccAWSUserLoginProfileConfig_Required(username, "/", "keybase:terraformacctest"),
				Check: resource.ComposeTestCheckFunc(
					testAccCheckAWSUserLoginProfileExists("aws_iam_user_login_profile.user", &conf),
					resource.TestCheckResourceAttrSet("aws_iam_user_login_profile.user", "encrypted_password"),
					resource.TestCheckResourceAttrSet("aws_iam_user_login_profile.user", "key_fingerprint"),
					resource.TestCheckResourceAttr("aws_iam_user_login_profile.user", "password_length", "20"),
					resource.TestCheckResourceAttr("aws_iam_user_login_profile.user", "password_reset_required", "true"),
					resource.TestCheckResourceAttr("aws_iam_user_login_profile.user", "pgp_key", "keybase:terraformacctest\n"),
				),
			},
			{
				ResourceName:      "aws_iam_user_login_profile.user",
				ImportState:       true,
				ImportStateVerify: true,
				ImportStateVerifyIgnore: []string{
					"encrypted_password",
					"key_fingerprint",
					"password_length",
					"password_reset_required",
					"pgp_key",
				},
			},
		},
	})
}

func TestAccAWSUserLoginProfile_keybaseDoesntExist(t *testing.T) {
	username := fmt.Sprintf("test-user-%d", acctest.RandInt())

	resource.ParallelTest(t, resource.TestCase{
		PreCheck:     func() { testAccPreCheck(t) },
		Providers:    testAccProviders,
		CheckDestroy: testAccCheckAWSUserLoginProfileDestroy,
		Steps: []resource.TestStep{
			{
				// We own this account but it doesn't have any key associated with it
				Config:      testAccAWSUserLoginProfileConfig_Required(username, "/", "keybase:terraform_nope"),
				ExpectError: regexp.MustCompile(`Error retrieving Public Key`),
			},
		},
	})
}

func TestAccAWSUserLoginProfile_notAKey(t *testing.T) {
	username := fmt.Sprintf("test-user-%d", acctest.RandInt())

	resource.ParallelTest(t, resource.TestCase{
		PreCheck:     func() { testAccPreCheck(t) },
		Providers:    testAccProviders,
		CheckDestroy: testAccCheckAWSUserLoginProfileDestroy,
		Steps: []resource.TestStep{
			{
				// We own this account but it doesn't have any key associated with it
				Config:      testAccAWSUserLoginProfileConfig_Required(username, "/", "lolimnotakey"),
				ExpectError: regexp.MustCompile(`Error encrypting Password`),
			},
		},
	})
}

func TestAccAWSUserLoginProfile_PasswordLength(t *testing.T) {
	var conf iam.GetLoginProfileOutput

	username := fmt.Sprintf("test-user-%d", acctest.RandInt())

	resource.ParallelTest(t, resource.TestCase{
		PreCheck:     func() { testAccPreCheck(t) },
		Providers:    testAccProviders,
		CheckDestroy: testAccCheckAWSUserLoginProfileDestroy,
		Steps: []resource.TestStep{
			{
				Config: testAccAWSUserLoginProfileConfig_PasswordLength(username, "/", testPubKey1, 128),
				Check: resource.ComposeTestCheckFunc(
					testAccCheckAWSUserLoginProfileExists("aws_iam_user_login_profile.user", &conf),
					resource.TestCheckResourceAttr("aws_iam_user_login_profile.user", "password_length", "128"),
				),
			},
			{
				ResourceName:      "aws_iam_user_login_profile.user",
				ImportState:       true,
				ImportStateVerify: true,
				ImportStateVerifyIgnore: []string{
					"encrypted_password",
					"key_fingerprint",
					"password_length",
					"password_reset_required",
					"pgp_key",
				},
			},
		},
	})
}

func testAccCheckAWSUserLoginProfileDestroy(s *terraform.State) error {
	iamconn := testAccProvider.Meta().(*AWSClient).iamconn

	for _, rs := range s.RootModule().Resources {
		if rs.Type != "aws_iam_user_login_profile" {
			continue
		}

		_, err := iamconn.GetLoginProfile(&iam.GetLoginProfileInput{
			UserName: aws.String(rs.Primary.ID),
		})

		if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") {
			continue
		}

		return fmt.Errorf("IAM User Login Profile (%s) still exists", rs.Primary.ID)
	}

	return nil
}

func testDecryptPasswordAndTest(nProfile, nAccessKey, key string) resource.TestCheckFunc {
	return func(s *terraform.State) error {
		profileResource, ok := s.RootModule().Resources[nProfile]
		if !ok {
			return fmt.Errorf("Not found: %s", nProfile)
		}

		password, ok := profileResource.Primary.Attributes["encrypted_password"]
		if !ok {
			return errors.New("No password in state")
		}

		accessKeyResource, ok := s.RootModule().Resources[nAccessKey]
		if !ok {
			return fmt.Errorf("Not found: %s", nAccessKey)
		}

		accessKeyId := accessKeyResource.Primary.ID
		secretAccessKey, ok := accessKeyResource.Primary.Attributes["secret"]
		if !ok {
			return errors.New("No secret access key in state")
		}

		decryptedPassword, err := pgpkeys.DecryptBytes(password, key)
		if err != nil {
			return fmt.Errorf("Error decrypting password: %s", err)
		}

		iamAsCreatedUserSession := session.New(&aws.Config{
			Region:      aws.String("us-west-2"),
			Credentials: credentials.NewStaticCredentials(accessKeyId, secretAccessKey, ""),
		})
		_, err = iamAsCreatedUserSession.Config.Credentials.Get()
		if err != nil {
			return fmt.Errorf("Error getting session credentials: %s", err)
		}

		return resource.Retry(2*time.Minute, func() *resource.RetryError {
			iamAsCreatedUser := iam.New(iamAsCreatedUserSession)
			newPassword, err := generateIAMPassword(20)
			if err != nil {
				return resource.NonRetryableError(err)
			}
			_, err = iamAsCreatedUser.ChangePassword(&iam.ChangePasswordInput{
				OldPassword: aws.String(decryptedPassword.String()),
				NewPassword: aws.String(newPassword),
			})
			if err != nil {
				// EntityTemporarilyUnmodifiable: Login Profile for User XXX cannot be modified while login profile is being created.
				if isAWSErr(err, iam.ErrCodeEntityTemporarilyUnmodifiableException, "") {
					return resource.RetryableError(err)
				}
				if isAWSErr(err, "InvalidClientTokenId", "") {
					return resource.RetryableError(err)
				}

				return resource.NonRetryableError(fmt.Errorf("Error changing decrypted password: %s", err))
			}

			return nil
		})
	}
}

func testAccCheckAWSUserLoginProfileExists(n string, res *iam.GetLoginProfileOutput) resource.TestCheckFunc {
	return func(s *terraform.State) error {
		rs, ok := s.RootModule().Resources[n]
		if !ok {
			return fmt.Errorf("Not found: %s", n)
		}

		if rs.Primary.ID == "" {
			return errors.New("No UserName is set")
		}

		iamconn := testAccProvider.Meta().(*AWSClient).iamconn
		resp, err := iamconn.GetLoginProfile(&iam.GetLoginProfileInput{
			UserName: aws.String(rs.Primary.ID),
		})
		if err != nil {
			return err
		}

		*res = *resp

		return nil
	}
}

func testAccAWSUserLoginProfileConfig_base(rName, path string) string {
	return fmt.Sprintf(`
resource "aws_iam_user" "user" {
  name          = "%s"
  path          = "%s"
  force_destroy = true
}

data "aws_caller_identity" "current" {}

data "aws_iam_policy_document" "user" {
  statement {
    effect    = "Allow"
    actions   = ["iam:GetAccountPasswordPolicy"]
    resources = ["*"]
  }

  statement {
    effect    = "Allow"
    actions   = ["iam:ChangePassword"]
    resources = ["arn:aws:iam::${data.aws_caller_identity.current.account_id}:user/&{aws:username}"]
  }
}

resource "aws_iam_user_policy" "user" {
  name   = "AllowChangeOwnPassword"
  user   = aws_iam_user.user.name
  policy = data.aws_iam_policy_document.user.json
}

resource "aws_iam_access_key" "user" {
  user = aws_iam_user.user.name
}
`, rName, path)
}

func testAccAWSUserLoginProfileConfig_PasswordLength(rName, path, pgpKey string, passwordLength int) string {
	return fmt.Sprintf(`
%s

resource "aws_iam_user_login_profile" "user" {
  user            = aws_iam_user.user.name
  password_length = %d

  pgp_key = <<EOF
%s
EOF
}
`, testAccAWSUserLoginProfileConfig_base(rName, path), passwordLength, pgpKey)
}

func testAccAWSUserLoginProfileConfig_Required(rName, path, pgpKey string) string {
	return fmt.Sprintf(`
%s

resource "aws_iam_user_login_profile" "user" {
  user = aws_iam_user.user.name

  pgp_key = <<EOF
%s
EOF
}
`, testAccAWSUserLoginProfileConfig_base(rName, path), pgpKey)
}

const testPubKey1 = `mQENBFXbjPUBCADjNjCUQwfxKL+RR2GA6pv/1K+zJZ8UWIF9S0lk7cVIEfJiprzzwiMwBS5cD0da
rGin1FHvIWOZxujA7oW0O2TUuatqI3aAYDTfRYurh6iKLC+VS+F7H+/mhfFvKmgr0Y5kDCF1j0T/
063QZ84IRGucR/X43IY7kAtmxGXH0dYOCzOe5UBX1fTn3mXGe2ImCDWBH7gOViynXmb6XNvXkP0f
sF5St9jhO7mbZU9EFkv9O3t3EaURfHopsCVDOlCkFCw5ArY+DUORHRzoMX0PnkyQb5OzibkChzpg
8hQssKeVGpuskTdz5Q7PtdW71jXd4fFVzoNH8fYwRpziD2xNvi6HABEBAAG0EFZhdWx0IFRlc3Qg
S2V5IDGJATgEEwECACIFAlXbjPUCGy8GCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEOfLr44B
HbeTo+sH/i7bapIgPnZsJ81hmxPj4W12uvunksGJiC7d4hIHsG7kmJRTJfjECi+AuTGeDwBy84TD
cRaOB6e79fj65Fg6HgSahDUtKJbGxj/lWzmaBuTzlN3CEe8cMwIPqPT2kajJVdOyrvkyuFOdPFOE
A7bdCH0MqgIdM2SdF8t40k/ATfuD2K1ZmumJ508I3gF39jgTnPzD4C8quswrMQ3bzfvKC3klXRlB
C0yoArn+0QA3cf2B9T4zJ2qnvgotVbeK/b1OJRNj6Poeo+SsWNc/A5mw7lGScnDgL3yfwCm1gQXa
QKfOt5x+7GqhWDw10q+bJpJlI10FfzAnhMF9etSqSeURBRW5AQ0EVduM9QEIAL53hJ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