[UI, 2.1.3] MAAS API key name not exposed in the UI.

Bug #1671844 reported by Sandor Zeestraten
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Medium
Kit Randel

Bug Description

Managing multiple MAAS API keys for a user is hard as it's not possible to add comments or annotations to the different keys.

Tags: ui ux
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi Sandor,

MAAS API already have comments. They are only currently exposed in the API but not in the UI. I'm gonna change the bug for such.

Changed in maas:
status: New → Incomplete
summary: - [2.1.3] MAAS API keys should have comments
+ [UI, 2.1.3] MAAS API key name not exposed in the UI.
Changed in maas:
importance: Undecided → Wishlist
status: Incomplete → Triaged
milestone: none → next
Changed in maas:
milestone: next → 2.6.0
tags: added: ui
Changed in maas:
importance: Wishlist → High
importance: High → Medium
assignee: nobody → Anthony Dillon (ya-bo-ng)
tags: added: ux
Revision history for this message
Steve Rydz (steverydz) wrote :

I can't see any evidence of comments relating to SSH keys in the data supplied through the websocket or in the python handler. How can this be exposed to the UI?

Changed in maas:
status: Triaged → Incomplete
Revision history for this message
Lilyana Videnova (lilyanavidenova) wrote :

Proposed design to add comment field: https://zpl.io/aNm0J1N

Changed in maas:
assignee: Anthony Dillon (ya-bo-ng) → Steve Rydz (steverydz)
Revision history for this message
Lee Trager (ltrager) wrote :

The comment is always the last part of public key. The websocket returns a short version of the public key separated by a ; with for the comment. The comment may be cropped see [1]

For example my public SSH key is

/+AMKZ0lK0LiU0j2Y6Vz4u8uGAFKOa6bfs7xL25z9wG7cdg6SLfuxoJVu1x+OklMfapLApuAPflkOM3BW3+L5BMqn7odbFuQv3UwDfNCOxoJgOJCfbzazkBvT8qDWsCfV0hgsC3fLrH2ptlbTmXI5RBgiR7OI2HkiA8Sy2CVeN1WMn+SuP7oadfqCj0Q11ycPnLwa9LhDrNOcXuMNexjGyQRg9HDKwbtkYCW8CI0ByHRZMFjuBGJb7sgePMUdox22HVMCZYX1qR6KroqE/R+HM4Ivz0oOPQPcRLjPvP4iEynN58HwVS7zJPGhfWQ3jN3+phrurNpvOQ2Jl2QNw== <email address hidden>

The websocket returns that as
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACA&hellip; <email address hidden>

I wonder if we should give something more useful such as the full key so users could copy it. Or do what github does and just show the fingerprint.

[1] https://git.launchpad.net/maas/tree/src/maasserver/models/sshkey.py#n47
[2] https://screenshots.firefox.com/YelKdq1UXhxlai9F/github.com

Revision history for this message
Björn Tillenius (bjornt) wrote :

To clarify, this is about the API keys, and they have names, not comments. This is not about the SSH keys.

The UI is using YUI and parts of it is rendered by HTML templates which have access to the name in the Python objects, and part of it uses the MAAS rest API to add the token, which also supports passing in the name.

As far as I can see, there's no websocket API for dealing with tokens, so converting it to use angular would be more work. But extending the existing YUI widget and the template should be possible without any backend work.

Revision history for this message
Andres Rodriguez (andreserl) wrote : Re: [Bug 1671844] Re: [UI, 2.1.3] MAAS API key name not exposed in the UI.

FWIW, this is NOT about the comment in the SSH key field. This is about the
*name* of the API KEY.

On Wed, Apr 17, 2019 at 3:56 AM Lee Trager <email address hidden> wrote:

> The comment is always the last part of public key. The websocket returns
> a short version of the public key separated by a ; with for the comment.
> The comment may be cropped see [1]
>
> For example my public SSH key is
>
>
> /+AMKZ0lK0LiU0j2Y6Vz4u8uGAFKOa6bfs7xL25z9wG7cdg6SLfuxoJVu1x+OklMfapLApuAPflkOM3BW3+L5BMqn7odbFuQv3UwDfNCOxoJgOJCfbzazkBvT8qDWsCfV0hgsC3fLrH2ptlbTmXI5RBgiR7OI2HkiA8Sy2CVeN1WMn+SuP7oadfqCj0Q11ycPnLwa9LhDrNOcXuMNexjGyQRg9HDKwbtkYCW8CI0ByHRZMFjuBGJb7sgePMUdox22HVMCZYX1qR6KroqE/R+HM4Ivz0oOPQPcRLjPvP4iEynN58HwVS7zJPGhfWQ3jN3+phrurNpvOQ2Jl2QNw==
> <email address hidden>
>
> The websocket returns that as
> ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACA&hellip; <email address hidden>
>
> I wonder if we should give something more useful such as the full key so
> users could copy it. Or do what github does and just show the
> fingerprint.
>
> [1]
> https://git.launchpad.net/maas/tree/src/maasserver/models/sshkey.py#n47
> [2] https://screenshots.firefox.com/YelKdq1UXhxlai9F/github.com
>
> --
> You received this bug notification because you are subscribed to MAAS.
> https://bugs.launchpad.net/bugs/1671844
>
> Title:
> [UI, 2.1.3] MAAS API key name not exposed in the UI.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/maas/+bug/1671844/+subscriptions
>
> Launchpad-Notification-Type: bug
> Launchpad-Bug: product=maas; milestone=2.6.0; status=Incomplete;
> importance=Medium; <email address hidden>;
> Launchpad-Bug-Tags: ui ux
> Launchpad-Bug-Information-Type: Public
> Launchpad-Bug-Private: no
> Launchpad-Bug-Security-Vulnerability: no
> Launchpad-Bug-Commenters: andreserl lilyanavidenova ltrager steverydz
> szeestraten
> Launchpad-Bug-Reporter: Sandor Zeestraten (szeestraten)
> Launchpad-Bug-Modifier: Lee Trager (ltrager)
> Launchpad-Message-Rationale: Subscriber (MAAS)
> Launchpad-Message-For: andreserl
>
--
Andres Rodriguez (RoAkSoAx)
Ubuntu Server Developer
MSc. Telecom & Networking
Systems Engineer

Changed in maas:
status: Incomplete → Triaged
Revision history for this message
Lilyana Videnova (lilyanavidenova) wrote :

Sorry - misnamed the wireframes! Here are some updated ones: https://zpl.io/aNm0J1N

Revision history for this message
Steve Rydz (steverydz) wrote :

The wireframes have a button to save the name of an api key. Is this possible? and if so how?

Revision history for this message
Björn Tillenius (bjornt) wrote :

When I looked, it was possible. But it seems that I was looking at on old version of MAAS, that we still using YUI.

We'd need to add a new websocket method, which would be similar to user.delete_authorisation_token, except that it accepts a name as well and would call profile.modify_consumer_name(token_key, name)

Changed in maas:
assignee: Steve Rydz (steverydz) → Kit Randel (blr)
milestone: 2.6.0 → 2.7.0alpha1
Changed in maas:
milestone: 2.7.0b1 → 2.7.0b2
Changed in maas:
milestone: 2.7.0b2 → none
Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
milestone: none → 3.2.0-beta1
Changed in maas:
status: Fix Committed → Fix Released
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.