canonical-identity-provider:master

Last commit made on 2024-04-30
Get this branch:
git clone -b master https://git.launchpad.net/canonical-identity-provider
Members of Ubuntu One PQM Team can upload to this branch. Log in for directions.

Branch merges

Branch information

Name:
master
Repository:
lp:canonical-identity-provider

Recent commits

a1663c4... by Shane M. Pelletier

Add QR code generation

Previously, we relied on a third-party API provided by Google to
generate the QR codes used to setup a 2FA application. This API has been
disabled, so we are left with two options: we either switch to another
API provider (and there seems to be no QR code generation API provided
by a well-known source, so we'd have to rely on an unknown party to
provide an API which at best may or may not work and at worst generates
malicious QR codes) or we generate our own QR codes.

Thankfully, there exists a popular and relatively well-maintained Python
library for QR code generation, so it's relatively straightforward to
generate the QR code ourselves and use a data: URL to return the
generated QR code to the browser. This way, we don't even have to store
any temporary files -- the PNG is kept entirely in memory, and only for
the duration of the qrcode_url() function.

Solves https://bugs.launchpad.net/canonical-identity-provider/+bug/2063089
Closes https://warthogs.atlassian.net/browse/SN-2837

Merged from https://code.launchpad.net/~shanepelletier/canonical-identity-provider/+git/canonical-identity-provider/+merge/464923

9a902b9... by Shane M. Pelletier

Use segno instead of qrcode

Since SSO runs on xenial (for now), we're stuck using Python 3.5.
Unfortunately, the latest version of qrcode only supports Python >= 3.7.
Thankfully, there is another option: segno.

The disadvantage of this library is that it is less well-known. However,
it is still actively maintained, and actually allows the code to be even
shorter as it natively supports generating data: URLs from the generated
QR code.

f3fa56b... by Shane M. Pelletier

f-strings are not allowed

f3d9c58... by Shane M. Pelletier

Add qrcode package for generating QR codes

4d45942... by Shane M. Pelletier

Fix spelling

5b7826e... by Shane M. Pelletier

Add QR code generation

Previously, we relied on a third-party API provided by Google to
generate the QR codes used to setup a 2FA application. This API has been
disabled, so we are left with two options: we either switch to another
API provider (and there seems to be no QR code generation API provided
by a well-known source, so we'd have to rely on an unknown party to
provide an API which at best may or may not work and at worst generates
malicious QR codes) or we generate our own QR codes.

Thankfully, there exists a popular and relatively well-maintained Python
library for QR code generation, so it's relatively straightforward to
generate the QR code ourselves and use a data: URL to return the
generated QR code to the browser. This way, we don't even have to store
any temporary files -- the PNG is kept entirely in memory, and only for
the duration of the qrcode_url() function.

Solves https://bugs.launchpad.net/canonical-identity-provider/+bug/2063089
Closes https://warthogs.atlassian.net/browse/SN-2837

262e8df... by Akbar Abdrakhmanov

We have removed all tracking from the login.ubuntu.com and therefore only recording essential cookies which do not need consent.

Merged from https://code.launchpad.net/~akbarkz/canonical-identity-provider/+git/canonical-identity-provider/+merge/460483

4d34101... by Akbar Abdrakhmanov

remove cookie message from Ubuntu One UI

c8b18f0... by David

Minor formatting fix

Merged from https://code.launchpad.net/~lofidevops/canonical-identity-provider/+git/canonical-identity-provider/+merge/460277

c8d6af4... by David

Minor formatting issue in README.

Signed-off-by: David Seaward <email address hidden>