=== Test case: rest_SUITE:password_can_be_changed/1 (click for source code)
=== Config value:
[{watchdog,<0.224.2>},
{{ejabberd_cwd,mongooseim@localhost},
"/home/circleci/project/_build/mim1/rel/mongooseim"},
{mam_backend,rdbms},
{mim_data_dir,"/home/circleci/project/big_tests/tests/rest_SUITE_data"},
{preset,"odbc_mssql_mnesia"},
{tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@f0b09cc3aef4.2022-05-25_09.03.38/big_tests.tests.rest_SUITE.logs/run.2022-05-25_09.13.15/rest_suite.password_can_be_changed.64900.html"},
{tc_group_properties,[{name,admin},parallel]},
{tc_group_path,[]},
{data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/rest_SUITE_data/"},
{priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@f0b09cc3aef4.2022-05-25_09.03.38/big_tests.tests.rest_SUITE.logs/run.2022-05-25_09.13.15/log_private/"},
{{saved_modules,mongooseim@localhost,<<"test type">>},
#{mod_adhoc => #{iqdisc => one_queue,report_commands_node => false},
mod_amp => #{},
mod_bosh =>
#{backend => mnesia,inactivity => 30,max_pause => 120,
max_wait => infinity,server_acks => false},
mod_cache_users =>
#{number_of_segments => 5,strategy => fifo,time_to_live => 2},
mod_carboncopy => #{iqdisc => no_queue},
mod_commands => #{},
mod_disco =>
#{extra_domains => [],iqdisc => one_queue,server_info => [],
users_can_see_hidden_services => false},
mod_muc_commands => #{},mod_muc_light_commands => #{},
mod_register =>
#{access => register,
ip_access => [{allow,"127.0.0.0/8"},{deny,"0.0.0.0/0"}],
iqdisc => one_queue,password_strength => 0,
registration_watchers => []},
mod_roster =>
#{backend => rdbms,iqdisc => one_queue,store_current_id => false,
versioning => false},
mod_sic => #{iqdisc => one_queue},
mod_stream_management =>
#{ack => true,ack_freq => 1,backend => mnesia,buffer => true,
buffer_max => 100,resume_timeout => 600,
stale_h =>
#{enabled => false,geriatric => 3600,repeat_after => 1800}},
mod_vcard =>
#{backend => rdbms,
host => {prefix,<<"vjud.">>},
iqdisc => parallel,matches => 30,search => true}}},
{escalus_users,[{alice,[{username,<<"alicE">>},
{server,<<"domain.example.com">>},
{host,<<"localhost">>},
{password,<<"matygrysa">>}]},
{bob,[{username,<<"bOb">>},
{server,<<"domain.example.com">>},
{host,<<"localhost">>},
{password,<<"makrolika">>}]}]}]
=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@f0b09cc3aef4.2022-05-25_09.03.38"
=== Started at 2022-05-25 09:13:15
*** User 2022-05-25 09:13:15.320 ***
bOb@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-05-25 09:13:15.321 ***
bOb@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='b7f15fe9bfeea5da' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-05-25 09:13:15.321 ***
bOb@domain.example.com/res1 in
<stream:features>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
</compression>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>SCRAM-SHA-256</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2022-05-25 09:13:15.321 ***
bOb@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYgBtYWtyb2xpa2E=</auth>
*** User 2022-05-25 09:13:15.322 ***
bOb@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-05-25 09:13:15.322 ***
bOb@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-05-25 09:13:15.323 ***
bOb@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='ba63078d0d525011' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-05-25 09:13:15.323 ***
bOb@domain.example.com/res1 in
<stream:features>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
</compression>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2022-05-25 09:13:15.323 ***
bOb@domain.example.com/res1 out
<iq type='set' id='2ad58fa7efa336ceefc1f331074ffb62'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-05-25 09:13:15.324 ***
bOb@domain.example.com/res1 in
<iq id='2ad58fa7efa336ceefc1f331074ffb62' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bob@domain.example.com/res1</jid>
</bind>
</iq>
*** User 2022-05-25 09:13:15.324 ***
bob@domain.example.com/res1 out
<iq type='set' id='3e1e5c7cc1b62921dcb7b59f5fad83f2'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-05-25 09:13:15.325 ***
bob@domain.example.com/res1 in
<iq type='result' id='3e1e5c7cc1b62921dcb7b59f5fad83f2'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-05-25 09:13:15.325 ***
bob@domain.example.com/res1 out
<presence/>
*** User 2022-05-25 09:13:15.327 ***
bob@domain.example.com/res1 in
<presence from='bob@domain.example.com/res1' to='bob@domain.example.com/res1' xml:lang='en'/>
*** User 2022-05-25 09:13:15.327 ***
bob@domain.example.com/res1 out
</stream:stream>
*** User 2022-05-25 09:13:15.328 ***
bob@domain.example.com/res1 in
</stream:stream>
*** User 2022-05-25 09:13:15.332 ***
REST request:
Code: 204
Req: {<0.412.2>,<<"/api/users/domain.example.com/bob">>,<<"PUT">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"f761f8d02e3b3b88">>}],
<<"{\"newpass\":\"niemakrolika\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 25 May 2022 09:13:15 GMT">>},
{<<"content-type">>,<<"application/json">>}],
<<>>,112,2042}
Params: #{body => <<"{\"newpass\":\"niemakrolika\"}">>,method => <<"PUT">>,
path => <<"/api/users/domain.example.com/bob">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-05-25 09:13:15.332 ***
bOb@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-05-25 09:13:15.333 ***
bOb@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='8bf4804a26005b02' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-05-25 09:13:15.333 ***
bOb@domain.example.com/res1 in
<stream:features>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
</compression>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>SCRAM-SHA-256</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2022-05-25 09:13:15.333 ***
bOb@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYgBuaWVtYWtyb2xpa2E=</auth>
*** User 2022-05-25 09:13:15.334 ***
bOb@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-05-25 09:13:15.334 ***
bOb@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-05-25 09:13:15.335 ***
bOb@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='3d9f1b4f42bfae09' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-05-25 09:13:15.335 ***
bOb@domain.example.com/res1 in
<stream:features>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
</compression>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2022-05-25 09:13:15.335 ***
bOb@domain.example.com/res1 out
<iq type='set' id='00e51f1471a728b997ca071415f5d349'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-05-25 09:13:15.335 ***
bOb@domain.example.com/res1 in
<iq id='00e51f1471a728b997ca071415f5d349' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bob@domain.example.com/res1</jid>
</bind>
</iq>
*** User 2022-05-25 09:13:15.335 ***
bob@domain.example.com/res1 out
<iq type='set' id='108a0a172db23e78af85534fd95dc012'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-05-25 09:13:15.336 ***
bob@domain.example.com/res1 in
<iq type='result' id='108a0a172db23e78af85534fd95dc012'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-05-25 09:13:15.336 ***
bob@domain.example.com/res1 out
<presence/>
*** User 2022-05-25 09:13:15.364 ***
bob@domain.example.com/res1 in
<presence from='bob@domain.example.com/res1' to='bob@domain.example.com/res1' xml:lang='en'/>
*** User 2022-05-25 09:13:15.365 ***
bob@domain.example.com/res1 out
</stream:stream>
*** User 2022-05-25 09:13:15.365 ***
bob@domain.example.com/res1 in
</stream:stream>
*** User 2022-05-25 09:13:15.366 ***
bOb@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-05-25 09:13:15.366 ***
bOb@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='c692eb51ee275544' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-05-25 09:13:15.366 ***
bOb@domain.example.com/res1 in
<stream:features>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
</compression>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>SCRAM-SHA-256</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2022-05-25 09:13:15.367 ***
bOb@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYgBtYWtyb2xpa2E=</auth>
*** User 2022-05-25 09:13:15.367 ***
bOb@domain.example.com/res1 in
<failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<not-authorized/>
</failure>
*** User 2022-05-25 09:13:15.373 ***
REST request:
Code: 204
Req: {<0.469.2>,<<"/api/users/domain.example.com/bob">>,<<"PUT">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"9e74c49213676716">>}],
<<"{\"newpass\":\"makrolika\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 25 May 2022 09:13:15 GMT">>},
{<<"content-type">>,<<"application/json">>}],
<<>>,112,2352}
Params: #{body => <<"{\"newpass\":\"makrolika\"}">>,method => <<"PUT">>,
path => <<"/api/users/domain.example.com/bob">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-05-25 09:13:15.374 ***
bOb@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-05-25 09:13:15.374 ***
bOb@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='2f37d298978d2d70' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-05-25 09:13:15.374 ***
bOb@domain.example.com/res1 in
<stream:features>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
</compression>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>SCRAM-SHA-256</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2022-05-25 09:13:15.374 ***
bOb@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYgBtYWtyb2xpa2E=</auth>
*** User 2022-05-25 09:13:15.375 ***
bOb@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-05-25 09:13:15.375 ***
bOb@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-05-25 09:13:15.376 ***
bOb@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='cbe7a64de56bce01' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-05-25 09:13:15.376 ***
bOb@domain.example.com/res1 in
<stream:features>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
</compression>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2022-05-25 09:13:15.376 ***
bOb@domain.example.com/res1 out
<iq type='set' id='5dd95cf2a445aec04fac5fb0fccbf556'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-05-25 09:13:15.376 ***
bOb@domain.example.com/res1 in
<iq id='5dd95cf2a445aec04fac5fb0fccbf556' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bob@domain.example.com/res1</jid>
</bind>
</iq>
*** User 2022-05-25 09:13:15.376 ***
bob@domain.example.com/res1 out
<iq type='set' id='7b677c394c08351e326b2856085200f4'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-05-25 09:13:15.377 ***
bob@domain.example.com/res1 in
<iq type='result' id='7b677c394c08351e326b2856085200f4'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-05-25 09:13:15.377 ***
bob@domain.example.com/res1 out
<presence/>
*** User 2022-05-25 09:13:15.380 ***
bob@domain.example.com/res1 in
<presence from='bob@domain.example.com/res1' to='bob@domain.example.com/res1' xml:lang='en'/>
*** User 2022-05-25 09:13:15.380 ***
bob@domain.example.com/res1 out
</stream:stream>
*** User 2022-05-25 09:13:15.380 ***
bob@domain.example.com/res1 in
</stream:stream>
*** User 2022-05-25 09:13:15.382 ***
REST request fails:
Code: 400
Req: {<0.487.2>,<<"/api/users/domain.example.com/bob">>,<<"PUT">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"065a2534043f6ea5">>}],
<<"{\"newpass\":\"\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 25 May 2022 09:13:15 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"14">>}],
<<"Empty password">>,147,594}
Params: #{body => <<"{\"newpass\":\"\"}">>,method => <<"PUT">>,
path => <<"/api/users/domain.example.com/bob">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-05-25 09:13:15.384 ***
REST request fails:
Code: 400
Req: {<0.491.2>,<<"/api/users/domain.example.com/b@b">>,<<"PUT">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"3d450659b404a0e7">>}],
<<"{\"newpass\":\"niemakrolika\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 25 May 2022 09:13:15 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"11">>}],
<<"Invalid JID">>,144,570}
Params: #{body => <<"{\"newpass\":\"niemakrolika\"}">>,method => <<"PUT">>,
path => <<"/api/users/domain.example.com/b@b">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
=== Ended at 2022-05-25 09:13:15
=== successfully completed test case
=== === Returned value: ok