Add a view to show the currently running version

Bug #545111 reported by Anthony Lenton
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical SSO provider
Fix Released
Wishlist
Łukasz Czyżykowski
Django Formassembly integration
New
Undecided
Unassigned
Software Center Agent
Fix Released
Undecided
Anthony Lenton

Bug Description

Currently we need to check the available features or bugs to determine which version is running on staging or production.

There should be a view that reports the current running version of our code. Maybe even versions of other libraries too.

SSO Testcase ISD_201

Tags: sp-2

Related branches

visibility: public → private
Changed in canonical-identity-provider:
milestone: none → 2.6.0
Changed in canonical-identity-provider:
importance: Undecided → Wishlist
Revision history for this message
Stuart Metcalfe (stuartmetcalfe) wrote :

It's generally not a good idea to advertise which versions of libraries you're running in case there are known security vulnerabilities which expose you to attack. If we provide an info page, access should be limited in some way. Some ways we might do this are:

 * restrict to admin users
 * restrict to members of teams
 * place the info page url behind a vpn

visibility: private → public
Changed in canonical-identity-provider:
status: New → Confirmed
Changed in canonical-identity-provider:
milestone: 2.6.0 → 2.7.0
tags: added: 2sp
tags: added: sp-2
removed: 2sp
Revision history for this message
Łukasz Czyżykowski (lukasz-czyzykowski) wrote :

To access the view you have to be logged in and be a member of the team configured in SSO_VERSIONS_TEAMS list.

Currently showing versions of: SSO, Django, lazr.restful, Python, python-openid

SSO version is automatically updated during build of source package.

Changed in canonical-identity-provider:
assignee: nobody → Łukasz Czyżykowski (lukasz-czyzykowski)
status: Confirmed → Fix Committed
Revision history for this message
Stuart Metcalfe (stuartmetcalfe) wrote :

This should be a standard feature on all of our projects. Is it possible to make this a separate dependency which can be part of any standard deployment? It should be configurable per site.

Revision history for this message
Łukasz Czyżykowski (lukasz-czyzykowski) wrote :

Do you mean to pull it out into separate Django application?

Revision history for this message
Łukasz Czyżykowski (lukasz-czyzykowski) wrote :

Besides configuration value name this is very easy to do.

Revision history for this message
Stuart Metcalfe (stuartmetcalfe) wrote :

If it can be a separate application, packaged and part of our standard web deps then that sounds ideal. Is that a good solution for this?

Revision history for this message
Łukasz Czyżykowski (lukasz-czyzykowski) wrote :

Only thing preventing this from being 5 minute job is depending on SSO teams functionality which will have to be abstracted (or retrofitted) into using django_openid_auth.

Changed in canonical-payment-service:
importance: Undecided → Wishlist
milestone: none → beta2
Revision history for this message
Łukasz Czyżykowski (lukasz-czyzykowski) wrote :

QA Notes:
To test that you need to set up the list of teams which can access that page in configuration file

[sso]
sso_versions_teams = canonical, canonical-isd-hackers

After that you need to add your user to one of the teams on the list. Currently there's no easy way of doing that, so this have to be done either by losas (on staging) or by devs on ec2.

This will enable given user to access '/+versions' url

Revision history for this message
Łukasz Czyżykowski (lukasz-czyzykowski) wrote :

QA Notes (update):

The config bit should be added to local.cfg file and the server have to be restarted to this configuration being taken into account.

The team adding thing is easy on staging/production as teams exists in production db. Only thing required is quick session in python shell:

>>> from identityprovider.models import Person, Account
>>> account = Account.objects.get_by_email("<email address hidden>")
>>> team = Person.objects.get(name="canonical-isd-hackers")
>>> team.team_paerticipations.create(person=account.person)
>>> account.person.in_team("canonical-isd-hackers")
True

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

+versions has stopped working on recent builds, including what's going out to staging right now.

Revision history for this message
David Owen (dsowen) wrote : Re: [Bug 545111] Re: Add a view to show the currently running version

On Tue, 2010-07-27 at 20:01 +0000, David Owen wrote:
> +versions has stopped working on recent builds, including what's going
> out to staging right now.
>

Fix was to remove quotes from block names in {% block ... %} tags.
Anthony applied this fix in .dev8, which is going to staging.

Revision history for this message
Dave Morley (davmor2) wrote :

This is working on Staging SSO now. Anthony got the config mod uploaded.

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

This is now modified so that it is enabled for canonical-losa and canonical-isd-hackers. It is also enabled by default so the page should just be available.

Dave Morley (davmor2)
description: updated
Revision history for this message
Dave Morley (davmor2) wrote :

/+versions shows up and correctly displays the right versions.

Passes on Production

Changed in canonical-isd-qa:
status: Fix Committed → Fix Released
Danny Tamez (zematynnad)
Changed in canonical-isd-qa:
milestone: none → canonical-identity-provider+2.7.0
Changed in canonical-identity-provider:
status: Fix Committed → Fix Released
Julien Funk (jaboing)
Changed in canonical-isd-qa:
importance: Undecided → Wishlist
milestone: canonical-identity-provider+2.7.0 → canonical-payment-service+beta2
Changed in canonical-payment-service:
milestone: beta2 → 1.0.0
Michael Foord (mfoord)
Changed in canonical-payment-service:
assignee: nobody → Michael Foord (mfoord)
status: New → In Progress
Revision history for this message
Michael Foord (mfoord) wrote :

The code that does this is trivially simple, but which versions are relevant (and which teams should be able to view it I guess?) will vary from project to project. I'm not sure it makes sense to factor this out into a separate django app. (But could well be wrong...)

Changed in software-center-agent:
status: New → Confirmed
milestone: none → 10.10
Changed in software-center-agent:
status: Confirmed → In Progress
assignee: nobody → Anthony Lenton (elachuni)
Michael Foord (mfoord)
Changed in canonical-payment-service:
status: In Progress → Fix Committed
Changed in software-center-agent:
status: In Progress → Fix Committed
Julien Funk (jaboing)
Changed in canonical-isd-qa:
milestone: canonical-payment-service+beta2 → canonical-payment-service+1.0.0
Dave Morley (davmor2)
Changed in canonical-isd-qa:
status: Fix Released → Confirmed
Dave Morley (davmor2)
Changed in canonical-isd-qa:
status: Confirmed → Fix Committed
Dave Morley (davmor2)
Changed in canonical-isd-qa:
status: Fix Committed → Fix Released
Revision history for this message
Dave Morley (davmor2) wrote :

This is now working on production for:
SCA
Pay
SSO

Changed in canonical-payment-service:
status: Fix Committed → Fix Released
Changed in software-center-agent:
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.