5 // Display name, shown to users, for SAML2 option
6 'name' => env('SAML2_NAME', 'SSO'),
7 // Toggle whether the SAML2 option is active
8 'enabled' => env('SAML2_ENABLED', false),
9 // Enable registration via SAML2 authentication
10 'auto_register' => env('SAML2_AUTO_REGISTER', true),
12 // Dump user details after a login request for debugging purposes
13 'dump_user_details' => env('SAML2_DUMP_USER_DETAILS', false),
15 // Attribute, within a SAML response, to find the user's email address
16 'email_attribute' => env('SAML2_EMAIL_ATTRIBUTE', 'email'),
17 // Attribute, within a SAML response, to find the user's display name
18 'display_name_attributes' => explode('|', env('SAML2_DISPLAY_NAME_ATTRIBUTES', 'username')),
19 // Attribute, within a SAML response, to use to connect a BookStack user to the SAML user.
20 'external_id_attribute' => env('SAML2_EXTERNAL_ID_ATTRIBUTE', null),
23 // Enable syncing, upon login, of SAML2 groups to BookStack groups
24 'user_to_groups' => env('SAML2_USER_TO_GROUPS', false),
25 // Attribute, within a SAML response, to find group names on
26 'group_attribute' => env('SAML2_GROUP_ATTRIBUTE', 'group'),
27 // When syncing groups, remove any groups that no longer match. Otherwise sync only adds new groups.
28 'remove_from_groups' => env('SAML2_REMOVE_FROM_GROUPS', false),
30 // Autoload IDP details from the metadata endpoint
31 'autoload_from_metadata' => env('SAML2_AUTOLOAD_METADATA', false),
33 // Overrides, in JSON format, to the configuration passed to underlying onelogin library.
34 'onelogin_overrides' => env('SAML2_ONELOGIN_OVERRIDES', null),
38 // If 'strict' is True, then the PHP Toolkit will reject unsigned
39 // or unencrypted messages if it expects them signed or encrypted
40 // Also will reject the messages if not strictly follow the SAML
41 // standard: Destination, NameId, Conditions ... are validated too.
44 // Enable debug mode (to print errors)
45 'debug' => env('APP_DEBUG', false),
47 // Set a BaseURL to be used instead of try to guess
48 // the BaseURL of the view that process the SAML Message.
49 // Ex. http://sp.example.com/
50 // http://example.com/sp/
53 // Service Provider Data that we are deploying
55 // Identifier of the SP entity (must be a URI)
58 // Specifies info about where and how the <AuthnResponse> message MUST be
59 // returned to the requester, in this case our SP.
60 'assertionConsumerService' => [
61 // URL Location where the <Response> from the IdP will be returned
63 // SAML protocol binding to be used when returning the <Response>
64 // message. Onelogin Toolkit supports for this endpoint the
65 // HTTP-POST binding only
66 'binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST',
69 // Specifies info about where and how the <Logout Response> message MUST be
70 // returned to the requester, in this case our SP.
71 'singleLogoutService' => [
72 // URL Location where the <Response> from the IdP will be returned
74 // SAML protocol binding to be used when returning the <Response>
75 // message. Onelogin Toolkit supports for this endpoint the
76 // HTTP-Redirect binding only
77 'binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect',
80 // Specifies constraints on the name identifier to be used to
81 // represent the requested subject.
82 // Take a look on lib/Saml2/Constants.php to see the NameIdFormat supported
83 'NameIDFormat' => 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress',
84 // Usually x509cert and privateKey of the SP are provided by files placed at
85 // the certs folder. But we can also provide them with the following parameters
89 // Identity Provider Data that we want connect with our SP
91 // Identifier of the IdP entity (must be a URI)
92 'entityId' => env('SAML2_IDP_ENTITYID', null),
93 // SSO endpoint info of the IdP. (Authentication Request protocol)
94 'singleSignOnService' => [
95 // URL Target of the IdP where the SP will send the Authentication Request Message
96 'url' => env('SAML2_IDP_SSO', null),
97 // SAML protocol binding to be used when returning the <Response>
98 // message. Onelogin Toolkit supports for this endpoint the
99 // HTTP-Redirect binding only
100 'binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect',
102 // SLO endpoint info of the IdP.
103 'singleLogoutService' => [
104 // URL Location of the IdP where the SP will send the SLO Request
105 'url' => env('SAML2_IDP_SLO', null),
106 // URL location of the IdP where the SP will send the SLO Response (ResponseLocation)
107 // if not set, url for the SLO Request will be used
109 // SAML protocol binding to be used when returning the <Response>
110 // message. Onelogin Toolkit supports for this endpoint the
111 // HTTP-Redirect binding only
112 'binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect',
114 // Public x509 certificate of the IdP
115 'x509cert' => env('SAML2_IDP_x509', null),
117 * Instead of use the whole x509cert you can use a fingerprint in
118 * order to validate the SAMLResponse, but we don't recommend to use
119 * that method on production since is exploitable by a collision
121 * (openssl x509 -noout -fingerprint -in "idp.crt" to generate it,
122 * or add for example the -sha256 , -sha384 or -sha512 parameter)
124 * If a fingerprint is provided, then the certFingerprintAlgorithm is required in order to
125 * let the toolkit know which Algorithm was used. Possible values: sha1, sha256, sha384 or sha512
126 * 'sha1' is the default value.
128 // 'certFingerprint' => '',
129 // 'certFingerprintAlgorithm' => 'sha1',
130 /* In some scenarios the IdP uses different certificates for
131 * signing/encryption, or is under key rollover phase and more
132 * than one certificate is published on IdP metadata.
133 * In order to handle that the toolkit offers that parameter.
134 * (when used, 'x509cert' and 'certFingerprint' values are
137 // 'x509certMulti' => array(
138 // 'signing' => array(
139 // 0 => '<cert1-string>',
141 // 'encryption' => array(
142 // 0 => '<cert2-string>',