After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 687962 - Forgets Kerberos account
Forgets Kerberos account
Status: RESOLVED FIXED
Product: gnome-online-accounts
Classification: Core
Component: Kerberos
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Online Accounts maintainer(s)
GNOME Online Accounts maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-11-09 08:18 UTC by Matěj Cepl
Modified: 2012-11-13 16:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
kerberos: make newly added accounts permanent after successful login (6.85 KB, patch)
2012-11-12 23:09 UTC, Ray Strode [halfline]
committed Details | Review
Rename goa_util_set_keyfile_boolean as goa_utils_keyfile_set_boolean (5.41 KB, patch)
2012-11-13 14:40 UTC, Debarshi Ray
committed Details | Review
kerberos: Use goa_utils_keyfile_set_boolean to set IsTemporary (1.26 KB, patch)
2012-11-13 14:40 UTC, Debarshi Ray
committed Details | Review

Description Matěj Cepl 2012-11-09 08:18:51 UTC
GOA tends to forget that I have had Kerberos account created; when I create a new one, the password prompt even suggests a possibility of remembering the password, but it never materialized (I have never seen it reinit ticket automatically). Moreover, from time to time (mostly after some traumatic situation like a crash of gnome session or need to restart gdm.service by force) it completely forgets that the Kerberos account ever existed and I have to create a new one.

I would hope, GOA would be able to least remember my Kerberos accounts (if not also remember the password for it, which would be even better).
Comment 1 Matěj Cepl 2012-11-09 08:22:46 UTC
See https://bugzilla.redhat.com/show_bug.cgi?id=874974 for more.
Comment 2 Ray Strode [halfline] 2012-11-09 17:21:35 UTC
can you attach your ~/.config/goa-1.0/accounts.conf after adding the account?
Comment 3 Matěj Cepl 2012-11-09 19:49:27 UTC
See https://bugzilla.redhat.com/attachment.cgi?id=641800
Comment 4 Debarshi Ray 2012-11-12 13:03:41 UTC
GOA ignores your earlier account once your session is restarted because it treats Kerberos accounts as temporary accounts tied to the session in which it was created.
Comment 5 Ray Strode [halfline] 2012-11-12 16:21:33 UTC
(only if you kinit, not if you use the control-center)
Comment 6 Ray Strode [halfline] 2012-11-12 17:21:39 UTC
Hey Matej,

that file only shows remanant bits from manual "kinit"s .  They're harmless, and fixed by bug 688041.

I don't see anything in the file showing accounts added with the control-center panel.

Can you show the file after adding one using the panel?
Comment 7 Matěj Cepl 2012-11-12 22:12:45 UTC
(In reply to comment #6)
> I don't see anything in the file showing accounts added with the control-center
> panel.

That's not correct ... when this file was generated I have used both kinit and control-center. So either control-center doesn't leave any trace or there is something else wrong with it.

When I have removed (with [-] button) and added (Add online account button) Kerberos account, the only difference in the file is this:

wycliff:gedit (review) $ diff -u ~/accounts.conf ~/.config/goa-1.0/accounts.conf
--- /home/matej/accounts.conf	2012-11-12 23:10:26.767071396 +0100
+++ /home/matej/.config/goa-1.0/accounts.conf	2012-11-12 23:10:58.455052964 +0100
@@ -269,7 +269,7 @@
 IsTemporary=true
 TicketingEnabled=true
 
-[Account account_1352707316]
+[Account account_1352758258]
 Provider=kerberos
 Identity=mcepl@REDHAT.COM
 PresentationIdentity=mcepl@REDHAT.COM
Comment 8 Ray Strode [halfline] 2012-11-12 23:09:47 UTC
Created attachment 228840 [details] [review]
kerberos: make newly added accounts permanent after successful login

Explicitly added accounts start out temporary until they're
successfully logged in.

Once they are logged in, though, they need to be toggled to permanent.
The code fails to do this.

This commit toggles the permanance of an account once it's succesfully
logged in.
Comment 9 Debarshi Ray 2012-11-13 14:40:23 UTC
Created attachment 228899 [details] [review]
Rename goa_util_set_keyfile_boolean as goa_utils_keyfile_set_boolean
Comment 10 Debarshi Ray 2012-11-13 14:40:54 UTC
Created attachment 228900 [details] [review]
kerberos: Use goa_utils_keyfile_set_boolean to set IsTemporary
Comment 11 Debarshi Ray 2012-11-13 14:42:36 UTC
Comment on attachment 228840 [details] [review]
kerberos: make newly added accounts permanent after successful login

Looks fine to me. However, for this to actually work, we need the other two patches.

We can not set IsTemporary using the same function that deals with keys like MailEnabled, ChatEnabled, etc.. This is because they are the negations of their corresponding D-Bus properties, while IsTemporary is not.
Comment 12 Debarshi Ray 2012-11-13 15:03:36 UTC
Now it remembers the account, but not the tokens across sessions. Is this the behaviour that we want? Ray?
Comment 13 Debarshi Ray 2012-11-13 15:30:48 UTC
Works like a charm now. If you save your Kerberos password in the keyring and have the patch from bug 688018 , then it automatically gets you ticket on restarting the session.
Comment 14 Ray Strode [halfline] 2012-11-13 16:01:03 UTC
Review of attachment 228900 [details] [review]:

confusing, but looks right.
Comment 15 Debarshi Ray 2012-11-13 16:04:32 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.