Add API token management UI to web

Bug #589345 reported by Stuart Metcalfe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical SSO provider
Fix Released
High
Łukasz Czyżykowski

Bug Description

Users should be able to see what API tokens are associated with their account, ideally with the name of the application which created it and what permissions that token has. Users should also be able to delete/revoke individual API tokens.

This feature should not be available on the Launchpad-branded site.

Testcase created ISD_206

Tags: sp-3

Related branches

Revision history for this message
Julien Funk (jaboing) wrote :

Note to QA: this will need a test case associated with it when it is complete

Changed in canonical-isd-qa:
assignee: nobody → Dave Morley (davmor2)
Changed in canonical-identity-provider:
assignee: nobody → Łukasz Czyżykowski (lukasz-czyzykowski)
status: Confirmed → In Progress
Changed in canonical-identity-provider:
milestone: 2.6.0 → 2.7.0
tags: added: 3sp
tags: added: sp-3
removed: 3sp
Changed in canonical-identity-provider:
status: In Progress → Fix Committed
Revision history for this message
Łukasz Czyżykowski (lukasz-czyzykowski) wrote :

On the edit page:

1. Move "tokens" from the form up to the navigation between
   the user's name and the logout button

2. Don't use the word "tokens," instead use "Applications"

On the "tokens" page:

3. Change the heading from "List of tokens" to "Applications
   you use"

4. Change the paragraph below the heading to match the text below

   You have used the applications shown here to access your account. If
   you have stopped using one of these and would like to prevent it from
   being used to access your account, click it's "Delete" button
   below. You can choose to allow an application to have access again if
   you like by opening that application and instructing it to access your
   account. You'll have to provide your username and password before it
   will be granted access.

5. Change the label on the buttons from "Revoke" to "Delete."

6. Have the buttons conform to the new styles. As secondary buttons
   they should be grey, not orange

7. Remove the "Go back" link from the "Applications" page.

Changed in canonical-identity-provider:
status: Fix Committed → In Progress
Changed in canonical-identity-provider:
status: In Progress → Fix Committed
David Owen (dsowen)
description: updated
Changed in canonical-identity-provider:
status: Fix Committed → Triaged
assignee: Łukasz Czyżykowski (lukasz-czyzykowski) → David Owen (dsowen)
David Owen (dsowen)
Changed in canonical-identity-provider:
status: Triaged → In Progress
Revision history for this message
David Owen (dsowen) wrote :

Preparation:

 1. Save the attached script to your home directory (or someplace else).
 2. From a terminal, run "chmod +x create_app_token.sh"
 3. Run "./create_app_token.sh" You should receive a short usage message.

Example use:

./create_app_token.sh "<email address hidden>" "Secr3t" "ec2-blah.amazonaws.com"

This will create an application token, which will then be listed at http://<host>/+applications if the user is logged in and the Ubuntu theme is enabled.

Testing this feature involves verifying that tokens are listed, and that token may be removed.

Revision history for this message
David Owen (dsowen) wrote :

Here is an example session:

>> BEGIN EXAMPLE
dsowen@lithium:~$ ./create_app_token.sh "<email address hidden>" "MyP4ssw0rd" "ec2-184-73-98-244.compute-1.amazonaws.com"
--2010-07-19 13:00:03-- http://ec2-184-73-98-244.compute-1.amazonaws.com/api/1.0/authentications?ws.op=authenticate&token_name=test
Resolving ec2-184-73-98-244.compute-1.amazonaws.com... 184.73.98.244
Connecting to ec2-184-73-98-244.compute-1.amazonaws.com|184.73.98.244|:80... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Connecting to ec2-184-73-98-244.compute-1.amazonaws.com|184.73.98.244|:80... connected.
HTTP request sent, awaiting response... 200 Ok
Length: 229 [application/json]
Saving to: `/dev/null'

100%[======================================>] 229 --.-K/s in 0s

2010-07-19 13:00:04 (10.6 MB/s) - `/dev/null' saved [229/229]
>> END EXAMPLE

At this point, the script has succeeded in creating a token. Going to "http://ec2-184-73-98-244.compute-1.amazonaws.com/+applications" displays the token that was created.

David Owen (dsowen)
Changed in canonical-identity-provider:
status: In Progress → Fix Committed
assignee: David Owen (dsowen) → Łukasz Czyżykowski (lukasz)
Revision history for this message
Dave Morley (davmor2) wrote :

Dave I know what I was got wrong. I copy pasted the http:// part of the url too.

Passes on ec2

Dave Morley (davmor2)
Changed in canonical-isd-qa:
status: New → Confirmed
Dave Morley (davmor2)
description: updated
Revision history for this message
David Owen (dsowen) wrote :

Updated script to work with HTTPS servers in staging with bad certs.

Revision history for this message
David Owen (dsowen) wrote :

This version additionally creates 3 tokens, named "Testing" "QA Superpowers" and "My Bug Finder".

Revision history for this message
Julien Funk (jaboing) wrote :

Tested on Staging, added a new bug: https://bugs.launchpad.net/canonical-identity-provider/+bug/610212

This works well enough otherwise to be released for now.

Dave Morley (davmor2)
Changed in canonical-isd-qa:
status: Confirmed → Fix Committed
Revision history for this message
Dave Morley (davmor2) wrote :

Passes on Production

Changed in canonical-isd-qa:
status: Fix Committed → Fix Released
Julien Funk (jaboing)
Changed in canonical-isd-qa:
milestone: none → canonical-identity-provider+2.7.0
Danny Tamez (zematynnad)
Changed in canonical-isd-qa:
milestone: canonical-identity-provider+2.7.0 → 2.7.0
Danny Tamez (zematynnad)
Changed in canonical-isd-qa:
milestone: 2.7.0 → canonical-identity-provider+2.7.0
Changed in canonical-identity-provider:
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.