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

feat(IAM Policy Management): re-gen service after fix the template metadata as part of policies #274

Merged
merged 2 commits into from
Aug 28, 2023

Conversation

Rajesh-Pirati
Copy link
Contributor

@Rajesh-Pirati Rajesh-Pirati commented Aug 25, 2023

PR summary

Issue: https://github.ibm.com/IAM/AM-issues/issues/1717

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

Example run test results:
image

Integration test results:
image

…tadata as part of policies

Signed-off-by: Rajesh K Pirati <Rajesh.Pirati@ibm.com>
@Rajesh-Pirati Rajesh-Pirati marked this pull request as ready for review August 26, 2023 02:56
@padamstx padamstx self-assigned this Aug 28, 2023
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
Copy link
Member

@Rajesh-Pirati Could you please also post a screenshot of a clean run of the examples as well? Thanks!

…ate meta data parameters

Signed-off-by: Rajesh K Pirati <Rajesh.Pirati@ibm.com>
@Rajesh-Pirati
Copy link
Contributor Author

Examples run results:

GetPolicyAssignment() result:
{
  "template_id": "policyTemplate-d7794ab2-8b43-42c1-9e0e-bb201def0c3a",
  "template_version": "2",
  "assignment_id": "TestingPolicyAssignment",
  "target_type": "Account",
  "target": "b766255a51c348c8ac8cd9350a54a40a",
  "options": [
    {
      "subject_type": "access_group_id",
      "subject_id": "AccessGroupId-7d0ba87b-325d-4857-ae02-d91f2af0bf79",
      "root_requester_id": "iam-ServiceId-ba2b6448-8559-485a-baf7-b244933b99ca",
      "root_template_id": "UpstremTemplate",
      "root_template_version": "2"
    }
  ],
  "id": "policyAssignment-71083d83-086b-4308-ada5-7279f1073fc6",
  "account_id": "872c19db5b1643a8b3a3ddd12763ec28",
  "href": "https://iam.cloud.ibm.com/v1/policy_assignments/policyAssignment-71083d83-086b-4308-ada5-7279f1073fc6",
  "created_at": "2023-08-25T14:32:30.837Z",
  "created_by_id": "iam-ServiceId-ba2b6448-8559-485a-baf7-b244933b99ca",
  "last_modified_at": "2023-08-25T14:32:30.978Z",
  "last_modified_by_id": "iam-ServiceId-ba2b6448-8559-485a-baf7-b244933b99ca",
  "resources": [
    {
      "target": "b766255a51c348c8ac8cd9350a54a40a",
      "policy": {
        "resource_created": {
          "id": "87fa6e0d-d9b7-4fa1-848e-7406a66239f3"
        }
      }
    }
  ],
  "status": "succeeded"
}
•
GetV2Policy() result:
{
  "type": "access",
  "description": "description",
  "subject": {
    "attributes": [
      {
        "key": "access_group_id",
        "operator": "stringEquals",
        "value": "AccessGroupId-7d0ba87b-325d-4857-ae02-d91f2af0bf79"
      }
    ]
  },
  "resource": {
    "attributes": [
      {
        "key": "service_group_id",
        "operator": "stringEquals",
        "value": "IAM"
      },
      {
        "key": "accountId",
        "operator": "stringEquals",
        "value": "b766255a51c348c8ac8cd9350a54a40a"
      }
    ]
  },
  "pattern": "time-based-conditions:weekly:all-day",
  "rule": {
    "key": "{{environment.attributes.day_of_week}}",
    "operator": "dayOfWeekAnyOf",
    "value": [
      "1+00:00",
      "2+00:00",
      "3+00:00",
      "4+00:00",
      "5+00:00"
    ]
  },
  "id": "87fa6e0d-d9b7-4fa1-848e-7406a66239f3",
  "href": "https://iam.cloud.ibm.com/v2/policies/87fa6e0d-d9b7-4fa1-848e-7406a66239f3",
  "control": {
    "grant": {
      "roles": [
        {
          "role_id": "crn:v1:bluemix:public:iam-identity::::serviceRole:ServiceIdCreator"
        },
        {
          "role_id": "crn:v1:bluemix:public:iam::::role:Operator"
        },
        {
          "role_id": "crn:v1:bluemix:public:iam::::role:Viewer"
        }
      ]
    }
  },
  "created_at": "2023-08-25T14:32:30.901Z",
  "created_by_id": "iam-ServiceId-ba2b6448-8559-485a-baf7-b244933b99ca",
  "last_modified_at": "2023-08-25T14:32:30.901Z",
  "last_modified_by_id": "iam-ServiceId-ba2b6448-8559-485a-baf7-b244933b99ca",
  "state": "active",
  "template": {
    "id": "policyTemplate-d7794ab2-8b43-42c1-9e0e-bb201def0c3a",
    "version": "2",
    "assignment_id": "policyAssignment-71083d83-086b-4308-ada5-7279f1073fc6",
    "root_id": "UpstremTemplate",
    "root_version": "2"
  }
}
•••
Ran 212 of 212 Specs in 23.026 seconds
SUCCESS! -- 212 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS
ok  	github.com/IBM/platform-services-go-sdk/iampolicymanagementv1	23.884s

Integration tests:
image

@padamstx padamstx merged commit 542046f into main Aug 28, 2023
4 checks passed
@padamstx padamstx deleted the iam-access-management-assignment-fix branch August 28, 2023 16:51
ibm-devx-sdk pushed a commit that referenced this pull request Aug 28, 2023
# [0.47.0](v0.46.0...v0.47.0) (2023-08-28)

### Features

* **IAM Policy Management:** fix  template metadata as part of policies ([#274](#274)) ([542046f](542046f))
@ibm-devx-sdk
Copy link

🎉 This PR is included in version 0.47.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

manukm-ibm pushed a commit to manukm-ibm/platform-services-go-sdk that referenced this pull request Sep 13, 2023
IBM#274)

Signed-off-by: Rajesh K Pirati <Rajesh.Pirati@ibm.com>
Signed-off-by: manu.k.m <manu.k.m@ibm.com>
manukm-ibm pushed a commit to manukm-ibm/platform-services-go-sdk that referenced this pull request Sep 13, 2023
# [0.47.0](IBM/platform-services-go-sdk@v0.46.0...v0.47.0) (2023-08-28)

### Features

* **IAM Policy Management:** fix  template metadata as part of policies ([IBM#274](IBM#274)) ([542046f](IBM@542046f))

Signed-off-by: manu.k.m <manu.k.m@ibm.com>
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.

None yet

3 participants