Skip to content

Conversation

@Rajesh-Pirati
Copy link
Contributor

PR summary

Authorization policy type support for enterprise accounts
issue: https://github.ibm.com/IAM/AM-issues/issues/2350

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

test results:

example:

get_v2_assignment_policy() result:
{
  "id": "032661b9-ac63-4972-ad28-52909db77844",
  "type": "authorization",
  "subject": {
    "attributes": [
      {
        "value": "compliance",
        "operator": "stringEquals",
        "key": "serviceName"
      },
      {
        "value": "0ddc8e9eb0894383b48791ff4ba0b80e",
        "operator": "stringEquals",
        "key": "accountId"
      }
    ]
  },
  "resource": {
    "attributes": [
      {
        "value": "appid",
        "operator": "stringEquals",
        "key": "serviceName"
      },
      {
        "value": "0ddc8e9eb0894383b48791ff4ba0b80e",
        "operator": "stringEquals",
        "key": "accountId"
      }
    ]
  },
  "control": {
    "grant": {
      "roles": [
        {
          "role_id": "crn:v1:bluemix:public:iam::::serviceRole:Reader"
        }
      ]
    }
  },
  "href": "https://iam.test.cloud.ibm.com/v1/policies/032661b9-ac63-4972-ad28-52909db77844",
  "created_at": "2024-04-16T12:24:16.904Z",
  "created_by_id": "test_sdk",
  "last_modified_at": "2024-04-16T12:24:17.493Z",
  "last_modified_by_id": "test_sdk",
  "state": "active",
  "version": "v1.0",
  "template": {
    "id": "policyTemplate-5b44c0c7-eed5-4b8d-8de1-e881a1b9115d",
    "version": "2",
    "assignment_id": "policyAssignment-004f64b3-c5df-4d93-8e87-e099b7a443e3"
  }
}
.
delete_policy_assignment() response status code:  204
.
delete_policy_template() response status code:  204
.

================================================================================================================ warnings summary =================================================================================================================
../../../venv/lib/python3.9/site-packages/urllib3/__init__.py:34
  /Users/rajesh/venv/lib/python3.9/site-packages/urllib3/__init__.py:34: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================================================= 31 passed, 1 warning in 24.34s ==========================================================================================================

integration tests

=============================================================================================================== test session starts ===============================================================================================================
platform darwin -- Python 3.9.6, pytest-7.4.4, pluggy-1.3.0
rootdir: /Users/rajesh/iam-project/platform-sdk/platform-services-python-sdk
plugins: cov-4.1.0
collected 33 items                                                                                                                                                                                                                                

test/integration/test_iam_policy_management_v1.py .................................                                                                                                                                                         [100%]

================================================================================================================ warnings summary =================================================================================================================
../../../venv/lib/python3.9/site-packages/urllib3/__init__.py:34
  /Users/rajesh/venv/lib/python3.9/site-packages/urllib3/__init__.py:34: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================================================= 33 passed, 1 warning in 22.37s =======================================================================================================

@CLAassistant
Copy link

CLAassistant commented Apr 16, 2024

CLA assistant check
All committers have signed the CLA.

@padamstx padamstx self-requested a review April 16, 2024 15:05
@padamstx padamstx self-assigned this Apr 16, 2024
@padamstx padamstx changed the title feat(IAM Policy Management): S2S support for enterprise accounts fix(IAM Policy Management): S2S support for enterprise accounts Apr 16, 2024
Copy link
Contributor

@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 c5c2f84 into main Apr 16, 2024
@padamstx padamstx deleted the enterprise-s2s-support branch April 16, 2024 15:20
ibm-devx-sdk pushed a commit that referenced this pull request Apr 16, 2024
## [0.53.4](v0.53.3...v0.53.4) (2024-04-16)

### Bug Fixes

* **IAM Policy Management:** S2S support for enterprise accounts ([#253](#253)) ([c5c2f84](c5c2f84))
@ibm-devx-sdk
Copy link

🎉 This PR is included in version 0.53.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

5 participants