libera/#maemo-leste/ Sunday, 2022-06-12

freemangordonWizzup: I know you are not fan of google, but there are people (like me) who use google services.09:59
freemangordonthe point is - shall we register maemo-leste google user10:00
freemangordonand have all the oauth2 tokens issued to that user10:00
DaKnigwhy do you need a google user for that10:03
freemangordonDaKnig: how to access google developer site without account?10:04
freemangordonDaKnig: if you can help with that, please do, I have zero experience with google APIs etc10:05
freemangordonbut, OAuth2 requires application (client) ID to be send10:05
DaKnighttps://f-droid.org/packages/org.liberty.android.freeotpplus/10:05
DaKnigandroid but still10:05
freemangordonwhat is this?10:06
DaKnigoh idk10:06
DaKnigotp program sorry not sure its relevant10:06
freemangordonDaKnig: oh, no, it is not10:06
freemangordonOAuth2 is another story10:06
DaKnigwhat's that10:07
freemangordonit replaces plain password authentication10:07
DaKnigwell this program does it too10:07
freemangordonok, but first - we need it to run on leste10:08
freemangordonalso, we have to identify different programs - like telepathy-gabble and modest10:08
DaKnigthe point is you can use open source software to generate those tokens10:09
DaKnigyou can see the source10:09
freemangordonno, these tokens must be created by google10:09
freemangordonwhen you want to access google services10:10
DaKnigwell yes10:10
DaKnigwhat's hosted on google?10:10
freemangordonxmpp, imap10:10
freemangordonsince yesterday both google-talk and gmail return "Not AUthorised" when you want to authenticate with plain password10:11
freemangordonwhich is expected as they said this will stop working on 30th of May10:12
_uvos_here in ger10:13
_uvos_osm data is way way better10:13
_uvos_btw10:13
_uvos_its just that the osm webapplication is bad and dosent allow you to see everything10:14
_uvos_android osmand is extreamly good10:14
_uvos_gmapps is almost impossible to use for me10:14
_uvos_because the mappdata dosent know the difference between a kraftfahrtstrasse and a simple bundesstrasse10:15
_uvos_and my vehicle cand go on one of those ;)10:15
_uvos_just food for tought10:15
_uvos_*cant10:15
freemangordon_uvos_: my questions was rather "what navigation provider services shall I implement first" :)10:19
freemangordonin context of https://github.com/maemo-leste/libnavigation10:20
freemangordonI shall create something similar to https://github.com/community-ssu/nokiamaps-navigation-provider10:20
Wizzupfreemangordon: I wasn't saying anything about what services not to use, I just said that osm seems like a good provider :)11:20
PaliHi! I have experience with xoauth2, I implemented this nonsense last weekend.12:24
PaliI implemented it for imap client.12:27
freemangordonPali: great13:02
freemangordoncould you help with modest when it comes to it?13:02
PaliThis is my IMAP implementation: https://github.com/pali/imap-fetcher/commit/5629dc5437c03da7b4798489e7d1569d04a07e5613:02
freemangordonI plan to use Qt13:03
PaliYou need to send at $xoauth2_request_url (https://accounts.google.com/o/oauth2/token) POST FORM with client_id, client_secret, refresh_token and grant_type13:04
Paligrant_type is string 'refresh_token'13:04
Paliall other values are secret keys (generated by google console)13:04
freemangordonI did oauth2 for facebook back then13:05
PaliThat HTTPS request returns JSON like { "access_token" : "..." }13:05
freemangordonyeah13:05
freemangordonI am trying to find my code13:06
PaliAnd this access_token you need to put into IMAP session into command: AUTHENTICATE XOAUTH2 encode_base64("user=$user\x01auth=Bearer $xoauth2_access_token\x01\x01")13:06
PaliAnd that is all.13:06
freemangordonthe fuck!!! we already had that :( https://github.com/community-ssu/rtcom-accounts-plugin-jabber13:07
freemangordonwell...13:08
PaliIn past I implemented it also in Qt/KDE4 for Kopete XMPP client: https://github.com/KDE/kopete/commit/3bff188483fd2ee01bb8310a511e8cc9a4808d2213:08
PaliBut this is 6 years old code...13:08
freemangordonok, this https://github.com/community-ssu/feedservice-plugin-fb-common/tree/master/src/oauth13:09
freemangordonPali: what about using stuff like libgsignon-glib13:10
PaliI do not know this library.13:10
Wizzuphttps://github.com/ayoy/qoauth/wiki ?13:10
PaliYou need XOATUH2 Bearer auth13:11
PaliNot auth113:11
freemangordonyeah, we need oauth213:11
Wizzuphttps://liboauth.sourceforge.io/ ?13:11
Paliand for IMAP you need Bearer, not basic oatuh213:11
freemangordonwhatever it is :)13:12
PaliIf you look at my imap-fetcher code, implementation is really simple, so I think it would be easier to implement it (like I did) instead of using 3rd library and hooking it into project13:12
freemangordonPali: we still need UI13:12
PaliYou need just one HTTPs request for retrieving access token from refresh token13:13
PaliYes! You need UI for setting all those private keys13:13
freemangordonhmm, what?13:13
freemangordonwe need UI to embed browser into13:13
freemangordonunless I am missing something13:13
PaliNope, this is browser-less.13:13
freemangordonhow's that?13:13
freemangordonseems I lack the knowledge13:14
PaliWell, you need browser for generating refresh token13:14
freemangordonyep, on the first login with user/pass13:14
Palibut refresh token has infinite lifetime.13:14
Wizzupare we talking just modest or supporting it in many places?13:14
freemangordonyou login into google page accepting TC and whatnot13:15
freemangordonWizzup: may places13:15
freemangordon*many13:15
PaliI generated refresh token via google's python script (which wants me to open URI in browser)13:15
freemangordonand modest/TP being clients13:15
freemangordonPali: well, we can use the scheme for TV sets, but I don;t think that's user friendly13:15
Paliand then I put refresh token into config file... and then my imap-fetcher can generate access token for login fully automatically13:15
freemangordongiven that we *have* browser :)13:15
freemangordonI think we shall create centralized oauth service available to everybody on the system13:16
PaliHm... this is probaby harder to implement. I did not try it.13:16
freemangordona dbus service in Qt shall do it13:17
freemangordonand then modest or whatever just asks for the token and leaves the service to do whatever is needed13:17
freemangordonwell, we shall provide oauth URL along with user/pass13:18
freemangordonunless oauth has a mechanism to provide that to clients13:18
Paliyou still need to ask for client_id and client_secret13:18
PaliThis is private info.13:19
freemangordonbut it is private to the application, no?13:19
Wizzupsomething like this surely must exist in foss desktop already13:19
PaliYes! Either you create closed-source application with bundled those keys13:19
freemangordonUUIC, you register the application with google and you receive application id (client_id?)13:19
PaliOr you create open-source application but then you cannot distribute these private data.13:20
freemangordonWizzup: I guess https://gitlab.com/accounts-sso/libgsignon-glib/13:20
PaliYou register application in google console and you will get from google client_id and client_secret.13:20
freemangordonAnd I am not allowed to show those in public?13:20
freemangordonthis is crazy13:20
PaliYes!13:21
freemangordonyeah, security by obscurity at its finest :(13:21
PaliIt is 2022, open-source is not more allowed in google13:21
PaliSo now, everybody has to register its own application to get those private keys.13:21
freemangordonbut wait, how is that secret given that it is embedded in the code even if it is closed source13:22
PaliAll this xoauth2 nonsense is just to elimitate open source apps13:22
Paliit is regulation from google that you must keep this secret in your (EXE) binary application, e.g. by obfuscation.13:23
freemangordonah, I see13:23
PaliIf you want to register your application on google with full access to your account, then part of the registraction is google verification.13:23
freemangordonwell, if it is obfuscated in the source, isn;t it the same?13:23
PaliYou has to prepare video on youtube, put link to that video into verification form. And in your video you had to explain why it is secure!13:24
PaliIIRC all this you had to explain that youtube video and if google thinks it is is not enough, you would not get access to _full account_.13:25
freemangordonwhat is "full account"?13:25
PaliIf you are registering application, there are lot of levels for access... E.g. only XMPP, only some subset of HTTP api, or IMAP, or everything = full access13:26
freemangordonwell, we need xmpp and imap so far13:26
freemangordonI give a shit about adds API or whatever13:27
PaliAnd some APIs are marked as _restricted_ which needs this special google verification for approval.13:27
freemangordonmaybe we'll need maps @ some point, if it is free for use at all13:27
PaliIMAP API is already marked as restricted and needs some verification.13:28
PaliYesterday I enabled something and it allowed me at least to generate some TV token.13:28
PaliAs I said, this xoauth2 nonsense is there just for eliminating open sourcre applications.13:28
freemangordonWizzup: https://gitlab.com/accounts-sso/gsignond13:29
Paligoogle do not want other people to access google's service via unverified applications.13:29
freemangordonwell, that's not the same as "they don;t want FOSS" :)13:29
Paliok, lets say they do not want applications which are not under their control... but for me such application is not FOSS anymore.13:31
bencohyou can still use regular auth with google, as long as you create an application password, btw13:44
bencoh(I had to do that at $job)13:44
PaliOnly in case you enable 2FA on your account for which you need google application or another nonsense for login13:45
bencohhmm, I don't think so13:47
PaliI was not able to enable application password support without 2FA and random people on internet confirmed this.13:47
bencohI mean, they eventually forced us to enable 2FA here, but it's not used for 3rd-party applications (imap client in my case)13:47
freemangordonI wonder how thunderbird manages to do it13:48
bencohI only need to use 2FA once in a while to login to their website, and then I just receive a short message on my phone13:48
bencohI have no android/ios app whatsoever anyway13:48
freemangordonI have no android phone, neither I have 2FA enabled13:48
Palithunderbird passed verification process and EXE binary contains private keys13:48
freemangordonso, we'll do the same13:49
freemangordonI don;t think it is bad that google will audit our application13:49
bencohit's bad if it is mandatory13:49
bencohit's not bad per-se13:49
freemangordonwell...13:49
freemangordonnoone forces us to use their services ;)13:49
bencohsure, but ... :)13:50
freemangordonyeah...13:50
PaliI wrote some info about XMPP years ago: https://www.mail-archive.com/kopete-devel@kde.org/msg17537.html13:50
bencoh(tbh I only have a professional account at $job, I have been living without a personal google account for .... forever)13:51
PaliI have personal account in download mode as still I receive some email on it. But I'm not using it (activelly) anymore.13:51
bencoh(oh actually I had one at some point, but lost the password :D)13:53
bencoh(even forgot about it)13:53
PaliIt does not matter, you cannot use that lost password for loggin anymore :P13:54
bencoh:]13:54
freemangordonumm, you can. in the web interface13:54
Palibut none of my scripts use web interface13:55
freemangordonwell, yah13:55
freemangordon*yeah13:55
freemangordonwe have signond available on leste13:58
freemangordonso I guess this is the correct route13:58
freemangordonyeah, right14:06
freemangordonclient_id/client_secure of thinderbird seems to be in modules/OAuth2Providers.jsm14:07
freemangordonthis is in omni.ja14:07
freemangordonand it is in clear text14:08
PaliWUT? secret keys are leaked?14:08
PaliCan you paste it here? :-)14:09
freemangordonwhat do you mean14:09
freemangordonjust unzip omni.ja14:09
freemangordonand open modules/OAuth2Providers.jsm14:09
freemangordonwell, I am not 100% sure, but it *looks* like client_id/client_secure14:10
freemangordonPali: https://github.com/mozilla/releases-comm-central/blob/master/mailnews/base/src/OAuth2Providers.jsm#L8714:11
freemangordonhow is that obfuscated?14:11
Palifirst line has format of client id14:13
freemangordonobviously it is14:13
Palisecond line does not look like client secret, or at least my secret is longer14:14
freemangordonwell, just try those and see what will happen14:15
freemangordonbut I would bet the second line is the clear secret14:15
freemangordonor obfuscated by XOR-ing or somesuch14:15
freemangordonhttps://github.com/mozilla/releases-comm-central/blob/master/mailnews/base/src/OAuth2Providers.jsm#L14614:15
PaliIt is working!14:18
freemangordonsure, why noit14:18
freemangordon*not14:18
freemangordonall the oauth2 apps I did RE bac then (maps provide, facebook sharing, etc) had id/secret in clear form embedded in the code14:19
Pali$ git clone https://github.com/google/gmail-oauth2-tools && cd gmail-oauth2-tools && python2 python/oauth2.py --generate_oauth2_token --client_id="406964657835-aq8lmia8j95dhl1a2bvharmfk3t1hgqj.apps.googleusercontent.com" --client_secret="kSmqreRr0qwBWJgbf5Y-PjSU" --scope=https://mail.google.com/14:19
PaliI received refresh token via URI auth14:20
freemangordonok, but I don;t want leste to use thunderbird id/secret14:20
freemangordonleste == telepathy-gabble, modest14:20
freemangordonso I am going to register those14:20
Palifor own scripts it is easier than registering own keys14:20
freemangordonyeah14:21
freemangordonstill, the main question was whether to develop our own FW or to use something existing14:21
freemangordonfor now I am going to try signond14:21
Palianyway, this is against google verification policy if secret key is publicly available14:26
PaliI'm not sure if google accept this for small application like modest14:26
freemangordonwell, I wouldn;t call thunderbird small14:29
freemangordonalso, you can *never* keep any key secret, unless you have HSM14:30
PaliI know, but google probably not14:30
freemangordonwell..14:30
freemangordonI doubt they are *that* stupid or ignorant14:31
Palithunderbird is not small, so maybe they have exception... but small apps would not get exception14:31
freemangordonwe'll see14:31
freemangordonalso, I will make it as secure as possible14:31
freemangordonlike XOR-obfuscating in source code :D14:32
freemangordonPali: I would say all this is not because of FOSS, but becasue of script-kiddies14:34
Palilook for example at https://faircode.eu/faq.html14:35
Paligoogle is actively fighting14:35
PaliGravatars and Libravatars are now marked as spyware14:35
PaliThey just do not want to see new email client apps14:36
freemangordonPali: well, if what is said in the "issues" section is true, I don't want this application anyways :)14:36
freemangordon"your application is uploading..."14:36
Paliit is bullshit14:37
freemangordonwhat do you mean?14:37
freemangordondoes it upload contacts or not?14:37
PaliIt is marked as spyware for no reason.14:38
freemangordonPali: it could be marked as spyware because it uploads user information without user being appropriately informed about that. Maybe "spyware" is not the correct term here, but still, if contacts are being uploaded to some site, then I would have to agree with google14:40
Paliit is using gravatar to retrive public avatar about user from public web14:42
freemangordonthat does not make it any different14:42
freemangordonI am not saying the application is doing bad things14:42
freemangordonbut, if it sends user data over the internet without the user being informed about that, it is not ok14:43
Paliit is downloading, not sending14:44
freemangordonhow's that? how it knows what to download?14:44
freemangordonit sends some user id to gravater, no?14:45
freemangordonmaybe the real name of the user14:45
freemangordonalso, the issue is "without an adequate disclosure"14:46
freemangordonhow hard is for developer to explain to the users what data is being send, where and what for?14:46
humpelstilzchen[https://github.com/M66B/FairEmail/blob/master/PRIVACY.md14:47
humpelstilzchen[MD5 hash of email addresses14:47
humpelstilzchen[If Gravatars are enabled, upon receiving a message (GitHub version only)14:47
freemangordonhumpelstilzchen[: do you say that after I install application from appstore, I shall open its github project and look into the source/readme about what it is doing?14:48
humpelstilzchen[The year 2002 wants its md5 back. But it says if gravatar is enabled, so not default14:48
freemangordonIIUC, google are trying to cover their asses in terms of GDPR, for example14:49
humpelstilzchen[freemangordon: no, I was not writing that. I just believe there is a difference between "The app always sends all e-mail addresses to gravatar" and "The app sends the e-mail addresses to gravatar AFTER I told it to do that."14:52
humpelstilzchen[Also with e.g. youtube we see a lot false "something" claims from google that just came from some automatic algorithm. but this is more the politics area..14:53
freemangordonwell, I havent's seen the application in question, neither I know google's audit process, but the issues seem to come from human ticking some boxes14:54
freemangordonand still, the issue seems to be that application does not provide enoug information to the user about what it is doing14:54
freemangordonnot the data that is send or something similar14:55
freemangordonand no doubt, it is politics14:56
freemangordonbut they are in position to say "take it or leave it"14:56
humpelstilzchen["I use FairEmail so I just checked: Display Favicons is disabled by default and there's a note below the setting that says "there might be a privacy risk" and links to https://en.wikipedia.org/wiki/Favicon"14:57
humpelstilzchen[source: https://news.ycombinator.com/item?id=3143233414:58
humpelstilzchen[* from hn: "I use14:58
freemangordonhumpelstilzchen[: seems the whole issue was about google not explaining what exactly is wrong15:02
freemangordonthis is bad, no doubt15:02
freemangordonalso, nor modest neither telepathy-gabble will appear in playstore soon :D15:03
freemangordonalso, keep in mind FB blocked my developer account ~1- years ago without any explanation, despite me asking them lots of times15:04
humpelstilzchen[google can basically do what they want on their platform. I'm ok with that, I feel just sorry for the author. Waste of time and power.15:04
freemangordonso I know how it feels like15:04
freemangordon~10 years15:04
freemangordonyep, agree15:04
Wizzupuvos: here are the ucm changes: https://github.com/maemo-leste/leste-config/commit/c8790e673d6d9ca949589381d12a31aea1db181621:31
WizzupI think the change in playback priority I will revert, that was not on purpose21:31
Wizzupah, wait21:32
Wizzupuvos: here are the sphone changes I made to make earpiece audio calls work: https://github.com/maemo-leste/sphone/commits/wip-routehack2 - it lacks the other things we discussed, like using datapipe filters to run the reg reset before calling pulse21:39
Wizzupand it also currently lacks speakerphone+headphone register dumps21:39
WizzupI also had code somewhere to change the call from say earpiece to speakerphone using the pulse api from sphone, but that code wasn't working yet21:40
uvosWizzup: ok check23:21

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!