Addition of signon-apparmor-extension causes token lookup problems
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| Canonical System Image |
High
|
David Barth | |||
| Online Accounts setup for Ubuntu Touch |
High
|
Alberto Mardegan | |||
| The Savilerow project |
Undecided
|
Unassigned | |||
| go-onlineaccounts |
High
|
James Henstridge | |||
| signon-apparmor-extension |
High
|
Alberto Mardegan | |||
| signon-apparmor-extension (Ubuntu RTM) |
High
|
Unassigned | |||
| ubuntu-system-settings-online-accounts (Ubuntu) |
Undecided
|
Alberto Mardegan | |||
| ubuntu-system-settings-online-accounts (Ubuntu RTM) |
Undecided
|
Alberto Mardegan | |||
| ubuntuone-credentials (Ubuntu) |
High
|
dobey | |||
| ubuntuone-credentials (Ubuntu RTM) |
High
|
dobey | |||
Bug Description
As of image ~264 of ubuntu-touch, the signon-
2014-10-01 19:15:51,550 - DEBUG - ../../.
Related branches
- David Barth (community): Approve on 2014-10-02
- PS Jenkins bot: Needs Fixing (continuous-integration) on 2014-10-02
-
Diff: 50 lines (+21/-1)2 files modifiedsrc/access-control-manager.cpp (+4/-1)
tests/tst_extension.cpp (+17/-0)
- Alexandre Abreu (community): Approve on 2014-11-11
-
Diff: 120 lines (+52/-5)2 files modifiedplugins/OnlineAccountsPlugin/application-manager.cpp (+11/-1)
tests/plugin/tst_application_manager.cpp (+41/-4)
- David Barth (community): Approve on 2014-11-28
-
Diff: 1412 lines (+753/-50)27 files modifieddebian/changelog (+11/-0)
debian/control (+1/-0)
online-accounts-service/mir-helper-stub.cpp (+2/-2)
online-accounts-service/mir-helper.cpp (+23/-12)
online-accounts-service/mir-helper.h (+4/-1)
online-accounts-service/request.cpp (+15/-1)
online-accounts-service/request.h (+3/-0)
online-accounts-service/ui-proxy.cpp (+24/-12)
online-accounts-ui/dialog-request.cpp (+286/-0)
online-accounts-ui/dialog-request.h (+54/-0)
online-accounts-ui/ipc.h (+1/-0)
online-accounts-ui/online-accounts-ui.pro (+3/-0)
online-accounts-ui/provider-request.cpp (+7/-11)
online-accounts-ui/qml/ProviderRequest.qml (+14/-0)
online-accounts-ui/qml/SignOnUiDialog.qml (+115/-0)
online-accounts-ui/request.cpp (+15/-1)
online-accounts-ui/request.h (+2/-0)
online-accounts-ui/signonui-request.cpp (+32/-2)
online-accounts-ui/ui-server.cpp (+1/-0)
online-accounts-ui/ui.qrc (+1/-0)
plugins/OnlineAccountsPlugin/application-manager.cpp (+11/-1)
plugins/module/ServiceItem.qml (+1/-2)
tests/online-accounts-service/mock/request-mock.cpp (+13/-0)
tests/online-accounts-service/mock/request-mock.h (+1/-0)
tests/online-accounts-service/tst_ui_proxy.cpp (+71/-1)
tests/online-accounts-ui/tst_signonui_request.pro (+1/-0)
tests/plugin/tst_application_manager.cpp (+41/-4)
- PS Jenkins bot: Approve (continuous-integration) on 2015-01-14
- Alejandro J. Cura (community): Approve on 2015-01-14
-
Diff: 10 lines (+1/-0)1 file modifiedlibubuntuoneauth/keyring.cpp (+1/-0)
- PS Jenkins bot: Approve (continuous-integration) on 2015-03-09
- dobey (community): Disapprove on 2015-03-09
-
Diff: 75 lines (+34/-1)4 files modifiedacl-updater/acl-updater (+29/-0)
debian/control (+3/-0)
debian/libubuntuoneauth-2.0-0.migrations (+1/-0)
debian/rules (+1/-1)
- dobey (community): Disapprove on 2015-01-15
- PS Jenkins bot: Approve (continuous-integration) on 2015-01-15
-
Diff: 219 lines (+165/-1)7 files modifiedCMakeLists.txt (+1/-0)
acl-updater/CMakeLists.txt (+19/-0)
acl-updater/acl-updater.cpp (+94/-0)
acl-updater/acl-updater.h (+48/-0)
debian/control (+1/-0)
debian/libubuntuoneauth-2.0-0.migrations (+1/-0)
debian/rules (+1/-1)
- Alejandro J. Cura (community): Approve on 2015-01-22
- PS Jenkins bot: Approve (continuous-integration) on 2015-01-22
-
Diff: 10 lines (+1/-0)1 file modifiedlibubuntuoneauth/keyring.cpp (+1/-0)
- dobey (community): Approve on 2015-04-01
- PS Jenkins bot: Approve (continuous-integration) on 2015-04-01
- Alexandre Abreu (community): Approve on 2015-03-12
-
Diff: 75 lines (+34/-1)4 files modifiedacl-updater/acl-updater (+29/-0)
debian/control (+3/-0)
debian/libubuntuoneauth-2.0-0.migrations (+1/-0)
debian/rules (+1/-1)
| Changed in ubuntuone-credentials (Ubuntu RTM): | |
| status: | New → Triaged |
| importance: | Undecided → Critical |
| Chris Wayne (cwayne18) wrote : | #1 |
| Alberto Mardegan (mardy) wrote : | #2 |
The problem here is with the U1 account plugin, which doesn't add "unconfined" to the initial list of ACL.
After a quick look at the source code, I believe that the code which needs to be changed is here:
http://
The change is about adding
info.
before storing the "info" object.
| Chris Wayne (cwayne18) wrote : | #3 |
@mardy
I'm also seeing this in other account plugins (namely fitbit and flickr). Is there any way to add unconfined to the ACL there?
| Alberto Mardegan (mardy) wrote : | #4 |
@cwayne18: all plugins based on our OAuth code already add "unconfined" to the ACL. So the problem is probably different, in that case.
As @jdstrand suggested in the ML, your scopes are not running under the "unconfined" profile (even though they are practically unconfined), so we need to figure out why they are not in the ACL, and how to add them.
As suggested by Rodney, I'll also hack "unconfined" into the signon-apparmor plugin to let processes carrying that profile to access any account. But please remember that this is a temporary hack which I'd eventually like to remove, so please update the U1 plugin anyway.
| Changed in signon-apparmor-extension: | |
| assignee: | nobody → Alberto Mardegan (mardy) |
| importance: | Undecided → High |
| status: | New → In Progress |
| dobey (dobey) wrote : | #5 |
Yes, the plug-in will be fixed (that's why I filed the bug here), but according to what Chris is stating, I'm not sure that will be enough to resolve the issue even for people who create new accounts; given the problem is happening with OAuth-based plug-ins that have "unconfined" in the ACL already.
| Launchpad Janitor (janitor) wrote : | #6 |
This bug was fixed in the package signon-
---------------
signon-
[ CI bot ]
* Resync trunk
[ Alberto Mardegan ]
* Let the unconfined profile access any resource (LP: #1376445)
-- Ubuntu daily release <email address hidden> Thu, 02 Oct 2014 15:48:27 +0000
| Changed in signon-apparmor-extension (Ubuntu RTM): | |
| status: | New → Fix Released |
| Changed in signon-apparmor-extension: | |
| status: | In Progress → Fix Released |
| Changed in ubuntuone-credentials (Ubuntu): | |
| status: | Triaged → Invalid |
| Changed in ubuntuone-credentials (Ubuntu RTM): | |
| status: | Triaged → Invalid |
| Changed in savilerow: | |
| status: | New → Invalid |
| dobey (dobey) wrote : | #7 |
Pat, why did you mark this as Invalid in ubuntuone-
| Alberto Mardegan (mardy) wrote : | #8 |
That was probably my mistake, I misunderstood the scope of the bug and told Pat it could be closed. I'm reopening it for ubuntuone-
| Changed in ubuntuone-credentials (Ubuntu): | |
| status: | Invalid → Confirmed |
| Changed in ubuntuone-credentials (Ubuntu RTM): | |
| status: | Invalid → Confirmed |
| Alberto Mardegan (mardy) wrote : | #9 |
Well, I actually cannot lower the priority.
| Changed in ubuntuone-credentials (Ubuntu): | |
| importance: | Critical → High |
| Changed in ubuntuone-credentials (Ubuntu RTM): | |
| importance: | Critical → High |
| tags: |
added: touch-2014-10-30 removed: touch-2014-10-09 |
| Changed in signon-apparmor-extension (Ubuntu RTM): | |
| status: | Fix Released → Triaged |
| importance: | Undecided → High |
| Changed in go-onlineaccounts: | |
| status: | New → Triaged |
| importance: | Undecided → High |
| assignee: | nobody → James Henstridge (jamesh) |
| tags: |
added: touch-2014-11-27 removed: touch-2014-10-30 |
| tags: | added: ota-1 |
| Changed in ubuntu-system-settings-online-accounts (Ubuntu): | |
| status: | New → In Progress |
| assignee: | nobody → Alberto Mardegan (mardy) |
| Changed in ubuntu-system-settings-online-accounts: | |
| assignee: | nobody → Alberto Mardegan (mardy) |
| status: | New → In Progress |
| importance: | Undecided → High |
| James Henstridge (jamesh) wrote : | #10 |
Since the go-onlineaccounts bug task was added, I guess we are also tracking the problems with scopes here too.
In my investigations last week, I came to the conclusion that the problems were not limited to the Go scopes, but instead affected all scopes running under confinement.
After digging in a bit, it isn't clear how it can be fixed without changes to the online accounts API. The way the online accounts integration for scopes works is:
1. the scope starts a signin session for the account service with the "no interaction" flag set. If no token can be retrieved (either because no account is available, or because the token isn't available), it will push a result with a special login button.
2. When the special result is clicked by the user, the dash will initiate the account creation process with the OnlineAccountsC
3. If the account is successfully created, the dash refreshes the scope's results. The scope starts another signin session and finds the new token and displays personalised results.
From my understanding, this breaks down because it is the dash's AppArmor label (which I guess would be unconfined) that gets added to the ACL for the account service. What would be needed here would be some kind of API the dash could use to ask for a second AppArmor label to be added to the ACL.
| Changed in go-onlineaccounts: | |
| status: | Triaged → Incomplete |
| Jamie Strandboge (jdstrand) wrote : | #11 |
FYI, the fix for bug 1392380 should accompany when signon-
| information type: | Public → Public Security |
| Jamie Strandboge (jdstrand) wrote : | #12 |
Since this bug is blocking the landing of signon-
| Changed in ubuntu-system-settings-online-accounts (Ubuntu RTM): | |
| assignee: | nobody → Alberto Mardegan (mardy) |
| Pat McGowan (pat-mcgowan) wrote : | #13 |
Confirming as this security issue was agreed to be fixed in first update
| Changed in canonical-devices-system-image: | |
| importance: | Undecided → High |
| milestone: | none → ww51-2014 |
| status: | New → Confirmed |
| Alberto Mardegan (mardy) wrote : | #14 |
We really need the U1 plugin to add "unconfined" to the ACL of all newly created accounts.
We recently landed some changes in signond which mitigate this problem, but they only solve the issue for accounts which are created after this fix landed.
I guess I could add a session migration script to signond, to add "unconfined" to the ACL of the old U1 accounts, or maybe a hack to signond to treat "unconfined" specially and let it access any resource.
| Changed in ubuntu-system-settings-online-accounts: | |
| status: | In Progress → Fix Released |
| Changed in canonical-devices-system-image: | |
| milestone: | ww51-2014 → ww03-2015 |
| dobey (dobey) wrote : | #15 |
I think we need to push this back, as there seems to be a bigger problem here in vivid, than we thought. Even on a newly flashed vivid image, with a newly created u1 account, I am seeing the permissions denied error message with the signon-
| Changed in canonical-devices-system-image: | |
| milestone: | ww03-2015 → ww05-2015 |
| Changed in ubuntuone-credentials (Ubuntu): | |
| assignee: | nobody → Rodney Dawes (dobey) |
| status: | Confirmed → In Progress |
| Changed in ubuntuone-credentials (Ubuntu RTM): | |
| assignee: | nobody → Rodney Dawes (dobey) |
| Launchpad Janitor (janitor) wrote : | #16 |
This bug was fixed in the package ubuntuone-
---------------
ubuntuone-
[ Rodney Dawes ]
* Set the default ACL as ["unconfined"] for the account. (LP:
#1376445)
* Handle keyringError from the keyring, by deleting token. (LP:
#1282392)
-- Ubuntu daily release <email address hidden> Tue, 20 Jan 2015 18:09:09 +0000
| Changed in ubuntuone-credentials (Ubuntu): | |
| status: | In Progress → Fix Released |
| Changed in pay-ui: | |
| importance: | Undecided → Critical |
| status: | New → Triaged |
| Changed in canonical-devices-system-image: | |
| milestone: | ww05-2015 → ww07-2015 |
| status: | Confirmed → In Progress |
| Launchpad Janitor (janitor) wrote : | #17 |
This bug was fixed in the package ubuntuone-
---------------
ubuntuone-
[ Ubuntu daily release ]
* New rebuild forced
[ Rodney Dawes ]
* Handle keyringError from the keyring, by deleting token. (LP:
#1282392)
* Set the default ACL as ["unconfined"] for the account. (LP:
#1376445)
ubuntuone-
[ CI bot ]
* Resync trunk
[ Rodney Dawes ]
* Add new ctor for Token to accept created/updated date strings. Use
the new ctor when creating the token from the REST response. Turn
the date string returned from the server into an ISO string for
parsing. Add more tests. (LP: #1366998)
[ Sebastien Bacher ]
* Set wrapmode to avoid having a label cut (LP: #1366294)
-- Ubuntu daily release <email address hidden> Thu, 22 Jan 2015 16:16:46 +0000
| Changed in ubuntuone-credentials (Ubuntu RTM): | |
| status: | Confirmed → Fix Released |
| Changed in ubuntu-system-settings-online-accounts (Ubuntu): | |
| status: | In Progress → Fix Released |
| Changed in canonical-devices-system-image: | |
| assignee: | nobody → David Barth (dbarth) |
| milestone: | ww07-2015 → ww09-2015 |
| Changed in canonical-devices-system-image: | |
| status: | In Progress → Fix Released |
| Changed in pay-ui: | |
| importance: | Critical → Undecided |
| status: | Triaged → Invalid |


This is affecting some of our custom scopes that use online accounts as well.