File tree Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Original file line number Diff line number Diff line change @@ -193,11 +193,17 @@ LDAP_TIME_LIM=600
193193IMPORT_TIME_LIMIT = 600
194194IMPORT_MEMORY_LIMIT = 500M
195195REPORT_TIME_LIMIT = 12000
196- REQUIRE_SAML = false
197196API_THROTTLE_PER_MINUTE = 120
198197CSV_ESCAPE_FORMULAS = true
199198LIVEWIRE_URL_PREFIX = null
200199
200+
201+ # --------------------------------------------
202+ # OPTIONAL: SAML SETTINGS
203+ # --------------------------------------------
204+ REQUIRE_SAML = false
205+ SAML_KEY_SIZE = 2048
206+
201207# --------------------------------------------
202208# OPTIONAL: HASHING
203209# --------------------------------------------
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ public function withValidator($validator)
109109 ];
110110
111111 $ pkey = openssl_pkey_new ([
112- 'private_key_bits ' => 2048 ,
112+ 'private_key_bits ' => config ( ' app.saml_key_size ' ) ,
113113 'private_key_type ' => OPENSSL_KEYTYPE_RSA ,
114114 ]);
115115
Original file line number Diff line number Diff line change 207207
208208 /*
209209 |--------------------------------------------------------------------------
210- | Require SAML Login
210+ | Require SAML Login
211211 |--------------------------------------------------------------------------
212212 |
213213 | Disable the ability to login via form login, and disables the 'nosaml'
220220
221221 'require_saml ' => env ('REQUIRE_SAML ' , false ),
222222
223+ /*
224+ |--------------------------------------------------------------------------
225+ | SAML KEYS
226+ |--------------------------------------------------------------------------
227+ |
228+ | This is the size of the keys used by openssl_pkey_new for SAML authentication.
229+ | The default is 2048 bits, but this can be changed to 3072 or 4096 bits
230+ | for higher security. Note that this will increase the time it takes to
231+ | generate the keys, so it is not recommended to set this to a very high value
232+ | unless you have a specific need for it.
233+ |
234+ | The European Commission now requires at least 3072-bit keys for new SAML certificates
235+ | @link https://github.com/grokability/snipe-it/issues/17386
236+ */
237+
238+ 'saml_key_size ' => env ('SAML_KEY_SIZE ' , 2048 ),
239+
223240
224241 /*
225242 |--------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments