Authentication failure for users with username >32 char length
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Blake Rouse | ||
2.6 |
Fix Released
|
High
|
Blake Rouse |
Bug Description
Problem statement:
User can't login to MAAS if "username" property value is more than 32 characters (however, UI tells us "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.")
Steps to reproduce:
1) Install fresh MAAS
2) Do a sudo maas init
3) Add a new user with username "thisissomestri
4) Try to login with this user - it should succeed
5) Add a new user with username "thisissomestri
6) Try to login with this user, a login attempt will fail with following error: "The request's session was deleted before the request completed. The user may have logged out in a concurrent request, for example."
An error from regiond.log:
2019-10-07 11:58:27 maasserver: [error] #######
2019-10-07 11:58:27 maasserver: [error] Traceback (most recent call last):
File "/usr/lib/
raise exc from exc.__cause__
File "/usr/lib/
response = django_
File "/usr/lib/
response = self._middlewar
File "/usr/lib/
response = self.get_
File "/usr/lib/
response = self.get_
File "/usr/lib/
response = self.get_
File "/usr/lib/
response = self.process_
File "/usr/lib/
"The request's session was deleted before the "
django.
2019-10-07 11:58:27 regiond: [info] 10.211.55.2 POST /MAAS/accounts/
2019-10-07 11:58:44 regiond: [info] 127.0.0.1 GET /MAAS/rpc/ HTTP/1.1 --> 200 OK (referrer: -; agent: provisioningser
Packages:
ubuntu@
ii maas 2.6.1-7832-
ii maas-cli 2.6.1-7832-
ii maas-common 2.6.1-7832-
ii maas-dhcp 2.6.1-7832-
ii maas-proxy 2.6.1-7832-
ii maas-rack-
ii maas-region-api 2.6.1-7832-
ii maas-region-
ii python3-django-maas 2.6.1-7832-
ii python3-maas-client 2.6.1-7832-
ii python3-
Related branches
- MAAS Lander: Approve
- Blake Rouse (community): Approve
-
Diff: 48 lines (+30/-1)2 files modifiedsrc/maasserver/migrations/maasserver/0195_event_username_max_length.py (+29/-0)
src/maasserver/models/event.py (+1/-1)
- MAAS Maintainers: Pending requested
-
Diff: 4405 lines (+2082/-675) (has conflicts)46 files modified.eslintrc.js (+3/-0)
Makefile (+29/-0)
buildout.cfg (+393/-0)
debian/changelog (+30/-1)
debian/copyright (+0/-4)
dev/null (+0/-631)
jest.config.js (+6/-0)
package.json (+19/-0)
src/maasserver/forms/pods.py (+14/-0)
src/maasserver/forms/tests/test_pods.py (+18/-0)
src/maasserver/models/signals/scriptresult.py (+17/-0)
src/maasserver/models/signals/tests/test_scriptresult.py (+21/-0)
src/maasserver/monkey.py (+32/-0)
src/maasserver/static/js/angular/controllers/pods_list.js (+5/-0)
src/maasserver/static/js/angular/controllers/settings.js (+114/-0)
src/maasserver/static/js/angular/controllers/tests/test_pods_list.js (+5/-0)
src/maasserver/static/js/angular/controllers/tests/test_settings.js (+264/-0)
src/maasserver/static/js/angular/controllers/tests/test_zones_list.js (+4/-0)
src/maasserver/static/js/angular/directives/machines_table.js (+31/-9)
src/maasserver/static/js/angular/directives/script_status.js (+3/-0)
src/maasserver/static/js/angular/directives/tests/test_machines_table.js (+30/-0)
src/maasserver/static/js/angular/directives/tests/test_script_select.js (+3/-0)
src/maasserver/static/js/angular/entry.js (+1/-7)
src/maasserver/static/js/bundle/maas-min.js (+4/-0)
src/maasserver/static/js/bundle/maas-min.js.map (+5/-1)
src/maasserver/static/js/bundle/vendor-min.js (+4/-0)
src/maasserver/static/js/bundle/vendor-min.js.map (+5/-1)
src/maasserver/static/partials/dashboard.html (+1/-1)
src/maasserver/static/partials/machines-table.html (+24/-2)
src/maasserver/static/partials/networks-list.html (+2/-2)
src/maasserver/static/partials/node-events.html (+1/-1)
src/maasserver/static/partials/nodes-list.html (+70/-1)
src/maasserver/static/partials/pods-list.html (+5/-0)
src/maasserver/static/partials/subnet-details.html (+1/-1)
src/maasserver/static/partials/switches-table.html (+1/-1)
src/maasserver/static/partials/zones-list.html (+6/-0)
src/maasserver/testing/html-loader.js (+0/-0)
src/maasserver/websockets/handlers/tests/test_machine.py (+4/-0)
src/maastesting/parallel.py (+4/-0)
src/maastesting/tests/test_parallel.py (+4/-0)
src/metadataserver/tests/test_api.py (+188/-0)
src/metadataserver/user_data/templates/snippets/maas_run_remote_scripts.py (+8/-0)
src/metadataserver/user_data/templates/snippets/tests/test_maas_run_remote_scripts.py (+20/-0)
src/provisioningserver/utils/version.py (+4/-0)
utilities/release-build (+15/-0)
yarn.lock (+664/-12)
- Adam Collard (community): Approve
- MAAS Lander: Approve
-
Diff: 70 lines (+46/-1)3 files modifiedsrc/maasserver/migrations/maasserver/0195_event_username_max_length.py (+29/-0)
src/maasserver/migrations/maasserver/0201_merge_20191008_1426.py (+16/-0)
src/maasserver/models/event.py (+1/-1)
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → 2.7.0alpha1 |
Changed in maas: | |
status: | Triaged → In Progress |
assignee: | nobody → Blake Rouse (blake-rouse) |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
Subscribing field-high as this is affecting customer deployment.