[Mod] Auth Redux v2.14 (Authentication Handler) [auth_rx]

User avatar
Miniontoby
Member
Posts: 616
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [Mod] Auth Redux v2.14 (Authentication Handler) [auth_rx]

by Miniontoby » Post

Code: Select all

2020-09-17 03:28:59: ACTION[Main]: Server: Shutting down
2020-09-17 03:29:00: ERROR[Main]: ModError: Failed to load and run script from /home/miniontoby/minetest/mods/auth_rx/init.lua:
2020-09-17 03:29:00: ERROR[Main]: /home/miniontoby/minetest/mods/auth_rx/filter.lua:488: The specified ruleset file does not exist.
2020-09-17 03:29:00: ERROR[Main]: stack traceback:
2020-09-17 03:29:00: ERROR[Main]:       [C]: in function 'error'
2020-09-17 03:29:00: ERROR[Main]:       /home/miniontoby/minetest/mods/auth_rx/filter.lua:488: in function 'refresh'
2020-09-17 03:29:00: ERROR[Main]:       /home/miniontoby/minetest/mods/auth_rx/filter.lua:607: in function 'AuthFilter'
2020-09-17 03:29:00: ERROR[Main]:       /home/miniontoby/minetest/mods/auth_rx/init.lua:21: in main chunk
I got an error. please help me
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
sorcerykid
Member
Posts: 1841
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: [Mod] Auth Redux v2.14 (Authentication Handler) [auth_rx]

by sorcerykid » Post

Greetings! You need to have a ruleset file in each world directory that uses Auth Redux. If you're on Linux, then the file must also be readable by the Minetest process.

You can simply create a new file called "greenlist.mt" and include the single rule pass now. Then all should work.

User avatar
Miniontoby
Member
Posts: 616
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [Mod] Auth Redux v2.14 (Authentication Handler) [auth_rx]

by Miniontoby » Post

it is on openbsd but ok I will check

EDIT: It doesnt work

Code: Select all

2020-09-18 01:53:40: ERROR[Main]: Cannot open /home/miniontoby/minetest/worlds/first/auth.dbx for writing.
2020-09-18 01:53:40: ACTION[Main]: Server: Shutting down
2020-09-18 01:53:41: ERROR[Main]: ModError: Failed to load and run script from /home/miniontoby/minetest/mods/auth_rx/init.lua:
2020-09-18 01:53:41: ERROR[Main]: /home/miniontoby/minetest/mods/auth_rx/db.lua:39: Fatal exception in Journal( ), aborting.
2020-09-18 01:53:41: ERROR[Main]: stack traceback:
2020-09-18 01:53:41: ERROR[Main]:       [C]: in function 'error'
2020-09-18 01:53:41: ERROR[Main]:       /home/miniontoby/minetest/mods/auth_rx/db.lua:39: in function 'Journal'
2020-09-18 01:53:41: ERROR[Main]:       /home/miniontoby/minetest/mods/auth_rx/db.lua:117: in function 'AuthDatabase'
2020-09-18 01:53:41: ERROR[Main]:       /home/miniontoby/minetest/mods/auth_rx/init.lua:22: in main chunk
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
sorcerykid
Member
Posts: 1841
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: [Mod] Auth Redux v2.14 (Authentication Handler) [auth_rx]

by sorcerykid » Post

Did you run the installation script as described?

https://github.com/sorcerykid/auth_rx/w ... ase-Import

Keep in mind, all of the following files will need to have read and write permissions:
  • auth.dbx
  • auth.db
  • greenlist.mt
If any of these files are not accessible to the Minetest process, then double-check the directory ownership and permissions too.

User avatar
Miniontoby
Member
Posts: 616
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [Mod] Auth Redux v2.14 (Authentication Handler) [auth_rx]

by Miniontoby » Post

I only have auth.sqlite and it is an public server already (i disabled it for now)

The script needs an auth.txt which is the less secure one
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
sorcerykid
Member
Posts: 1841
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: [Mod] Auth Redux v2.14 (Authentication Handler) [auth_rx]

by sorcerykid » Post

If you are migrating from the default auth backend of Minetest 5.x, then you'll first need to convert the auth.sqlite database back into the legacy format. Then you can run the included awk conversion script on the auth.txt file.
  • Run the Minetest server to migrate the SQLite3 auth database backend.

    minetestserver --migrate-auth files --worldname world

  • Run the included Database Import Script to convert the database.

    awk -f convert.awk -v mode=install ~/.minetest/worlds/world/auth.txt
