[midPoint] REST Request Change User Password

Wojciech Staszewski wojciech.staszewski at diagnostyka.pl
Wed Feb 26 15:13:02 CET 2020


ERRATA:

curl --user username:OldPassword -H "Content-Type: application/xml" -X PATCH https://YOUR.midpoint.server/midpoint/ws/rest/users/00000000-0000-0000-0000-000000000000 -d @change_pass.xml

;)

W dniu 26.02.2020 o 15:10, Wojciech Staszewski pisze:
> Sure!
> 
> file: change_pass.xml:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <objectModification
>     xmlns='http://midpoint.evolveum.com/xml/ns/public/common/api-types-3'
>     xmlns:c='http://midpoint.evolveum.com/xml/ns/public/common/common-3'
>     xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3">
>         <t:itemDelta>
>             <t:modificationType>replace</t:modificationType>
>             <t:path>credentials/password/value</t:path>
>             <t:value>BrandN3wP at ssw0rd</t:value>
>         </t:itemDelta>
> </objectModification>
> 
> 
> bash: #> curl --user username:OldPassword -H "Content-Type: application/xml" -X PATCH https://idm.diag.pl/midpoint/ws/rest/users/00000000-0000-0000-0000-000000000000 -d @change_password.xml
> 
> where "00000000-0000-0000-0000-000000000000" is the user OID. You have to know the OID :)
> 
> Regards!
> WS
> 
> W dniu 26.02.2020 o 15:05, Gómez Martínez, Elsa pisze:
>> Hi!
>>
>> Thanks a lot for your answer.
>>
>> Could you send an example of the rest request please?
>>
>> I'm new with that...
>>
>> Elsa
>>
>> -----Mensaje original-----
>> De: midPoint <midpoint-bounces at lists.evolveum.com> En nombre de Wojciech Staszewski
>> Enviado el: miércoles, 26 de febrero de 2020 15:04
>> Para: midpoint at lists.evolveum.com
>> Asunto: Re: [midPoint] REST Request Change User Password
>>
>> Hi!
>>
>> I think it is possible. You can do it by sending REST API request authenticating with the user login/old password, but you need to add a REST API authorization to all users, for example:
>>
>> <authorization>
>>         <action>http://midpoint.evolveum.com/xml/ns/public/security/authorization-rest-3#all</action>
>> </authorization>
>>
>> Actually I tested it just right now and it worked.
>>
>> Regards!
>> Wojciech Staszewski
>>
>> W dniu 25.02.2020 o 16:31, Gómez Martínez, Elsa pisze:
>>> Hi everyone!
>>>
>>>  
>>>
>>> I want to change the user password using REST request from my own front.
>>>
>>>  
>>>
>>> Is there any way to change it withot sending the administrator credentials? Could be possible sent the old user password?
>>>
>>>  
>>>
>>> Thanks!
>>>
>>> Elsa
>>>
>>>
>>> _______________________________________________
>>> midPoint mailing list
>>> midPoint at lists.evolveum.com
>>> http://lists.evolveum.com/mailman/listinfo/midpoint
>>>
>>
>> --
>> Wojciech Staszewski
>> Administrator Systemów Sieciowych
>>
>> tel.: 663 680 236
>> adres: ul. Życzkowskiego 16, 31-864 Kraków www.diagnostyka.pl Diagnostyka Sp. z o.o.
>> ul. Prof. M. Życzkowskiego 16, 31-864 Kraków; Numer KRS: 0000381559 (Sąd Rejonowy dla Krakowa-Śródmieścia w Krakowie, XI Wydział Gospodarczy KRS)
>> NIP: 675-12-65-009; REGON: 356366975
>> numer BDO 000002130
>> Kapitał zakładowy: 33 756 500 zł.
>>
>> Pomyśl o środowisku zanim wydrukujesz ten e-mail.
>> _______________________________________________
>> midPoint mailing list
>> midPoint at lists.evolveum.com
>> http://lists.evolveum.com/mailman/listinfo/midpoint
>>
>>
>> _______________________________________________
>> midPoint mailing list
>> midPoint at lists.evolveum.com
>> http://lists.evolveum.com/mailman/listinfo/midpoint
>>
> 

-- 
Wojciech Staszewski
Administrator Systemów Sieciowych

tel.: 663 680 236
adres: ul. Życzkowskiego 16, 31-864 Kraków
www.diagnostyka.pl
Diagnostyka Sp. z o.o.
ul. Prof. M. Życzkowskiego 16, 31-864 Kraków;
Numer KRS: 0000381559 (Sąd Rejonowy dla Krakowa-Śródmieścia w Krakowie, XI Wydział Gospodarczy KRS)
NIP: 675-12-65-009; REGON: 356366975
numer BDO 000002130
Kapitał zakładowy: 33 756 500 zł.

Pomyśl o środowisku zanim wydrukujesz ten e-mail.



More information about the midPoint mailing list