Story #16749

conveniently edit login/pass user list in arvbox to avoid hardcoded logins

Added by Peter Amstutz about 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Start date:
08/27/2020
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
-
Release relationship:
Auto

Subtasks

Task #16761: Review 16749-arvbox-usersResolvedPeter Amstutz

Associated revisions

Revision be28c5f5
Added by Peter Amstutz about 1 year ago

Merge branch '16749-arvbox-users' refs #16749

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <>

Revision db137164 (diff)
Added by Peter Amstutz about 1 year ago

Fix redundant entry in cluster config, arvbox tells you to use adduser

refs #16749

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <>

History

#1 Updated by Peter Amstutz about 1 year ago

  • Subject changed from avoid hardcoded users in arvbox to conveniently edit login/pass user list in arvbox to avoid hardcoded logins

#2 Updated by Peter Amstutz about 1 year ago

  • Assigned To set to Peter Amstutz

#3 Updated by Peter Amstutz about 1 year ago

16749-arvbox-users @ 6d827e6be83d9b3129b4bc7a812d43d2ca874174

  • Remove default users from arvbox
  • Add "arvbox adduser/removeuser/listusers"
  • Update documentation & test login screen error message.

#4 Updated by Lucas Di Pentima about 1 year ago

  • Taking the opportunity that we’re touching arvbox, I think it would be useful to change the wb2’s remote (currently is github) from we’re cloning, so it’s easier to checkout dev branches when needed.
  • On a newly created arvbox instance, when asking for listusers, the following happens (if I add and remove a user, it doesn’t):
    lucas@buster:~/arvados$ ARVBOX_CONTAINER=16749 tools/arvbox/bin/arvbox listusers
    Traceback (most recent call last):
      File "/usr/local/lib/arvbox/edit_users.py", line 36, in <module>
        conf = ruamel.yaml.round_trip_load(f)
      File "/usr/local/lib/python3.5/dist-packages/ruamel/yaml/main.py", line 1014, in round_trip_load
        return load(stream, RoundTripLoader, version, preserve_quotes=preserve_quotes)
      File "/usr/local/lib/python3.5/dist-packages/ruamel/yaml/main.py", line 949, in load
        return loader._constructor.get_single_data()
      File "/usr/local/lib/python3.5/dist-packages/ruamel/yaml/constructor.py", line 113, in get_single_data
        return self.construct_document(node)
    ...
      File "/usr/local/lib/python3.5/dist-packages/ruamel/yaml/constructor.py", line 1563, in construct_yaml_map
        self.construct_mapping(node, data, deep=True)
      File "/usr/local/lib/python3.5/dist-packages/ruamel/yaml/constructor.py", line 1469, in construct_mapping
        if self.check_mapping_key(node, key_node, maptyp, key, value):
      File "/usr/local/lib/python3.5/dist-packages/ruamel/yaml/constructor.py", line 295, in check_mapping_key
        raise DuplicateKeyError(*args)
    ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping
      in "/var/lib/arvados/cluster_config.yml", line 36, column 9
    found duplicate key "InternalURLs" with value "ordereddict([('http://localhost:9003/', ordereddict())])" (original value: "ordereddict([('http://localhost:9003/', ordereddict())])")
      in "/var/lib/arvados/cluster_config.yml", line 39, column 9
    
    To suppress this check see:
        http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys
    
    Duplicate keys will become an error in future releases, and are errors
    by default when using the new API.
    
  • On the SSO removal branch, the admin account has been hardcoded at file tools/arvbox/lib/arvbox/docker/cluster-config.sh line 139. We may need to go back to the previous way of doing things (setting the first logged in user as an admin) or making a permanent user on arvbox.
  • Other than that, it LGTM

#5 Updated by Peter Amstutz about 1 year ago

Lucas Di Pentima wrote:

  • Taking the opportunity that we’re touching arvbox, I think it would be useful to change the wb2’s remote (currently is github) from we’re cloning, so it’s easier to checkout dev branches when needed.

Done.

  • On a newly created arvbox instance, when asking for listusers, the following happens (if I add and remove a user, it doesn’t):
    [...]

Hah, there's a typo in cluster-config.sh, there was a key listed twice. Fixed.

  • On the SSO removal branch, the admin account has been hardcoded at file tools/arvbox/lib/arvbox/docker/cluster-config.sh line 139. We may need to go back to the previous way of doing things (setting the first logged in user as an admin) or making a permanent user on arvbox.

Thanks for the reminder. I really want to avoid having hardcoded default user accounts so I put AutoAdminFirstUser back.

16749-arvbox-users @ 43da0e7ce859cb8ed3385417a2fc97a36cc688e6

#6 Updated by Lucas Di Pentima about 1 year ago

This LGTM, thanks!!

#7 Updated by Peter Amstutz about 1 year ago

  • Status changed from New to Resolved

#8 Updated by Peter Amstutz about 1 year ago

  • Release set to 25

Also available in: Atom PDF