juju register fails with usernames that contain uppercase letters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Harry Pidcock |
Bug Description
When user creates a user that contains uppercases (e.g. juju add-user JohnDoe), then the "juju register" step fails. It's not clear if juju shouldn't be accepting that kind of usernames in the first place or if it's juju register the one at fault here.
Steps to reproduce:
juju add-user TEST
juju register <HASH_GIVEN_
Expected result:
the new user is able to login to the controller
Actual result:
juju register MF4TBFRFU1QwIRM
Enter a new password:
Confirm password:
Enter a name for this controller [stsstack-
ERROR Provided registration token may have been expired.
A controller administrator must reset your user to issue a new token.
See "juju help change-
This is how the user looks like the database:
{
"_id" : "test",
"name" : "TEST",
"secretkey" : BinData(
"createdby" : "admin",
"txn-revno" : NumberLong(2),
"txn-queue" : [
]
}
So I believe that this could be due to the mismatch between "name" and "_id". Here it is the transaction that jujud attempted to commit:
2019-06-19 17:06:51 TRACE juju.state.txn database.go:359 ran transaction in 0.028s (retries: 0) []txn.Op{
{
C: "users",
Id: "TEST",
Assert: "d+",
Insert: nil,
Update: bson.D{
{
},
},
{
},
},
},
Remove: false,
},
}
err: transaction aborted
tags: | added: atos sts |
Changed in juju: | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → 2.6.5 |
Changed in juju: | |
assignee: | nobody → Harry Pidcock (hpidcock) |
status: | Triaged → In Progress |
Changed in juju: | |
status: | In Progress → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
https:/ /github. com/juju/ juju/pull/ 10369