wso2 / product-is

Welcome to the WSO2 Identity Server source code! For info on working with the WSO2 Identity Server repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
741 stars 720 forks source link

SOAP API method publishToPDP does not work #8628

Open ThiNepo opened 4 years ago

ThiNepo commented 4 years ago

Describe the issue: We are trying to use the SOAP Policy Administration API to publish a policy to PDP. We tried using SOAP and REST but nothing works. In SOAP we don't receive any response back, using REST we receive status code 200, but the policy is not published (we are trying to see the change in the management GUI, but nothing changes there).

from requests.auth import HTTPBasicAuth 
from requests import Session
from zeep import Client
from zeep.transports import Transport

session = Session()
session.verify = False
session.auth = HTTPBasicAuth("rsuser", "rsuser123")
client = Client(
    "https://BASE_URL:9443/services/EntitlementPolicyAdminService?wsdl",
    transport=Transport(session=session),
)

data = {
    "policyIds": ["UMApolicy_Test"],
    "version": "1",
    "enabled": True,
    "order": 30,
}

response = client.service.publishToPDP(**data)
print(response)

How to reproduce: Try to use the publishToPDP as described in https://is.docs.wso2.com/en/latest/develop/entitlement-with-apis/#publishtopdp

Expected behavior: The policy should be published.

Environment information

mrderban commented 3 years ago

Hi ! I'm encountering the exact same issue, were you able to find a solution ?