Skip to content

feat(IAM Policy Management): add support for action control templates from IAM #297

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

Merged
merged 4 commits into from
May 7, 2025

Conversation

Rajesh-Pirati
Copy link
Contributor

@Rajesh-Pirati Rajesh-Pirati commented Apr 28, 2025

PR summary

PR Checklist

Please make sure that your PR fulfills the following requirements:

  • The commit message follows the Angular Commit Message Guidelines.
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Current vs new behavior

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

issue: https://github.ibm.com/IAM/AM-issues/issues/3395

@Rajesh-Pirati
Copy link
Contributor Author

integration testcase results

jest test/integration/iam-policy-management.v1.test.js
 PASS  test/integration/iam-policy-management.v1.test.js (71.697 s)
-----------------------|---------|----------|---------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
File                   | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                                                                                                                                                                  
-----------------------|---------|----------|---------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
All files              |   76.66 |    58.83 |      84 |   78.13 |                                                                                                                                                                                    
 iam-policy-management |   76.46 |    58.83 |   83.91 |   77.93 |                                                                                                                                                                                    
  v1.ts                |   76.46 |    58.83 |   83.91 |   77.93 | ...,6833-6840,6848,6856-6874,6882-6887,6915-6922,6930,6938-6956,6964-6969,6997-7004,7012,7020-7038,7046-7051,7079-7086,7094,7102-7120,7128-7133,7161-7168,7176,7184-7202,7210-7215 
 lib                   |     100 |      100 |     100 |     100 |                                                                                                                                                                                    
  common.ts            |     100 |      100 |     100 |     100 |                                                                                                                                                                                    
-----------------------|---------|----------|---------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Test Suites: 1 passed, 1 total
Tests:       59 passed, 59 total
Snapshots:   0 total
Time:        71.867 s, estimated 72 s
Ran all test suites matching /test\/integration\/iam-policy-management.v1.test.js/i.

Examples:

    console.log
      getActionControlAssignment() result:

      at Object.originalLog (examples/iam-policy-management.v1.test.js:1714:5)

    console.log
      {
        "id": "actionControlAssignment-f6514678-12e6-4952-b3d6-19b7169f28f5",
        "account_id": "e3aa0adff348470f803d4b6e53d625cf",
        "target": {
          "id": "0ddc8e9eb0894383b48791ff4ba0b80e",
          "type": "Account"
        },
        "template": {
          "id": "actionControlTemplate-4e4a089b-d401-4fdd-9f6d-025ad1be30aa",
          "version": "2"
        },
        "status": "succeeded",
        "resources": [
          {
            "target": {
              "id": "0ddc8e9eb0894383b48791ff4ba0b80e",
              "type": "Account"
            },
            "action_control": {
              "resource_created": {
                "id": "cd49b4d821192c051ad77adfe63059e9"
              }
            }
          }
        ],
        "operation": "update",
        "created_by_id": "IBMid-696000BLE3",
        "last_modified_by_id": "IBMid-696000BLE3",
        "created_at": "2025-04-29T11:35:08.902Z",
        "last_modified_at": "2025-04-29T11:35:10.528Z",
        "href": "https://iam.test.cloud.ibm.com/v1/action_control_assignments/actionControlAssignment-f6514678-12e6-4952-b3d6-19b7169f28f5"
      }

      at console.originalLog (examples/iam-policy-management.v1.test.js:1706:7)

    console.log
      {
        "external_account_identity_interaction": {
          "identity_types": {
            "user": {
              "state": "monitor",
              "external_allowed_accounts": []
            },
            "service_id": {
              "state": "monitor",
              "external_allowed_accounts": []
            },
            "service": {
              "state": "monitor",
              "external_allowed_accounts": []
            }
          }
        }
      }

      at console.originalLog (examples/iam-policy-management.v1.test.js:1808:7)

    console.log
      {
        "external_account_identity_interaction": {
          "identity_types": {
            "user": {
              "state": "monitor",
              "external_allowed_accounts": []
            },
            "service_id": {
              "state": "monitor",
              "external_allowed_accounts": []
            },
            "service": {
              "state": "monitor",
              "external_allowed_accounts": []
            }
          }
        }
      }

      at console.originalLog (examples/iam-policy-management.v1.test.js:1835:7)

-----------------------|---------|----------|---------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
File                   | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                                                                                                                                                                  
-----------------------|---------|----------|---------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
All files              |   76.66 |    58.57 |      84 |   78.13 |                                                                                                                                                                                    
 iam-policy-management |   76.46 |    58.57 |   83.91 |   77.93 |                                                                                                                                                                                    
  v1.ts                |   76.46 |    58.57 |   83.91 |   77.93 | ...,6833-6840,6848,6856-6874,6882-6887,6915-6922,6930,6938-6956,6964-6969,6997-7004,7012,7020-7038,7046-7051,7079-7086,7094,7102-7120,7128-7133,7161-7168,7176,7184-7202,7210-7215 
 lib                   |     100 |      100 |     100 |     100 |                                                                                                                                                                                    
  common.ts            |     100 |      100 |     100 |     100 |                                                                                                                                                                                    
-----------------------|---------|----------|---------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Test Suites: 1 passed, 1 total
Tests:       49 passed, 49 total
Snapshots:   0 total
Time:        41.551 s
Ran all test suites matching /examples\/iam-policy-management.v1.test.js/i.

@padamstx padamstx self-assigned this May 5, 2025
@padamstx padamstx self-requested a review May 5, 2025 16:01
Copy link
Member

@padamstx padamstx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The integration tests are missing a test for the listActionControlTemplateAssignments operation.

@Rajesh-Pirati Rajesh-Pirati marked this pull request as ready for review May 6, 2025 17:42
Copy link
Member

@padamstx padamstx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@padamstx padamstx merged commit 7aab0b2 into main May 7, 2025
12 checks passed
@padamstx padamstx deleted the 3395-action-control-templates branch May 7, 2025 16:52
ibm-devx-sdk pushed a commit that referenced this pull request May 7, 2025
# [0.73.0](v0.72.0...v0.73.0) (2025-05-07)

### Features

* **IAM Policy Management:** add support for action control templates from IAM ([#297](#297)) ([7aab0b2](7aab0b2))
@ibm-devx-sdk
Copy link

🎉 This PR is included in version 0.73.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

benbuchanan pushed a commit to benbuchanan/platform-services-node-sdk that referenced this pull request May 19, 2025
benbuchanan pushed a commit to benbuchanan/platform-services-node-sdk that referenced this pull request May 19, 2025
# [0.73.0](IBM/platform-services-node-sdk@v0.72.0...v0.73.0) (2025-05-07)

### Features

* **IAM Policy Management:** add support for action control templates from IAM ([IBM#297](IBM#297)) ([7aab0b2](IBM@7aab0b2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants