Pages: [1] 2 3 4 :: one page |
|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |
Snitch Ashor
Black Rise Guerilla Forces The Bloc
6
|
Posted - 2017.03.11 23:36:53 -
[1] - Quote
Hi all,
This is a first alpha version of a phpBB extension that enables Single sign on for registration and login to the phpBB forum software: Downloads
Current features:
- phpBB auth provider (replaces regular login completely)
- Login / Registration using EVE accounts
- Group management based on corp / alliance (using ESI to fetch)
- Teamspeak serverGroup management based on corp / alliance
Installation and setup:
This extension is under development, if you install it on anything but a fresh and empty board, backup your database and files now.
- Upload the contents of the zip to your forum root (the zip should already contain the directory structure /ext/snitch/authevesso)
- Go to the ACP
- Enable the extension under 'Customise', if it doesnt show up check the directory structure.
- Go to developers.eveonline.com and create an App, select API access the scope esi-corporations.read_corporation_membership.v1, set the callback url to server/forumurl/authevesso/login
- Go to you forum ACP: General - Client communication - Authentication
- Enter your app id and secret you got in the above step, as well as the Admin character name (Important: This has to be an eve character you will use from now on to log in as admin. If this char already exists as a board user, make him a founder and grant all permissions now.)
- Save Settings
- Change authentication method to Evesso and save.
- Log in with the admin EVE char and purge the forum cache in the ACP.
- Start adding Groups / Teamspeak groups under 'Extensions'
if something goes wrong and you locked yourself out, access your database and find the key auth_method in your phpbb_config table and change it from 'evesso' to 'db'.
To do:
- Implement logging
- Testing
- Better session management (when logging in from multiple devices)
- ???
A few notes how its working:
This extension automatically creates a forum user account for evey user that logs in with his eve account. It only handles the groups configured in the extensions ACP menu, it will not add OR REMOVE from any of the groups / teamspeak groups not entered there. phpBB3.1+ has a new cron system. if you wish to run the cron jobs manually, the command to do so is: php _install_dir_/bin/phpbbcli.php cron:run (set to run e.g. once in 15 minutes, dont worry, the actual jobs run at different intervals) In that case, go to your boards server settings and set 'run periodic tasks from system...' to 'yes'.
Credits:
Inspired by phpBB 3.1 Authentication Provider for Shibboleth Using the Teamspeak PHP framework ESI client generated using swagger codegen
Happy testing,
Report any bugs you ancounter here or to [email protected] If you wanna support this project, feel free to throw some ISK at Snitch Ashor
o7, Snitch |
Snitch Ashor
Black Rise Guerilla Forces The Bloc
6
|
Posted - 2017.03.12 07:16:14 -
[2] - Quote
Reserved. |
Norio Nori
Ecoas Heavy Industries SAMURAI SOUL'd OUT
7
|
Posted - 2017.03.15 14:39:43 -
[3] - Quote
It is amazing! |
Milo Caman
Anshar Incorporated Monyusaiya Industry Trade Group
154
|
Posted - 2017.03.17 16:34:23 -
[4] - Quote
Super happy to see this again, but seeing this when I try to log into my fresh forum after setting up:
SQL ERROR [ mysqli ]
Unknown column 'session_authstate' in 'field list' [1054]
Don't have access to my database from work, so will reset the auth method and have a closer look when I get home in a few hours, but if there's any quick fixes to this that'd be excellent. |
Snitch Ashor
Black Rise Guerilla Forces The Bloc
8
|
Posted - 2017.03.17 21:04:44 -
[5] - Quote
Milo Caman wrote:Super happy to see this again, but seeing this when I try to log into my fresh forum after setting up: SQL ERROR [ mysqli ]
Unknown column 'session_authstate' in 'field list' [1054]
Don't have access to my database from work, so will reset the auth method and have a closer look when I get home in a few hours, but if there's any quick fixes to this that'd be excellent.
Hmmm weird, that column should have been installed with the mod. Will try it myself on a fresh install. |
Milo Caman
Anshar Incorporated Monyusaiya Industry Trade Group
154
|
Posted - 2017.03.17 21:46:08 -
[6] - Quote
I've reset the auth_method key and managed to get back in, no problems. For anyone who's new to MySQL something like this should work fine.
UPDATE phpbb_config SET config_value = 'db' WHERE config_name = 'auth_method' LIMIT 1;
You'll need to clear the cache folder afterwards.
Interestingly if the extension is enabled, using the extensions tab in the ACP returns the following:
General Error SQL ERROR [ mysqli ]
Table 'phpbb.phpbb_authevesso_groups' doesn't exist [1146]
SQL
SELECT * FROM phpbb_authevesso_groups
BACKTRACE
FILE: (not given by php) LINE: (not given by php) CALL: msg_handler()
FILE: [ROOT]/phpbb/db/driver/driver.php LINE: 999 CALL: trigger_error()
FILE: [ROOT]/phpbb/db/driver/mysqli.php LINE: 193 CALL: phpbb\db\driver\driver->sql_error()
FILE: [ROOT]/phpbb/db/driver/factory.php LINE: 329 CALL: phpbb\db\driver\mysqli->sql_query()
FILE: [ROOT]/ext/snitch/authevesso/acp/main_module.php LINE: 91 CALL: phpbb\db\driver\factory->sql_query()
FILE: [ROOT]/includes/functions_module.php LINE: 676 CALL: snitch\authevesso\acp\main_module->main()
FILE: [ROOT]/adm/index.php LINE: 82 CALL: p_master->load_active()
I'm not sure if this is useful? I may have done something wrong. |
Snitch Ashor
Black Rise Guerilla Forces The Bloc
8
|
Posted - 2017.03.17 21:57:25 -
[7] - Quote
That is related to the first I guess, looks like the migration that installs database tables and columns is not executed at all in your case, will try to figure out what went wrong. If you want to retry you have to deinstall the mod and delte all data of the mod in the customization tab |
Milo Caman
Anshar Incorporated Monyusaiya Industry Trade Group
154
|
Posted - 2017.03.17 22:13:25 -
[8] - Quote
Snitch Ashor wrote:That is related to the first I guess, looks like the migration that installs database tables and columns is not executed at all in your case, will try to figure out what went wrong. If you want to retry you have to deinstall the mod and delte all data of the mod in the customization tab
Is it possible to trigger the migration script manually? Not had any luck reinstalling this so far. |
Snitch Ashor
Black Rise Guerilla Forces The Bloc
9
|
Posted - 2017.03.18 00:19:35 -
[9] - Quote
Thanks for reporting back, could you do one more quick check just look if the file
_phpBBinstall_/phpbb/db/migration/migration.php is present and tell me what php version you are running please?
Thanks.
Btw since all migrations require that class, the one that creates the profile field to enter the teamspeakID might be missing as well. You can just create it under users-> custom profile fields:
Identifier: authevesso_tsid Type: single text field.
Publicly display profile field: NO and the only options that should be ticked are: Display in user control panel Hide profile field |
Milo Caman
Anshar Incorporated Monyusaiya Industry Trade Group
154
|
Posted - 2017.03.18 00:30:07 -
[10] - Quote
migration.php is present. I'm using PHP 7.0.15-0ubuntu0.16.04.4.
Everything appears to be working smoothly now.
Just a thought, but you might want to set something that toggles the 'register' button on the forum when SSO is active, as it allows users to make redundant accounts they can't log into. It's not really a big issue, but might cause some confusion if the 'Disable registration' option isn't selected in the ACP. |
|
Snitch Ashor
Black Rise Guerilla Forces The Bloc
9
|
Posted - 2017.03.18 06:47:01 -
[11] - Quote
Yeah you are right. You can disable board registration yourself for now in the ACP. I will either disable the button or just forward registration to the sso as well. |
Paic Aishai
Alphahydrae
0
|
Posted - 2017.03.18 11:01:38 -
[12] - Quote
Thanks man. Cool project you're working on here !
I also tried to install this and ran into the same problems as Milo. After following your instructions, the extension page is now accesible and database schemas seems ok, but when I try to login, I get an "Invalid auth state." error.
The auth state seems to be passed along correctly during the OAuth process, it is even set correctly in the databse (phpbb_sessions.session_authstate)
Any ideas ?
|
Felicity Stihl
Bittervet's retirement home
1
|
Posted - 2017.03.18 18:54:16 -
[13] - Quote
Cool project
I installed it without a hitch, but when I enable authentication, I will get a 404 error when trying to hit the login button.
The 404 is for forums.domain.tld/authevesso/login (my phpbb install is not in a subdirectory)
Any ideas on this one ? |
Snitch Ashor
Black Rise Guerilla Forces The Bloc
9
|
Posted - 2017.03.18 19:03:12 -
[14] - Quote
Paic Aishai wrote:Thanks man. Cool project you're working on here !
I also tried to install this and ran into the same problems as Milo. After following your instructions, the extension page is now accesible and database schemas seems ok, but when I try to login, I get an "Invalid auth state." error.
The auth state seems to be passed along correctly during the OAuth process, it is even set correctly in the database (phpbb_sessions.session_authstate)
Any ideas ?
So basically what is supposed to happen is the auth state, which is just a random number is stored in the session sb before sending the user to the sso page and the response is compared afterwards. Not sure what goes wrong there. Could you post or pm me your forum address? |
Snitch Ashor
Black Rise Guerilla Forces The Bloc
9
|
Posted - 2017.03.18 19:07:03 -
[15] - Quote
Felicity Stihl wrote:Cool project
I installed it without a hitch, but when I enable authentication, I will get a 404 error when trying to hit the login button.
The 404 is for forums.domain.tld/authevesso/login (my phpbb install is not in a subdirectory)
Any ideas on this one ?
Will have to try and reproduce it. If you feel like trying it on a subfolder, let me know if it works. |
Felicity Stihl
Bittervet's retirement home
1
|
Posted - 2017.03.18 19:12:03 -
[16] - Quote
Snitch Ashor wrote:Felicity Stihl wrote:Cool project
I installed it without a hitch, but when I enable authentication, I will get a 404 error when trying to hit the login button.
The 404 is for forums.domain.tld/authevesso/login (my phpbb install is not in a subdirectory)
Any ideas on this one ? Will have to try and reproduce it. If you feel like trying it on a subfolder, let me know if it works.
Same error, it also complains about /adm/authevesso
the apache log shows this when I hit the login button (after i changed the forum url, and moved files so that the new path is: https://forums.domain.tld/forums) xx.xx.xx.xx - - [18/Mar/2017:19:12:44 +0000] "GET /forums/authevesso/login?target=https%3A%2F%2Fforums.domain.tld%2Fforums%2Findex.php HTTP/1.1" 404 578 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
I cannot access the callback url manually either... |
Felicity Stihl
Bittervet's retirement home
1
|
Posted - 2017.03.19 10:42:02 -
[17] - Quote
Quick update:
Made a new VM to test this on, completley vanilla ubuntu 16.10 , just installed mod_php, apache2, phpmyadmin, and mysql. installed a fresh version of phpbb 3.2 and added your plugin, so far so good..
after installing, and activating the plugin, I cannot access the /authevesso/login url (http://172.16.32.149/phpbb/authevesso/login?target=http%3A%2F%2F172.16.32.149%2Fphpbb%2Findex.php)
|
Snitch Ashor
Black Rise Guerilla Forces The Bloc
9
|
Posted - 2017.03.19 13:20:47 -
[18] - Quote
Felicity Stihl wrote:Quick update:
Made a new VM to test this on, completley vanilla ubuntu 16.10 , just installed mod_php, apache2, phpmyadmin, and mysql. installed a fresh version of phpbb 3.2 and added your plugin, so far so good..
after installing, and activating the plugin, I cannot access the /authevesso/login url (http://172.16.32.149/phpbb/authevesso/login?target=http%3A%2F%2F172.16.32.149%2Fphpbb%2Findex.php)
Thanks for testing, will do the same, the only difference to my test enviroment is ubuntu16.10 and prly the mysql version. Will let you know if i can figure out what it is. |
Felicity Stihl
Bittervet's retirement home
1
|
Posted - 2017.03.19 13:52:14 -
[19] - Quote
Snitch Ashor wrote:Felicity Stihl wrote:Quick update:
Made a new VM to test this on, completley vanilla ubuntu 16.10 , just installed mod_php, apache2, phpmyadmin, and mysql. installed a fresh version of phpbb 3.2 and added your plugin, so far so good..
after installing, and activating the plugin, I cannot access the /authevesso/login url (http://172.16.32.149/phpbb/authevesso/login?target=http%3A%2F%2F172.16.32.149%2Fphpbb%2Findex.php)
Thanks for testing, will do the same, the only difference to my test enviroment is ubuntu16.10 and prly the mysql version. Will let you know if i can figure out what it is.
The mysql version is probably not the issue, the default apache configuration may be. As I stated, I'm running a unmodified apache conf except for enabling mod_rewrite. |
Felicity Stihl
Bittervet's retirement home
1
|
Posted - 2017.03.19 15:16:13 -
[20] - Quote
Felicity Stihl wrote:Snitch Ashor wrote:Felicity Stihl wrote:Quick update:
Made a new VM to test this on, completley vanilla ubuntu 16.10 , just installed mod_php, apache2, phpmyadmin, and mysql. installed a fresh version of phpbb 3.2 and added your plugin, so far so good..
after installing, and activating the plugin, I cannot access the /authevesso/login url (http://172.16.32.149/phpbb/authevesso/login?target=http%3A%2F%2F172.16.32.149%2Fphpbb%2Findex.php)
Thanks for testing, will do the same, the only difference to my test enviroment is ubuntu16.10 and prly the mysql version. Will let you know if i can figure out what it is. The mysql version is probably not the issue, the default apache configuration may be. As I stated, I'm running a unmodified apache conf except for enabling mod_rewrite.
To anwser my own post: Found two issues, 1. had to explictly set the php variable "register_globals" to off 2. had to install php-curl (which is not mentioned as a requirement anywhere)
Seems to work now |
|
Snitch Ashor
Black Rise Guerilla Forces The Bloc
9
|
Posted - 2017.03.19 19:51:15 -
[21] - Quote
Felicity Stihl wrote: To anwser my own post: Found two issues, 1. had to explictly set the php variable "register_globals" to off 2. had to install php-curl (which is not mentioned as a requirement anywhere)
Seems to work now, except for the fact that when I log in, I get a error complaning about "INSECURE_REDIRECT".. (things still work if I refresh)
Thanks a lot.
Indeed php5.5+ with curl is a requirement for the API client library, added that to the opening post and readme. I'm abit confused about the other part since register_globals = OFF should be default since php 4.x and phpBB itself should complain if its on...
The INSECURE_REDIRECT, is that a phpBB error message and when does it appear?
I uploaded a version 1.0.1 (Download Link in the opening post) which should fix the problem about databases not being created on install.
@Felicity Stihl could you try this commit that should fix your insecure redirect warnings. |
Felicity Stihl
Bittervet's retirement home
1
|
Posted - 2017.03.20 18:18:42 -
[22] - Quote
Snitch Ashor wrote:Felicity Stihl wrote: To anwser my own post: Found two issues, 1. had to explictly set the php variable "register_globals" to off 2. had to install php-curl (which is not mentioned as a requirement anywhere)
Seems to work now, except for the fact that when I log in, I get a error complaning about "INSECURE_REDIRECT".. (things still work if I refresh)
Thanks a lot. Indeed php5.5+ with curl is a requirement for the API client library, added that to the opening post and readme. I'm abit confused about the other part since register_globals = OFF should be default since php 4.x and phpBB itself should complain if its on... The INSECURE_REDIRECT, is that a phpBB error message and when does it appear? I uploaded a version 1.0.1 (Download Link in the opening post) which should fix the problem about databases not being created on install. @Felicity Stihl could you try this commit that should fix your insecure redirect warnings.
It's a PHPbb error, and it occures right after you select your character on ccp:s site and hits submit.
Your newest commit seemes to have fixed that issue.
I did however notice an odd thing with the original build, I have phpbb's timeouts set to several days, but the user session will time out within less than an hour, and require relogging, is that by design, and/or can I change the timeouts somewhere , or is this something that the new commit may have fixed ? (Just applied it, so I'll know within a few hours) |
Snitch Ashor
Black Rise Guerilla Forces The Bloc
9
|
Posted - 2017.03.20 23:04:22 -
[23] - Quote
Yeah I know about the persistent login problem, its on the todo list. Right now I try to use phpbbs builtin remember me function, but it still fails most of the time, need to do some diggin there. |
Milo Caman
Anshar Incorporated Monyusaiya Industry Trade Group
154
|
Posted - 2017.03.21 16:42:34 -
[24] - Quote
Run into a new issue: I'm trying to enable another extension (specifically the phpbb google analytics package) and when I have Auth EVE SSO enabled, my session is cleared and I'm booted back to the forum index with the following message:
Access to the Administration Control Panel is not allowed as you do not have administrative permissions.
I can happily log back in and use the rest of the ACP after this. The issue only seems to occur on the 'Customise' tab when enabling new ones. Any ideas?
EDIT: It also appears to do the same when I hit 'Details' on each extension. |
Paic Aishai
Alphahydrae
0
|
Posted - 2017.03.22 22:32:05 -
[25] - Quote
Small issue here too : it seems that when the EveSSO auth method is selected, some part of the boad (home page, like "who is online, statistics ; few strings in UCP/ACP ; ...) are not in the default board language. When I switched back to Db auth method everything was ok.
I also tried to reinstall the language but it did not change anything. Can it may come from the extension ? |
Snitch Ashor
Black Rise Guerilla Forces The Bloc
9
|
Posted - 2017.03.23 13:10:18 -
[26] - Quote
Paic Aishai wrote:Small issue here too : it seems that when the EveSSO auth method is selected, some part of the board (home page, like "who is online" , statistics ; few strings in UCP/ACP ; ...) are not in the default board language. When I switched back to Db auth method everything was ok.
I also tried to reinstall the language but it did not change anything. Can it may come from the extension ?
Definetly a bug of the extension thanks, should be fixed in v1.0.2.
Btw. the mod is not yet translated but programmed in a way so it should be easy to translate. If someone is in the mood to do a translation, let me know, its only about 30 lines of text, mostly related to the ACP. In phpBB, mods will always fallback to english if the right translation is not available, but this only works if english is not deinstalled.
Bests, Snitch |
Snitch Ashor
Black Rise Guerilla Forces The Bloc
9
|
Posted - 2017.03.23 13:15:45 -
[27] - Quote
Felicity Stihl wrote:I did however notice an odd thing with the original build, I have phpbb's timeouts set to several days, but the user session will time out within less than an hour, and require relogging, is that by design, and/or can I change the timeouts somewhere , or is this something that the new commit may have fixed ? (Just applied it, so I'll know within a few hours) EDIT: Seems like the timeout issues are fixed, my sessions even persisted between reboots... EDIT2: Scratch that, times out after an hour..
I tried a lot of things regarding this but I'm still not entirely sure why logouts sometimes occur after an hour and most of the time (at least for me) not in days. I posted some more details here:
https://bitbucket.org/snitchashor/php-ext-authevesso/issues/1/user-sessions-timing-out-inconsistently
|
Paic Aishai
Alphahydrae
0
|
Posted - 2017.03.23 18:09:25 -
[28] - Quote
Snitch Ashor wrote:Paic Aishai wrote:Small issue here too : it seems that when the EveSSO auth method is selected, some part of the board (home page, like "who is online" , statistics ; few strings in UCP/ACP ; ...) are not in the default board language. When I switched back to Db auth method everything was ok.
I also tried to reinstall the language but it did not change anything. Can it may come from the extension ? Definetly a bug of the extension thanks, should be fixed in v1.0.2. Btw. the mod is not yet translated but programmed in a way so it should be easy to translate. If someone is in the mood to do a translation, let me know, its only about 30 lines of text, mostly related to the ACP. In phpBB, mods will always fallback to english if the right translation is not available, but this only works if english is not deinstalled. Bests, Snitch
Updated to v1.0.2a, all good. Thanks for the quick fix man ! |
Snitch Ashor
Black Rise Guerilla Forces The Bloc
9
|
Posted - 2017.03.24 13:41:40 -
[29] - Quote
Paic Aishai wrote: Updated to v1.0.2a, all good. Thanks for the quick fix man !
Thats also what I thought but 1.0.2 breaks a part of the ACP, fixed here: 1.0.3a In this one language and ACP should be working.
Also anyone running 1.0.0 and having issues with logouts occuring very often, please update and let me know if it got better. |
Pohwaran
SMTOWN. The Jove Empire
0
|
Posted - 2017.03.24 21:12:44 -
[30] - Quote
Hey,
I installed everything like said, had a few problems with the callback url but got that sorted. Now I'm stuck at "Error: Invalid auth state." The DB is set to evesso, I made sure of that. Any help would be appreciated. Thanks. |
|
|
|
|
Pages: [1] 2 3 4 :: one page |
First page | Previous page | Next page | Last page |