You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-42Lines changed: 19 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,13 +10,7 @@ and supported by OneLogin Inc.
10
10
Warning
11
11
-------
12
12
13
-
Update php-saml to 2.10.4, this version includes a security patch related to
14
-
[signature validations on LogoutRequests/LogoutResponses](https://github.com/onelogin/php-saml/commit/949359f5cad5e1d085c4e5447d9aa8f49a6e82a1)
15
-
16
-
Update php-saml to 2.10.0, this version includes a security patch that contains extra validations that will prevent signature wrapping attacks. [CVE-2016-1000253](https://github.com/distributedweaknessfiling/DWF-Database-Artifacts/blob/ab8ae6e845eb506fbeb10a7e4ccb379f0b4222ca/DWF/2016/1000253/CVE-2016-1000253.json)
17
-
18
-
php-saml < v2.10.0 is vulnerable and allows signature wrapping!
19
-
13
+
This version is compatible with PHP 7.X and does not include xmlseclibs (you will need to install it via composer, dependency described in composer.json)
20
14
21
15
Security Guidelines
22
16
-------------------
@@ -81,23 +75,20 @@ Installation
81
75
82
76
### Dependencies ###
83
77
84
-
*`php >= 5.3.3` and some core extensions like `php-xml`, `php-date`, `php-zlib`.
78
+
*`php >= 5.4` and some core extensions like `php-xml`, `php-date`, `php-zlib`.
85
79
*`openssl`. Install the openssl library. It handles x509 certificates.
86
-
*`mcrypt`. Install that library and its php driver if you gonna handle
87
-
encrypted data (`nameID`, `assertions`).
88
80
*`gettext`. Install that library and its php driver. It handles translations.
89
81
*`curl`. Install that library and its php driver if you plan to use the IdP Metadata parser.
90
82
91
-
Since [PHP 5.3 is officially unsupported](http://php.net/eol.php) we recommend you to use a newer PHP version.
92
-
93
83
### Code ###
94
84
95
85
#### Option 1. Download from github ####
96
86
97
87
The toolkit is hosted on github. You can download it from:
Copy the core of the library inside the php application. (each application has its
103
94
structure so take your time to locate the PHP SAML toolkit in the best place).
@@ -112,6 +103,8 @@ In order to import the saml toolkit to your current php project, execute
112
103
composer require onelogin/php-saml
113
104
```
114
105
106
+
Remember to select the 3.X.X branch
107
+
115
108
After installation has completed you will find at the `vendor/` folder a new folder named `onelogin` and inside the `php-saml`. Make sure you are including the autoloader provided by composer. It can be found at `vendor/autoload.php`.
116
109
117
110
**Important** In this option, the x509 certs must be stored at `vendor/onelogin/php-saml/certs`
@@ -122,7 +115,7 @@ Your settings are at risk of being deleted when updating packages using `compose
122
115
Compatibility
123
116
-------------
124
117
125
-
This 3.X version only supports PHP 7.X..
118
+
This 3.X.X supports PHP 7.X. but can be used with PHP >=5.4 as well (5.6.24+ recommended for security reasons).
126
119
127
120
Namespaces
128
121
----------
@@ -147,7 +140,7 @@ Getting started
147
140
### Knowing the toolkit ###
148
141
149
142
The new OneLogin SAML Toolkit contains different folders (`certs`, `endpoints`,
150
-
`extlib`, `lib`, `demo`, etc.) and some files.
143
+
`lib`, `demo`, etc.) and some files.
151
144
152
145
Let's start describing the folders:
153
146
@@ -172,20 +165,10 @@ cert: `metadata.crt` and `metadata.key`.
172
165
Use `sp_new.crt` if you are in a key rollover process and you want to
173
166
publish that x509certificate on Service Provider metadata.
174
167
175
-
#### `extlib/` ####
176
-
177
-
This folder contains the 3rd party libraries that the toolkit uses. At the
178
-
moment only uses the `xmlseclibs` (autor Robert Richards, BSD Licensed) which
179
-
handle the sign and the encryption of xml elements.
180
-
181
-
182
168
#### `lib/` ####
183
169
184
170
This folder contains the heart of the toolkit, the libraries:
185
171
186
-
*`Saml` folder contains a modified version of the toolkit v.1 and allows the
187
-
old code to keep working. (This library is provided to maintain
188
-
backward compatibility).
189
172
*`Saml2` folder contains the new version of the classes and methods that
190
173
are described in a later section.
191
174
@@ -224,8 +207,6 @@ and support multiple languages.
224
207
advanced_settings.php file which contains extra configuration info related to
225
208
the security, the contact person, and the organization associated to the SP.
226
209
*`_toolkit_loader.php` - This file load the toolkit libraries (The SAML2 lib).
227
-
*`compatibility` - Import that file to make compatible your old code with the
228
-
new toolkit (loads the SAML library).
229
210
230
211
231
212
#### Miscellaneous ####
@@ -563,9 +544,13 @@ $auth = new OneLogin_Saml2_Auth($settingsInfo);
563
544
564
545
#### How load the library ####
565
546
566
-
In order to use the toolkit library you need to import the `_toolkit_loader.php`
567
-
file located on the base folder of the toolkit. You can load this file in this
568
-
way:
547
+
548
+
In order to use the toolkit library, if your project support composer you only
549
+
need to install it with composer (See the installation section) and you are done.
550
+
551
+
552
+
If your project doesn't use composer you need to import the `_toolkit_loader.php`
553
+
file located on the base folder of the toolkit. You can load this file in this way:
0 commit comments