Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add full role-based user authentication and authorisation #29

Open
sshipway opened this issue Jan 6, 2016 · 10 comments
Open

Add full role-based user authentication and authorisation #29

sshipway opened this issue Jan 6, 2016 · 10 comments

Comments

@sshipway
Copy link
Collaborator

sshipway commented Jan 6, 2016

This is more large-scale, but it would be good to incorporate the structure before things get too big.

Have the system support separate user accounts, as well as an unauthenticated 'public' virtual user. The authentication should be configurable to be either a local database, LDAP server, or linked to github/facebook/google/shibboleth/CAS auth. Set specific access roles against individual accounts (readonly, manage own containers only, full admin) so that the accounts can be controlled. Different roles can give ability to view MC servers, manage them, start new ones, manage the library, and so on.

It would even allow you to potentially add a 'credit balance' to the accounts, restricting how many containers the account can spin up (decrement it every time you create a new container, disallow creation if ==0, -1 is infinite)

While this might seem overkill, and probably is in 90% of cases, it would be a necessary step to move MCCY towards being an MCaaS provider :).

@itzg
Copy link
Member

itzg commented Jan 6, 2016

The very good news is that Spring Security is already driving the login. Right now it's just using the default Boot user manager that has one user "hard-configured". If you search for Spring Social you'll see they have integrations like Facebook, Twitter, etc.

@itzg
Copy link
Member

itzg commented Jan 6, 2016

A quick search come up with an article that talks exactly about integrating LDAP auth with Spring Boot and they even have an option for an embedded LDAP server. So we can start small, but go through the real motions.

https://spring.io/guides/gs/authenticating-ldap/

@itzg itzg modified the milestones: 0.1 - gulping toad, 0.4 - Sassy Donkey, 0.1 - Gulping Toad Jan 10, 2016
@itzg
Copy link
Member

itzg commented Feb 12, 2016

...an interesting aspect of this could be to support authenticating based on people's Minecraft account via MCAuthLib.

That likely is leveraging the new Mojang authentication scheme documented here

@itzg
Copy link
Member

itzg commented Feb 12, 2016

Since asking people for their Minecaft account password feels icky, an arbitrating OAuth service like https://www.mineid.org/ seems appealing...assuming they can be trusted :)

@sshipway
Copy link
Collaborator Author

If you support MinecraftID as an option for logins (using an external service), then you could pre-populate the Whitelist and Opslist for new containers...

It would be good to have the option to choose from LDAP, MinecraftID or Local for authentication options.

@danpolanco
Copy link
Collaborator

Hm. Once we add more games (e.g. Project Zomboid), will mcid still continue to be useful?

@itzg
Copy link
Member

itzg commented Feb 12, 2016

Good point @DanTheColoradan. To regain the pre-filled white/op list like @sshipway mentioned, then we could provide the ability for users to define their preferred defaults.

So all in all, sounds like we're leaning towards our own "user database" which we would have needed regardless...doesn't preclude just authentication through something like Twitter/Facebook/G+, etc.

@sshipway
Copy link
Collaborator Author

If you have a local user database - with selectable auth options of MinecraftID/LDAP/Local/Whatever - then you can set up all your preferred settings, including default modules and minecraft container type...

@sshipway
Copy link
Collaborator Author

You could even then set up the uploaded world ZIP archive so that people can flag uploaded worlds as private or public, optionally allowing other people to use them when setting up new container

@itzg
Copy link
Member

itzg commented May 19, 2016

Reviving an old conversation with a note-to-self about latest Spring LDAP release

https://spring.io/blog/2016/05/17/spring-ldap-2-1-0-released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants