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

[PR #2012/8b138e39 backport][stable-7] returns boolean if a user has access to console login #2023

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Mar 22, 2024

This is a backport of PR #2012 as merged into main (8b138e3).

Summary
I've introduced a new feature that includes in the response a console_access parameter, which is a boolean indicating whether an iam user has the ability to log in through the AWS console. This addition is particularly useful for scenarios where administrative constraints require users to access AWS services exclusively via API keys or through controlled environments, such as landing zones, without using the AWS console login interface.

Issue Type

  • Feature Pull Request
    Component Name: botocore
    includes the botocore interaction, specifically regarding the console_access information retrievals

Additional Information
With this update, the module now provides visibility into whether an IAM user is permitted console access. This could be pivotal for enforcing stricter security protocols, ensuring users do not bypass VPN requirements, API keys, or other access control measures by logging in through the AWS console

Before the change a normal response:

{
    "arn": "arn:aws:iam::11111111:user/terraform",
    "create_date": "2018-04-18T14:12:44+00:00",
    "path": "/",
    "tags": {},
    "user_id": "12345abcd",
    "user_name": "terraform"
}

After the change:

{
    "arn": "arn:aws:iam::11111111:user/terraform",
    "console_access": false,
    "create_date": "2018-04-18T14:12:44+00:00",
    "path": "/",
    "tags": {},
    "user_id": "12345abcd",
    "user_name": "terraform"
}

returns boolean if a user has access to console login

Summary
I've introduced a new feature that includes in the response a console_access parameter, which is a boolean indicating whether an iam user has the ability to log in through the AWS console. This addition is particularly useful for scenarios where administrative constraints require users to access AWS services exclusively via API keys or through controlled environments, such as landing zones, without using the AWS console login interface.
Issue Type

Feature Pull Request
Component Name: botocore
includes the botocore interaction, specifically regarding the console_access information retrievals

Additional Information
With this update, the module now provides visibility into whether an IAM user is permitted console access. This could be pivotal for enforcing stricter security protocols, ensuring users do not bypass VPN requirements, API keys, or other access control measures by logging in through the AWS console
Before the change a normal response:
{
    "arn": "arn:aws:iam::11111111:user/terraform",
    "create_date": "2018-04-18T14:12:44+00:00",
    "path": "/",
    "tags": {},
    "user_id": "12345abcd",
    "user_name": "terraform"
}

After the change:
{
    "arn": "arn:aws:iam::11111111:user/terraform",
    "console_access": false,
    "create_date": "2018-04-18T14:12:44+00:00",
    "path": "/",
    "tags": {},
    "user_id": "12345abcd",
    "user_name": "terraform"
}

Reviewed-by: Bikouo Aubin
Reviewed-by: Mark Chappell
(cherry picked from commit 8b138e3)
Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/7bcc92e4b3594781bd73db87e2f003b5

✔️ ansible-galaxy-importer SUCCESS in 5m 46s
✔️ build-ansible-collection SUCCESS in 15m 09s
✔️ ansible-test-splitter SUCCESS in 6m 27s
✔️ integration-amazon.aws-1 SUCCESS in 6m 39s
Skipped 43 jobs

Copy link

Docs Build 📝

Thank you for contribution!✨

The docsite for this PR is available for download as an artifact from this run:
https://github.com/ansible-collections/amazon.aws/actions/runs/8387976966

You can compare to the docs for the main branch here:
https://ansible-collections.github.io/amazon.aws/branch/main

File changes:

  • M collections/amazon/aws/iam_user_info_module.html
Click to see the diff comparison.

NOTE: only file modifications are shown here. New and deleted files are excluded.
See the file list and check the published docs to see those files.

diff --git a/home/runner/work/amazon.aws/amazon.aws/docsbuild/base/collections/amazon/aws/iam_user_info_module.html b/home/runner/work/amazon.aws/amazon.aws/docsbuild/head/collections/amazon/aws/iam_user_info_module.html
index 0a67acc..1d5f364 100644
--- a/home/runner/work/amazon.aws/amazon.aws/docsbuild/base/collections/amazon/aws/iam_user_info_module.html
+++ b/home/runner/work/amazon.aws/amazon.aws/docsbuild/head/collections/amazon/aws/iam_user_info_module.html
@@ -422,6 +422,15 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-iam-user
 </div></td>
 </tr>
 <tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-iam_users/login_profile"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-iam-user-info-module-return-iam-users-login-profile"><strong>login_profile</strong></p>
+<a class="ansibleOptionLink" href="#return-iam_users/login_profile" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
+</div></td>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Detailed login profile information if the user has access to log in from AWS default console. Returns an empty object {} if no access.</p>
+<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> always</p>
+<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">{&quot;create_date&quot;:</span> <span class="pre">&quot;2024-03-20T12:50:56+00:00&quot;,</span> <span class="pre">&quot;password_reset_required&quot;:</span> <span class="pre">false,</span> <span class="pre">&quot;user_name&quot;:</span> <span class="pre">&quot;i_am_a_user&quot;}</span></code></p>
+</div></td>
+</tr>
+<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="return-iam_users/password_last_used"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-iam-user-info-module-return-iam-users-password-last-used"><strong>password_last_used</strong></p>
 <a class="ansibleOptionLink" href="#return-iam_users/password_last_used" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
@@ -430,7 +439,7 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-iam-user
 <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">&quot;2016-05-25T13:39:11+00:00&quot;</span></code></p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="return-iam_users/path"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-iam-user-info-module-return-iam-users-path"><strong>path</strong></p>
 <a class="ansibleOptionLink" href="#return-iam_users/path" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
@@ -439,7 +448,7 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-iam-user
 <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">&quot;/dev/&quot;</span></code></p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="return-iam_users/tags"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-iam-user-info-module-return-iam-users-tags"><strong>tags</strong></p>
 <a class="ansibleOptionLink" href="#return-iam_users/tags" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
 </div></td>
@@ -448,7 +457,7 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-iam-user
 <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">{&quot;Env&quot;:</span> <span class="pre">&quot;Prod&quot;}</span></code></p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="return-iam_users/user_id"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-iam-user-info-module-return-iam-users-user-id"><strong>user_id</strong></p>
 <a class="ansibleOptionLink" href="#return-iam_users/user_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
@@ -457,7 +466,7 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-iam-user
 <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">&quot;AIDUIOOCQKTUGI6QJLGH2&quot;</span></code></p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="return-iam_users/user_name"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-iam-user-info-module-return-iam-users-user-name"><strong>user_name</strong></p>
 <a class="ansibleOptionLink" href="#return-iam_users/user_name" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>

@hakbailey hakbailey added the mergeit Merge the PR (SoftwareFactory) label Apr 1, 2024
Copy link
Contributor

Build failed (gate pipeline). For information on how to proceed, see
http://docs.openstack.org/infra/manual/developers.html#automated-testing

https://ansible.softwarefactory-project.io/zuul/buildset/1ef5d2bf05b84f3e81881e5a43d1ee9f

✔️ ansible-galaxy-importer SUCCESS in 4m 58s
✔️ build-ansible-collection SUCCESS in 18m 05s
✔️ ansible-test-splitter SUCCESS in 9m 47s
integration-amazon.aws-1 RETRY_LIMIT in 1m 42s
✔️ integration-community.aws-1 SUCCESS in 6m 31s
Skipped 42 jobs

@hakbailey
Copy link
Contributor

regate

Copy link
Contributor

Build succeeded (gate pipeline).
https://ansible.softwarefactory-project.io/zuul/buildset/17184db359144bf89c9a744c2031344f

✔️ ansible-galaxy-importer SUCCESS in 5m 59s
✔️ build-ansible-collection SUCCESS in 18m 21s
✔️ ansible-test-splitter SUCCESS in 6m 16s
✔️ integration-amazon.aws-1 SUCCESS in 6m 38s
Skipped 43 jobs

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 5f41423 into stable-7 Apr 1, 2024
40 checks passed
@softwarefactory-project-zuul softwarefactory-project-zuul bot deleted the patchback/backports/stable-7/8b138e3947ede41de8264e9a4aabcfd7a2759891/pr-2012 branch April 1, 2024 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mergeit Merge the PR (SoftwareFactory)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants