model-config authorized-keys allows you to set but not retrieve config

Bug #2039615 reported by John A Meinel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
In Progress
Medium
Nicolas Vinuesa

Bug Description

The commands `juju ssh-keys` and add-ssh-key and remove-ssh-key all actually modify an `authorized-keys` attribute of the model config.
However, to hide that fact, when you do `juju model-config` it does not return the authorized-keys content.

In doing so, though, we made the mistake of still allowing you to do:
  juju model-config -m controller authorized-key=abcd

So you can *set* authorized-keys to something that will break your machine, but you cannot read that config.

$ juju model-config -m controller authorized-keys
ERROR "authorized-keys" is not a key of the currently targeted model: "controller"

$ juju model-config -m controller authorized-keys=abcd
WARNING key "authorized-keys" is not defined in the current model configuration: possible misspelling

juju:PRIMARY> x = db.settings.find({"_id": "1048c95a-c1b1-45f9-83e2-3abde69b54df:e"}, {"settings.authorized-keys": 1})
{ "_id" : "1048c95a-c1b1-45f9-83e2-3abde69b54df:e", "settings" : { "authorized-keys" : "abcd" } }

At the very least, if we are going to hide it from model-config, then we should refuse to let you set it.

Tags: ssh-keys
John A Meinel (jameinel)
description: updated
tags: added: ssh-keys
Changed in juju:
milestone: none → 3.1.7
status: Triaged → In Progress
assignee: nobody → Nicolas Vinuesa (nvinuesa)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.