LuckPerms

LuckPerms

41.4k Downloads

MongoDB Authentication Database Setting (Suggestion)

Moderocky opened this issue ยท 1 comments

commented

Hello, little quality of life suggestion! :)

When using MongoDB, you are able to authenticate against a different database than the one the account actually stores data in (traditionally, you authenticate with mongo's "admin" database where all accounts are stored, as users in this database can have special over-arching permissions, and then store the data elsewhere.)

Currently, Luckperms by default will try to authenticate with the database it wants to store the data in, which is a bit of a pain as it means that one has to add a user account to that database.

Now, I know there is an option to use a custom connection URI and one can technically specify it should auth with admin there, but this is a bit of a pain to use since the user has to set up the URI manually themself, and this can be a bit complicated (especially as you have to worry about special char encoding, etc.)

My suggestion is to add a simpler config option, such as a mongo-auth-db entry, so that people can more easily specify where they want luckperms to authenticate with than having to work out a custom URI. :)

Apologies if there is already some option for this - I haven't seen one, though.

commented

Hey, thanks for the suggestion.

Unfortunately (unless I've overlooked it) it seems the Mongo driver doesn't have an easy option for setting this.

Might just be a case of having to stick to specifying the URI if you want to do this. :)