Project

General

Profile

Actions

Idea #16749

closed

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

Added by Peter Amstutz over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Start date:
08/27/2020
Due date:
Story points:
-
Release relationship:
Auto

Subtasks 1 (0 open1 closed)

Task #16761: Review 16749-arvbox-usersResolvedPeter Amstutz08/27/2020Actions
Actions #1

Updated by Peter Amstutz over 3 years ago

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

Updated by Peter Amstutz over 3 years ago

  • Assigned To set to Peter Amstutz
Actions #3

Updated by Peter Amstutz over 3 years ago

16749-arvbox-users @ 6d827e6be83d9b3129b4bc7a812d43d2ca874174

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

Updated by Lucas Di Pentima over 3 years 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
Actions #5

Updated by Peter Amstutz over 3 years 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

Actions #6

Updated by Lucas Di Pentima over 3 years ago

This LGTM, thanks!!

Actions #7

Updated by Peter Amstutz over 3 years ago

  • Status changed from New to Resolved
Actions #8

Updated by Peter Amstutz over 3 years ago

  • Release set to 25
Actions

Also available in: Atom PDF