-
Notifications
You must be signed in to change notification settings - Fork 427
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
Refactor inband registration (and cancelation) #559
Commits on Nov 30, 2015
-
Test that Mongoose handles a bad cancelation request correctly
Send a registration cancelation request, where the `remove' element is NOT the only child of the `query' element, then wait to receive a failure response. See table 1, section 3.2, XEP 0077.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 2baaf8e - Browse repository at this point
Copy the full SHA 2baaf8eView commit details -
Test failure response upon cancelation when no inband registration
Presumably, if inband registration is not enabled, then cancelatio is not possible. Make sure Mongoose sends an error stanza. Note: does not test for a particular error case.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 183f6fa - Browse repository at this point
Copy the full SHA 183f6faView commit details -
Test stanzas more comprehensively
Test that error stanzas for user registration and cancelation contain the correct child elements. Move user creation and deletion into the test case callbacks.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 2d0e6c1 - Browse repository at this point
Copy the full SHA 2d0e6c1View commit details -
Improve test cases for user cancelation
Test that Mongoose responds with the failure stanzas given XEP 0077 upon a bad cancelation request. Changing the configuration in the "not-allowed" test should correspond better with the XEP: ALL users are denied cancelation, rather than just stopping the the module. The tests don't fail in quite the right way, so this is [WIP].
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 7af73f9 - Browse repository at this point
Copy the full SHA 7af73f9View commit details -
Finalise two tests for user cancelation errors
Change and restore the `mod_register' configuration as needed, resolve test initialisation and termination issues, and change to include just two helpful "printf" calls (really `ct:pal/2').
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for d841fd9 - Browse repository at this point
Copy the full SHA d841fd9View commit details -
Test that users remain in Mongoose upon bad cancelation requests
This addition tightly couples these tests with Mongoose.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for a6e442b - Browse repository at this point
Copy the full SHA a6e442bView commit details -
Make tests for bad cancelation requests more comprehensive
Test for the `type' and namespace attributes in the error stanzas for bad cancelation requests.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 349253b - Browse repository at this point
Copy the full SHA 349253bView commit details -
Remove old --less comprehensive-- assertions
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 045ee1b - Browse repository at this point
Copy the full SHA 045ee1bView commit details -
Fix match on LHS when stopping module
Change LHS `ok' to `{atomic, ok}' when changing configuration using dynamic_modules:stop/2.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for e5e6bce - Browse repository at this point
Copy the full SHA e5e6bceView commit details -
Comment to clarify how Mongoose cancels a registration
As this was not immediately clear.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for c44a43b - Browse repository at this point
Copy the full SHA c44a43bView commit details -
Rename test group to be more correct
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for fd993f0 - Browse repository at this point
Copy the full SHA fd993f0View commit details -
Change `case' clauses for `set' and `get' IQs into procedure clauses. One procedure to do it all meant deeply nested clauses.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 2d438b5 - Browse repository at this point
Copy the full SHA 2d438b5View commit details -
Verify the contents of stanzas coming into the IQ handlers
Make sure the `query' element is the only one in the IQ stanza.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 10511c5 - Browse repository at this point
Copy the full SHA 10511c5View commit details -
Joseph Yiasemides committed
Nov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for bcea2e4 - Browse repository at this point
Copy the full SHA bcea2e4View commit details -
Reorder `case' patterns and space clauses out nicely
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 83594b7 - Browse repository at this point
Copy the full SHA 83594b7View commit details -
Begin refactoring cancelation and data submission for XEP 0077
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for d84a6a3 - Browse repository at this point
Copy the full SHA d84a6a3View commit details -
Joseph Yiasemides committed
Nov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 5731997 - Browse repository at this point
Copy the full SHA 5731997View commit details -
Joseph Yiasemides committed
Nov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 76060a6 - Browse repository at this point
Copy the full SHA 76060a6View commit details -
Introduce account cancelation changes
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for d60ae94 - Browse repository at this point
Copy the full SHA d60ae94View commit details -
Move all IQ SET handling out of
process_iq_set' into
handle_set'This commit retains logging for debug purposes.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for b9cc7c7 - Browse repository at this point
Copy the full SHA b9cc7c7View commit details -
Make it easy to tell if settings have been altered by test
This is for debugging.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 39c6492 - Browse repository at this point
Copy the full SHA 39c6492View commit details -
Refactor smaller parts, remove "data form" processing
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 9d1817f - Browse repository at this point
Copy the full SHA 9d1817fView commit details -
Format `case' clauses in line with style rules
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 8576161 - Browse repository at this point
Copy the full SHA 8576161View commit details -
Build error responses with a procedure
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for fce64ad - Browse repository at this point
Copy the full SHA fce64adView commit details -
Configuration menu - View commit details
-
Copy full SHA for 21c8530 - Browse repository at this point
Copy the full SHA 21c8530View commit details -
Test failure upon registration with an empty password field
Add a test case to make sure that registration with an empty password fails as specified in XEP 0077.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 80767d8 - Browse repository at this point
Copy the full SHA 80767d8View commit details -
Generalise restarting `mod_register' with a different option
This procedure is more general in two ways: (1) change any option by name, and (2) insert an option instead of just changing one that's already there (`lists:keystore/4' combines an `append' and a `replace'). Then, the `restore_mod_register_options/1' procedure does cleanup, removing the module's option list from the test suite's configuration list, so that we can change the configuration again and again in a clean way.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 931ccb7 - Browse repository at this point
Copy the full SHA 931ccb7View commit details -
Configure Mongoose with a non-zero password strength for registration
A registration request with an empty password field will trigger the correct error response when the password strength is non-zero.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 21e897d - Browse repository at this point
Copy the full SHA 21e897dView commit details -
Make sure user really doesn't exist
Mongoose may well send the correct error response, but let's make sure it doesn't do the wrong thing, too.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 008755e - Browse repository at this point
Copy the full SHA 008755eView commit details -
Build response stanza without building empty JID
Don't build completely blank JIDs, as they need a "host" part at the very least, just to remove them before sending the response.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 26722be - Browse repository at this point
Copy the full SHA 26722beView commit details -
Register only if access rules allow it
Check that registration (and cancelation) are allowed before proceeding, otherwise send an error response.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for b8ea4fc - Browse repository at this point
Copy the full SHA b8ea4fcView commit details -
Bring arguments and variables into scope for `attpemt_cancelation'
Move necessary agruments out of the "extras".
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 1a2d6d1 - Browse repository at this point
Copy the full SHA 1a2d6d1View commit details -
Improve scoping for `register_or_change_password'
Move necessary agruments out of the "extras".
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 0f6222b - Browse repository at this point
Copy the full SHA 0f6222bView commit details -
Improve scoping for `handle_set'
Move necessary agruments out of the "extras".
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 6569a46 - Browse repository at this point
Copy the full SHA 6569a46View commit details -
Change parameter names to established convention
That is: `Sender'/`Receiver' ---> `From'/`To', and `Stanza' ---> `IQ'.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for fbc654f - Browse repository at this point
Copy the full SHA fbc654fView commit details -
Correct predicate for presence of username and password children
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for d37b31c - Browse repository at this point
Copy the full SHA d37b31cView commit details -
Ensure "remove" elements are not present
Also rename the procedure that helps to switch on the children of the "query" element and use more informative names for the atoms which are returned.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 4d07e64 - Browse repository at this point
Copy the full SHA 4d07e64View commit details -
Handle bad requests in a consistent way
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 49ea9c4 - Browse repository at this point
Copy the full SHA 49ea9c4View commit details -
Joseph Yiasemides committed
Nov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for cc0ddeb - Browse repository at this point
Copy the full SHA cc0ddebView commit details -
Remove debugging aid from inside module
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for c7575f0 - Browse repository at this point
Copy the full SHA c7575f0View commit details -
Test Mongoose resoponds with a `registered' element when appropriate
When someone has authenticated, i.e. they are already registered, Mongoose should respond with a `registered' IQ query element.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 3b0a325 - Browse repository at this point
Copy the full SHA 3b0a325View commit details -
Modify test `null_password' to use one of the templated accounts
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 676edf8 - Browse repository at this point
Copy the full SHA 676edf8View commit details -
Test inband password change for accounts
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for cbfa2ed - Browse repository at this point
Copy the full SHA cbfa2edView commit details -
Match username & server on well-formatted JID when changing password
Matches will succeed when changing password: we were comparing the sender of a stanza to a JID that hadn't been formatted according to XMPP guidelines.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for bd3b2ca - Browse repository at this point
Copy the full SHA bd3b2caView commit details -
Test that passwords can not be made empty inband
NOTE: This test fails until a fix to Mongoose is made.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for b648695 - Browse repository at this point
Copy the full SHA b648695View commit details -
Test for `bad-request' error response on changing to an empty password
Since the password change is an IQ request, even though XEP 0077 does not describe this, we test for an error response.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 3e26461 - Browse repository at this point
Copy the full SHA 3e26461View commit details -
Fix authentication so that it does not set an empty password
The procedure in question had an empty string (i.e. "") as a pattern in its head, but it's meant to be a binary (i.e. <<"">>), so add this clause.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 686f269 - Browse repository at this point
Copy the full SHA 686f269View commit details -
Remove scaffolding for testing registration with null password
The calls made inside `*_per_testcase(null_password, _)' simply shouldn't be necessary to test for an error response when a client tries to register with an null password.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for d9979c1 - Browse repository at this point
Copy the full SHA d9979c1View commit details -
Handle registration attempts with a null password correctly
We were matching only on an empty string when we really need to match on an empty binary.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 42b6713 - Browse repository at this point
Copy the full SHA 42b6713View commit details -
Assert error response type upon quick successive registration requests
Test for a <resource-constraint/> error-response after making inband registration requests in quick succession NOT just that we receive an error-response. The second paragraph of section 3.1.1 of XEP 0077 may suggest using a <not-acceptable/>, see comment in test for more detail.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 9428712 - Browse repository at this point
Copy the full SHA 9428712View commit details -
Test the constraining of resources upon failed inband registration
Mongoose should restrict the number of registrations, regardles of a client's recent success or failure, within a time period.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 42163ed - Browse repository at this point
Copy the full SHA 42163edView commit details -
Move timers from scaffolding into test cases
This makes it more clear that the timers are prerequisites for both tests.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 8edebc0 - Browse repository at this point
Copy the full SHA 8edebc0View commit details -
Assert for the correct kind of failure responses
An "error" stanza will in fact produce a "failed_to_register", not a "bad_response".
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for 8cfafa0 - Browse repository at this point
Copy the full SHA 8cfafa0View commit details -
Refactor how changes to Mongoose's configuration is done
This concerns changes to the `{access, register, global}' variable, used for inband registration.
Joseph Yiasemides committedNov 30, 2015 Configuration menu - View commit details
-
Copy full SHA for eb7b38e - Browse repository at this point
Copy the full SHA eb7b38eView commit details
Commits on Dec 1, 2015
-
Prioritise resource constraint upon registration requests
Assert timeouts have expired before much of the registration process begins: this'll make sure that registration requests are constrained within a given time period, regardless of a client's recent registration success or failure. It discriminates clients using their IP address.
Joseph Yiasemides committedDec 1, 2015 Configuration menu - View commit details
-
Copy full SHA for b015000 - Browse repository at this point
Copy the full SHA b015000View commit details -
Remove redundant clauses for empty password
We use the Erlang binary internally.
Joseph Yiasemides committedDec 1, 2015 Configuration menu - View commit details
-
Copy full SHA for fd6226f - Browse repository at this point
Copy the full SHA fd6226fView commit details -
Use module
jid' in favour of depricated procedures in module
jlib'Joseph Yiasemides committedDec 1, 2015 Configuration menu - View commit details
-
Copy full SHA for d754769 - Browse repository at this point
Copy the full SHA d754769View commit details