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

Add API endpoint for patching multiple governance connectors #476

Merged
merged 5 commits into from
Aug 29, 2023

Conversation

Lakshan-Banneheke
Copy link
Contributor

@Lakshan-Banneheke Lakshan-Banneheke commented Aug 21, 2023

Purpose

There is a requirement to have an API endpoint for updating configurations of multiple governance connectors.

Currently, multiple patch requests need to be sent to the identity governance api for each connector simultaneously, and this is causing some updates to get lost due to a race condition.

The password expiry and password history connectors are updated using one button from the frontend, which sends multiple patch requests which causes this problem.

The PR resolves https://github.com/wso2-enterprise/asgardeo-product/issues/18833

Goals

  • Adds a new API endpoint for updating configurations of multiple governance connectors through one patch request.

Approach

  • There is currently an endpoint to GET multiple governance connectors.
  • This PR is to allow PATCH requests to the same endpoint and process them to update multiple governance connectors.
  • Endpoint: PATCH /identity-governance/{category-id}/connectors.
  • The request body will contain the relevant connector ids and the configurations to be updated.

Sample request body.

{
  "operation": "UPDATE",
  "connectors": [
    {
      "id": "cGFzc3dvcmRIaXN0b3J5",
      "properties":[
            {"name":"passwordHistory.count","value":"20"},
            {"name":"passwordHistory.enable","value":"true"}
        ]
    },
    {
      "id": "cGFzc3dvcmRFeHBpcnlWMg",
      "properties":[
            {"name":"passwordExpiry.enablePasswordExpiry","value":"true"},
            {"name":"passwordExpiry.passwordExpiryInDays","value":"30"}
        ]
    }
  ]
}

Automation tests

Integration tests

Security checks

Related Issues

Kanapriya
Kanapriya previously approved these changes Aug 24, 2023
@Kanapriya Kanapriya merged commit 978bb77 into wso2:master Aug 29, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants