API to change role of ws-security policy

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

API to change role of ws-security policy

Godwin Shrimal
Hi Devs,

Is there any API to change the roles of the UT policy (ws-security) in the registry?


Thanks
Godwin

--
Godwin Amila Shrimal
Associate Technical Lead
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94772264165

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: API to change role of ws-security policy

Godwin Shrimal
Hi Prasanna,

I want to update the security policy "_system/config/repository/components/org.wso2.carbon.security.mgt/policy/policy1". I am using following request to update it and but getting 405-Method not allowed.

Method: PUT
Headers:
Media-Type: Policy
Content-Type: application/xml
Authorization: Basic YWRtaW46YWRtaW4=
Payload: <Test>Test</Test>
Godwin


On Tue, Jan 2, 2018 at 2:18 PM, Godwin Shrimal <[hidden email]> wrote:
Thanks for the response Prasanna, Yes we can use "Update a resource" REST API to update the resources


Thanks
Godwin



On Tue, Jan 2, 2018 at 2:09 PM, Prasanna Dangalla <[hidden email]> wrote:
Hi Godwin,

On Tue, Jan 2, 2018 at 12:33 PM, Godwin Shrimal <[hidden email]> wrote:
If this is not available, Is there any API to update the entire content of the resource ?
We have REST API's update registry resources and governance artifacts. Can you check whether these can be used for your use case?


Thanks
Prasanna


Thanks
Godwin

On Sun, Dec 17, 2017 at 2:21 PM, Godwin Shrimal <[hidden email]> wrote:
Hi Devs,

Is there any API to change the roles of the UT policy (ws-security) in the registry?


Thanks
Godwin

--
Godwin Amila Shrimal
Associate Technical Lead
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94772264165



--
Godwin Amila Shrimal
Associate Technical Lead
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94772264165




--
Godwin Amila Shrimal
Associate Technical Lead
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94772264165



--
Godwin Amila Shrimal
Associate Technical Lead
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94772264165

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: API to change role of ws-security policy

Godwin Shrimal
I am trying this in EI-6.1.1 pack


Thanks
Godwin

On Fri, Jan 5, 2018 at 2:07 PM, Godwin Shrimal <[hidden email]> wrote:
Hi Prasanna,

I want to update the security policy "_system/config/repository/components/org.wso2.carbon.security.mgt/policy/policy1". I am using following request to update it and but getting 405-Method not allowed.

Method: PUT
Headers:
Media-Type: Policy
Content-Type: application/xml
Authorization: Basic YWRtaW46YWRtaW4=
Payload: <Test>Test</Test>
Godwin


On Tue, Jan 2, 2018 at 2:18 PM, Godwin Shrimal <[hidden email]> wrote:
Thanks for the response Prasanna, Yes we can use "Update a resource" REST API to update the resources


Thanks
Godwin



On Tue, Jan 2, 2018 at 2:09 PM, Prasanna Dangalla <[hidden email]> wrote:
Hi Godwin,

On Tue, Jan 2, 2018 at 12:33 PM, Godwin Shrimal <[hidden email]> wrote:
If this is not available, Is there any API to update the entire content of the resource ?
We have REST API's update registry resources and governance artifacts. Can you check whether these can be used for your use case?


Thanks
Prasanna


Thanks
Godwin

On Sun, Dec 17, 2017 at 2:21 PM, Godwin Shrimal <[hidden email]> wrote:
Hi Devs,

Is there any API to change the roles of the UT policy (ws-security) in the registry?


Thanks
Godwin

--
Godwin Amila Shrimal
Associate Technical Lead
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94772264165



--
Godwin Amila Shrimal
Associate Technical Lead
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94772264165




--
Godwin Amila Shrimal
Associate Technical Lead
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94772264165



--
Godwin Amila Shrimal
Associate Technical Lead
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94772264165



--
Godwin Amila Shrimal
Associate Technical Lead
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94772264165

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: API to change role of ws-security policy

Danesh Kuruppu
Hi Godwin,

Seems like your request url is wrong. I tested the same in EI-6.1.1 by adding resources.war from GREG 5.3.0 pack and It is working fine. Please execute the below curl and test.

curl -X PUT -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Media-Type: Policy" -H "Content-Type: application/xml" -H "Cache-Control: no-cache" -d '<Test>Test2</Test>' "https://localhost:9443/resource/1.0.0/artifact/_system/config/repository/components/org.wso2.carbon.security.mgt/policy/policy1" -i -k

Thanks
Danesh

On Fri, Jan 5, 2018 at 12:47 PM, Godwin Shrimal <[hidden email]> wrote:
I am trying this in EI-6.1.1 pack


Thanks
Godwin

On Fri, Jan 5, 2018 at 2:07 PM, Godwin Shrimal <[hidden email]> wrote:
Hi Prasanna,

I want to update the security policy "_system/config/repository/components/org.wso2.carbon.security.mgt/policy/policy1". I am using following request to update it and but getting 405-Method not allowed.

Method: PUT
Headers:
Media-Type: Policy
Content-Type: application/xml
Authorization: Basic YWRtaW46YWRtaW4=
Payload: <Test>Test</Test>
Godwin


On Tue, Jan 2, 2018 at 2:18 PM, Godwin Shrimal <[hidden email]> wrote:
Thanks for the response Prasanna, Yes we can use "Update a resource" REST API to update the resources


Thanks
Godwin



On Tue, Jan 2, 2018 at 2:09 PM, Prasanna Dangalla <[hidden email]> wrote:
Hi Godwin,

On Tue, Jan 2, 2018 at 12:33 PM, Godwin Shrimal <[hidden email]> wrote:
If this is not available, Is there any API to update the entire content of the resource ?
We have REST API's update registry resources and governance artifacts. Can you check whether these can be used for your use case?


Thanks
Prasanna


Thanks
Godwin

On Sun, Dec 17, 2017 at 2:21 PM, Godwin Shrimal <[hidden email]> wrote:
Hi Devs,

Is there any API to change the roles of the UT policy (ws-security) in the registry?


Thanks
Godwin

--
Godwin Amila Shrimal
Associate Technical Lead
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94772264165



--
Godwin Amila Shrimal
Associate Technical Lead
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94772264165




--
Godwin Amila Shrimal
Associate Technical Lead
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94772264165



--
Godwin Amila Shrimal
Associate Technical Lead
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94772264165



--
Godwin Amila Shrimal
Associate Technical Lead
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94772264165



--

Danesh Kuruppu

Senior Software Engineer | WSO2

Email: [hidden email]

Mobile: +94 (77) 1690552
Web: WSO2 Inc



_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev