]> BookStack Code Mirror - website/commitdiff
Helped prevent some .env usage issues
authorDan Brown <redacted>
Tue, 8 Feb 2022 00:31:46 +0000 (00:31 +0000)
committerDan Brown <redacted>
Tue, 8 Feb 2022 00:33:23 +0000 (00:33 +0000)
- Added extra "common issue" for failing credentials (Values that need
  to be quoted).
- Updated LDAP details to shown DN and PASS by default with quoted
  values.

content/docs/admin/debugging.md
content/docs/admin/ldap-auth.md

index 0256105c50f218a5a2a5338a9dc8e3b8d8038147..6b01bb7a544f21b9394fdb103bd5e995ec0ed4e3 100644 (file)
@@ -16,6 +16,7 @@ This page details how you can find out more information about errors you may fac
     - [Blank White Screen on Access](#blank-white-screen-on-access)
     - [No Styles and Large Icons on Access](#no-styles-and-large-icons-on-access)
     - [Broken Links or No Images After APP_URL Change](#broken-links-or-no-images-after-app_url-change)
+    - [Failing Database or Auth System Credentials](#failing-database-or-auth-system-credentials)
 - [Submitting Issues](#submitting-issues)
 
 ### Error Log File
@@ -60,6 +61,15 @@ or those files do not exist.
 - Check that the `APP_URL` option is set in your `.env` file and ensure it matches the URL you're accessing BookStack on (Including the "https://" or "http://" component).
 - Check that you're using the `release` code branch. If you cloned the project without a branch flag, or downloaded the files from GitHub, you may be using the development branch files which does not include some of these required files.
 
+##### Failing Database or Auth System Credentials
+
+If you've used a password in the `.env` file which you are sure is correct, but authentication fails for that service, it may be due to 
+special characters being handled different in the `.env` configuration. Ensure that any such passwords or config options are wrapped in quotes. For example:
+
+```txt
+DB_PASSWORD="hunter#2@"
+```
+
 ##### Broken Links or No Images After APP_URL Change
 
 BookStack will store absolute URL paths for some content, such as images, in the database.
index 9fffb66b153a803ec03bb5d6b1dcf8573150c710..78deafa0889b07db7f502936d40c90c084f9d8c4 100644 (file)
@@ -23,12 +23,12 @@ LDAP_SERVER=example.com:389
 # LDAP_SERVER=ldaps://example.com:636
 
 # The base DN from where users will be searched within
-LDAP_BASE_DN=ou=People,dc=example,dc=com
+LDAP_BASE_DN="ou=People,dc=example,dc=com"
 
 # The full DN and password of the user used to search the server
-# Can both be left as false to bind anonymously
-LDAP_DN=false
-LDAP_PASS=false
+# Can both be left as 'false' (without quotes) to bind anonymously
+LDAP_DN="cn=serviceaccount,ou=People,dc=example,dc=org"
+LDAP_PASS="my#super#secret#password543"
 
 # A filter to use when searching for users
 # The user-provided user-name used to replace any occurrences of '${user}'
@@ -102,7 +102,7 @@ LDAP_THUMBNAIL_ATTRIBUTE=thumbnailPhoto
 BookStack has the ability to sync LDAP user groups with BookStack roles. By default this will match LDAP group names with the BookStack role display names with casing ignored.
 This can be overridden by via the 'External Authentication IDs' field which can be seen when editing a role while LDAP authentication is enabled. This field can be populated with common names (CNs) of accounts *or* groups. If filled, CNs in this field will be used and the role name will be ignored. You can match on multiple CNs by separating them with a comma.
 
-When matching LDAP groups with role names or 'External Authentication IDs' values, BookStack will standardise the names of ldap groups to be lower-cased and spaces will be replaced with hypens. For example, to match a LDAP group named "United Kingdom" an 'External Authentication IDs' value of "united-kingdom" could be used.
+When matching LDAP groups with role names or 'External Authentication IDs' values, BookStack will standardise the names of ldap groups to be lower-cased and spaces will be replaced with hyphens. For example, to match a LDAP group named "United Kingdom" an 'External Authentication IDs' value of "united-kingdom" could be used.
 
 This feature requires the LDAP server to be able to provide user groups when queried. This is enabled by default on ActiveDirectory via the 'memberOf' attribute but other LDAP systems may need to be configured to enable such functionality. Be aware that the 'memberOf' attribute does not include the user's primary group. If using OpenLDAP you'll need to setup the memberof overlay.