Sorry there's not yet a shortcut to migrate directly from SQLite3 backend. But eventually I'll make something available.

User avatar
sorcerykid
Member
Posts: 1841
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: [Mod] Auth Redux v2.14 (Authentication Handler) [auth_rx]

by sorcerykid » Post

Here's an authentication ruleset that I adapted from the Guest Blocker mod used on Pandora's Box.

I tweaked it slightly, so it also allows players to bypass the soft limit if they are veterans to the server (account older than one year).

Code: Select all

# block guest players when more than 5 players currently online
# block new players when more than 15 players currently online
# block players without "limit_bypass" privilege when more than 25 players currently online
# block players that only registered this past year when more than 25 players currently online

try "Guests not allowed. Please use the official Minetest app."
fail all
if $cur_users gte 5
if $name is /+###/
continue

try "Too many players online right now. Please rejoin at a less busy moment."
fail all
if $cur_users gte 15
if $is_new eq $true
continue

fail all
if $cur_users gte 25
unless "limit_bypass" in $privs_list
if oldlogin gte -1y
continue

pass now

User avatar
Miniontoby
Member
Posts: 616
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [Mod] Auth Redux v2.14 (Authentication Handler) [auth_rx]

by Miniontoby » Post

Do I need to use files as auth backend the whole time???
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
sorcerykid
Member
Posts: 1841
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: [Mod] Auth Redux v2.14 (Authentication Handler) [auth_rx]

by sorcerykid » Post

Yes, Auth Redux only uses flat files. If you need a database backend like SQLite3 or PostgreSQL, then you'll have to use the builtin authentication handler. I'd actually considered the possibility of providing a stub for interfacing with any database backend, but that would require bypassing mod security which is not ideal.

freefall
Member
Posts: 19
Joined: Mon Dec 21, 2020 12:20

Re: [Mod] Auth Redux v2.14 (Authentication Handler) [auth_rx]

by freefall » Post

On calling /auth in minetest, our server crashes with the following error messge:

2021-03-29 14:57:04: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua:
Runtime error from mod 'auth_rx' in callback on_chat_message(): ...ames/minetest
-server/.minetest/mods/auth_rx/commands.lua:734: attempt to call field 'create_f
orm' (a nil value)


Any idea?

User avatar
sorcerykid
Member
Posts: 1841
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: [Mod] Auth Redux v2.14 (Authentication Handler) [auth_rx]

by sorcerykid » Post

If you need to use the /auth and /filter chat commands, then ActiveFormspecs must be installed

https://bitbucket.org/sorcerykid/formspecs/src/master/

I actually thought there was a runtime dependency check to prevent crashing, but I suspect that might be in the development branch.

Edit: It turns out there is a runtime dependency check, but only on the /filter command. I filed this as a bug report :)

User avatar
sorcerykid
Member
Posts: 1841
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: [Mod] Auth Redux v2.14 (Authentication Handler) [auth_rx]

by sorcerykid » Post

Due to multiple reported issues with the awk conversion script by Mac and Windows users, I've decided that I will be switching to a Lua-based converter instead. That is unless someone can troubleshoot why it seems to be broken under platforms other than Linux. While awk is suited for text processing, the clear advantage of Lua is that it won't require Windows users install a separate utility.

mcaygerhard
Member
Posts: 129
Joined: Tue Mar 05, 2019 17:37
GitHub: mckaygerhard
IRC: mckaygerhard
In-game: mckaygerhard

Re: [Mod] Auth Redux v2.14 (Authentication Handler) [auth_rx]

by mcaygerhard » Post

sorcerykid wrote:
Sat Apr 17, 2021 00:55
Due to multiple reported issues with the awk conversion script by Mac and Windows users, I've decided that
this is innecesary.. servers administrators runs on unix like only servers.. no windo/mac are providers on big multiplayers ones

for own local servers.. multiplayer one with more than 100 users are not a fact! so this extra work from you is unnecesary.. windosers users just can use the buil in or database flavor for that little amount of local users.. big servers always have almost 1000 or more.. and big servers will always be unix like!

the real work is on the phone client site.. the 99% of the clients are 4.X & 5.X backguard copatible.. best clients uses the 4.X (0.4.17.1) version.. the most played server are catlandia (this month only) and the two 0.4.17 versions

mcaygerhard
Member
Posts: 129
Joined: Tue Mar 05, 2019 17:37
GitHub: mckaygerhard
IRC: mckaygerhard
In-game: mckaygerhard

Re: [Mod] Auth Redux v2.14 (Authentication Handler) [auth_rx]

by mcaygerhard » Post

ok i installed this on one of the 3 VenenuX sub.nasa-g0v server.. is really really faster.. but ... noted that after installed, laggin my chat.. so i suspect is the formspec mod from you.. so removed and then try again.. still have some laggin .. from 0.2 to 5.0 so i try to clear all the entities by /clearobjects full and check again.. still spected to check if there are... ( it has 10 minutes cleaning)

UPDATE 2: the offending mod was ethereal .. i dont know why after added this the map get crash now.. i will try to solve it or at leas find the problem

UPDATE 3: it works prefectly in MT 0.4.17 no problems.. just need to improve the documentation https://bitbucket.org/sorcerykid/auth_r ... file-or-no

also asked for compatibility with /auth_reload command? and password administration ones? https://bitbucket.org/sorcerykid/auth_r ... ommand-and

GREAT WORK! i hope you solve your problems and get back to work

User avatar
sorcerykid
Member
Posts: 1841
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: [Mod] Auth Redux v2.14 (Authentication Handler) [auth_rx]

by sorcerykid » Post

Thanks for the feedback, I feel reassured knowing that the bottleneck was in fact unrelated to Auth Redux. I do still have plans to further optimize the journalizing system, so as to improve server startup time (because right now the journal file has to be read in-full everytime, which could be streamlined).

Also improvements to the documentation are very much warranted, so I appreciate that encouragement. Thanks for trying out the mod, and I hope it is working well for you.

mcaygerhard
Member
Posts: 129
Joined: Tue Mar 05, 2019 17:37
GitHub: mckaygerhard
IRC: mckaygerhard
In-game: mckaygerhard

Re: [Mod] Auth Redux v2.14 (Authentication Handler) [auth_rx]

by mcaygerhard » Post

sorcerykid wrote:
Mon Dec 20, 2021 00:48
Also improvements to the documentation are very much warranted, so I appreciate that encouragement. Thanks for trying out the mod, and I hope it is working well for you.
i asked in your JT2 threath about the git repo to send PR cos you are so unorganized in that way.. (too many git repos of same)
sorcerykid wrote:
Mon Dec 20, 2021 00:48
I do still have plans to further optimize the journalizing system, so as to improve server startup time (because right now the journal file has to be read in-full everytime, which could be streamlined).
currently that is not a problem, more important is server running rather restart, in fact it seems all the MT serverr have restarts daily .. my NSSM sub nasa doe snot restart any time (but there's a hiddeen but that restart the server .. related to join players)

i read in some place that when a mod makes usage of pre join and join callbacks (i dont understand so well callbacks) must be a depend!, by example if another mod makes usage of that functions i must depends on auth_rx mod or somithing related! how is this?

mcaygerhard
Member
Posts: 129
Joined: Tue Mar 05, 2019 17:37
GitHub: mckaygerhard
IRC: mckaygerhard
In-game: mckaygerhard

Re: [Mod] Auth Redux v2.14 (Authentication Handler) [auth_rx]

by mcaygerhard » Post

hi i solved all the auth_rx issues.. for working at least .. where are you now hosted your code.. cos bitbucked crap site seems that dont host anymore your profile
sorcerykid wrote:
Mon Dec 20, 2021 00:48
Thanks for the feedback, I feel reassured knowing that the bottleneck was in fact unrelated to Auth Redux
solved.. was related to rspawn and NathanSalapat/random_spawn mods whta i already fixed, is the module handler priority.. i will post feedback in README at future commits in minenux at codeberg https://content.minetest.net/packages/m ... spawnrand/
sorcerykid wrote:
Mon Dec 20, 2021 00:48
.. I do still have plans to further optimize the journalizing system, so as to improve server startup time (because right now the journal file has to be read in-full everytime, which could be streamlined)
.

seems not so harmfull.. as the issue demostrates i have now 1 millon users and works great.. no delays in loading the initial files..
sorcerykid wrote:
Mon Dec 20, 2021 00:48
Also improvements to the documentation are very much warranted, so I appreciate that encouragement. Thanks for trying out the mod, and I hope it is working well for you.
.

working documentation at https://codeberg.org/minenux/minetest-m ... ranch/main

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 14 guests