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

Initial AWS Console Login Profile password contains unicode-encoded characters #478

Closed
1 task done
ahasna opened this issue Apr 18, 2024 · 2 comments
Closed
1 task done
Labels

Comments

@ahasna
Copy link

ahasna commented Apr 18, 2024

Description

When using the iam-user module to create IAM Users with console login profiles, the login kept failing. Upon further inspection, I noticed that the initial login password contained \u0026 which is the unicode of &. Replacing the unicode with the actual character worked (after 2 hours of debugging fun). i suspect this as something to do with terraform output -json. When using terraform output -json | jq all works fine.

  • ✋ I have searched the open/closed issues and my issue is not listed.

Versions

  • Module version: 5.39.0

  • Terraform version: Terraform v1.5.4 on darwin_arm64

  • Provider version(s): provider registry.terraform.io/hashicorp/aws v5.45.0

Reproduction Code

Steps to reproduce the behavior:

  1. Create an IAM user
  2. Get lucky and have a & in the initial random password
  3. Run terraform output -json
  4. use the password from output and try to login

Expected behavior

Password is returned as is by the output.

Actual behavior

Some special carachters are unicode-encoded

Terminal Output Screenshot(s)

{
  "console_login_url": {
    "sensitive": false,
    "type": "string",
    "value": "https://myawsaccount.signin.aws.amazon.com/console"
  },
  "developers": {
    "sensitive": true,
    "type": [
      "object",
      {
        "stillrain": [
          "object",
          {
            "iam_access_key_encrypted_secret": "string",
            "iam_access_key_encrypted_ses_smtp_password_v4": "string",
            "iam_access_key_id": "string",
            "iam_access_key_key_fingerprint": "string",
            "iam_access_key_secret": "string",
            "iam_access_key_ses_smtp_password_v4": "string",
            "iam_access_key_status": "string",
            "iam_user_arn": "string",
            "iam_user_login_profile_encrypted_password": "string",
            "iam_user_login_profile_key_fingerprint": "string",
            "iam_user_login_profile_password": "string",
            "iam_user_name": "string",
            "iam_user_ssh_key_fingerprint": "string",
            "iam_user_ssh_key_ssh_public_key_id": "string",
            "iam_user_unique_id": "string",
            "keybase_password_decrypt_command": "string",
            "keybase_password_pgp_message": "string",
            "keybase_secret_key_decrypt_command": "string",
            "keybase_secret_key_pgp_message": "string",
            "keybase_ses_smtp_password_v4_decrypt_command": "string",
            "keybase_ses_smtp_password_v4_pgp_message": "string",
            "pgp_key": "string",
            "policy_arns": [
              "tuple",
              []
            ]
          }
        ]
      }
    ],
    "value": {
      "stillrain": {
        "iam_access_key_encrypted_secret": "",
        "iam_access_key_encrypted_ses_smtp_password_v4": "",
        "iam_access_key_id": "",
        "iam_access_key_key_fingerprint": "",
        "iam_access_key_secret": "",
        "iam_access_key_ses_smtp_password_v4": "",
        "iam_access_key_status": "",
        "iam_user_arn": "arn:aws:iam::12345678912:user/stillrain",
        "iam_user_login_profile_encrypted_password": null,
        "iam_user_login_profile_key_fingerprint": null,
        "iam_user_login_profile_password": "-ga$W+p)\u0026%^*l4w=AQ7xIm5$M_%MQ|_X",
        "iam_user_name": "stillrain",
        "iam_user_ssh_key_fingerprint": "",
        "iam_user_ssh_key_ssh_public_key_id": "",
        "iam_user_unique_id": "AIDA3WP2632CQBR6P7MZD",
        "keybase_password_decrypt_command": null,
        "keybase_password_pgp_message": null,
        "keybase_secret_key_decrypt_command": null,
        "keybase_secret_key_pgp_message": null,
        "keybase_ses_smtp_password_v4_decrypt_command": null,
        "keybase_ses_smtp_password_v4_pgp_message": null,
        "pgp_key": "",
        "policy_arns": []
      }
    }
  }
}

@ahasna ahasna changed the title Initial password AWS Console Login Profile contains unicode-encoded carachters Initial AWS Console Login Profile password contains unicode-encoded characters Apr 18, 2024
Copy link

This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days

@github-actions github-actions bot added the stale label May 19, 2024
Copy link

This issue was automatically closed because of stale in 10 days

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant