Support Custom Authentication #102

Closed
opened 2026-02-04 16:49:44 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @joshlewis on GitHub (May 4, 2016).

I'd like to integrate BookStack into an existing Laravel app that has its own authentication system already built. (It's Laravel's built-in concept of Users, but that may or may not matter. Not sure.) So really, I just want this wiki to be on a collection of routes within a larger app, and use the exact same login page and same logins that the rest of the app already uses.

Two questions:

  1. Is that functionality possible to hack in today without changing BookStack?
  2. Would changing BookStack in some way make the process easier for future developers to integrate with custom authentication?
  3. If the external system also already has a concept of roles, perhaps there could be some way to integrate BookStack's custom roles with the custom roles that are outside the BookStack system?

Also, maybe implementing this could help #75 along?

Originally created by @joshlewis on GitHub (May 4, 2016). I'd like to integrate BookStack into an existing Laravel app that has its own authentication system already built. (It's Laravel's built-in concept of Users, but that may or may not matter. Not sure.) So really, I just want this wiki to be on a collection of routes within a larger app, and use the exact same login page and same logins that the rest of the app already uses. Two questions: 1. Is that functionality possible to hack in today without changing BookStack? 2. Would changing BookStack in some way make the process easier for future developers to integrate with custom authentication? 3. If the external system also already has a concept of roles, perhaps there could be some way to integrate BookStack's custom roles with the custom roles that are outside the BookStack system? Also, maybe implementing this could help #75 along?
Author
Owner

@joshlewis commented on GitHub (May 4, 2016):

Maybe what I'm really asking is if BookStack could support being installed into an existing Laravel app with a composer require statement, providing wiki services to a larger app, and requiring that larger app to handle authentication (and other services?) on BookStack's behalf.

@joshlewis commented on GitHub (May 4, 2016): Maybe what I'm really asking is if BookStack could support being installed _into an existing Laravel app_ with a `composer require` statement, providing wiki services to a larger app, and requiring that larger app to handle authentication (and other services?) on BookStack's behalf.
Author
Owner

@ssddanbrown commented on GitHub (May 11, 2016):

Hi @joshlewis, Sorry for my late reply. Answers to your questions:

  1. No, There's a lot tied into the BookStack user system already such as the permissions system.
  2. Possibly, I'm happy to support authentication standards and I'd like to have an API layer in the future which would help all areas of hackery.
  3. Yeah, There could be although I'd like this to be based on a standard, The linked issue for matching up LDAP groups/roles with likely be very specific to LDAP.

I'm doubtful that BookStack could be composer require'd into another application in the future. The use cases for something like this would likely not be worth the extra amount of work it would take to 'modularise' everything since that different parts of BookStack are very much tied together tightly at the moment.

Sorry these aren't the answers you likely hoped for.

@ssddanbrown commented on GitHub (May 11, 2016): Hi @joshlewis, Sorry for my late reply. Answers to your questions: 1. No, There's a lot tied into the BookStack user system already such as the permissions system. 2. Possibly, I'm happy to support authentication standards and I'd like to have an API layer in the future which would help all areas of hackery. 3. Yeah, There could be although I'd like this to be based on a standard, The linked issue for matching up LDAP groups/roles with likely be very specific to LDAP. I'm doubtful that BookStack could be `composer require`'d into another application in the future. The use cases for something like this would likely not be worth the extra amount of work it would take to 'modularise' everything since that different parts of BookStack are very much tied together tightly at the moment. Sorry these aren't the answers you likely hoped for.
Author
Owner

@joshlewis commented on GitHub (May 11, 2016):

Got it. Thank you for the answer nonetheless!

@joshlewis commented on GitHub (May 11, 2016): Got it. Thank you for the answer nonetheless!
Author
Owner

@bonchianglee commented on GitHub (Sep 11, 2018):

Hi @ssddanbrown , may I know any further development for custom authentication? After I found the BookStack, I am very surprise the awesome functionality and the modern design. I would like to integrate the role and user that come from my project.

Below is my suggestion:

  1. Make the service provider extendable, we can extends the service provider to implement our login, maybe it is username and password or a token that bring from my project.
  2. Create the user if the user is new.
  3. Create the role if user's role is new, assign it to the default permission eg. guest/reader only
  4. Update the role every time the user login from custom auth
  5. The permission of the role should be managed by BookStack admin

This all my rough idea, hope this will minimize the transaction between BookStack and other platform.
Lastly hope we can discuss further for implementation if you are considering for my suggestion.

@bonchianglee commented on GitHub (Sep 11, 2018): Hi @ssddanbrown , may I know any further development for custom authentication? After I found the BookStack, I am very surprise the awesome functionality and the modern design. I would like to integrate the role and user that come from my project. Below is my suggestion: 1. Make the service provider extendable, we can extends the service provider to implement our login, maybe it is username and password or a token that bring from my project. 2. Create the user if the user is new. 3. Create the role if user's role is new, assign it to the default permission eg. guest/reader only 4. Update the role every time the user login from custom auth 5. The permission of the role should be managed by BookStack admin This all my rough idea, hope this will minimize the transaction between BookStack and other platform. Lastly hope we can discuss further for implementation if you are considering for my suggestion.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#102