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
+21-21Lines changed: 21 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -172,7 +172,7 @@ A replay attack is basically try to reuse an intercepted valid SAML Message in o
172
172
SAML Messages have a limited timelife (NotBefore, NotOnOrAfter) that
173
173
make harder this kind of attacks, but they are still possible.
174
174
175
-
In order to avoid them, the SP can keep a list of SAML Messages or Assertion IDs alredy valdidated and processed. Those values only need
175
+
In order to avoid them, the SP can keep a list of SAML Messages or Assertion IDs already valdidated and processed. Those values only need
176
176
to be stored the amount of time of the SAML Message life time, so
177
177
we don't need to store all processed message/assertion Ids, but the most recent ones.
178
178
@@ -647,7 +647,7 @@ req = {
647
647
```
648
648
649
649
Each Python framework built its own ``request`` object, you may map its data to match what the SAML toolkit expects.
650
-
Let`s see some examples:
650
+
Let's see some examples:
651
651
652
652
```python
653
653
defprepare_from_django_request(request):
@@ -689,7 +689,7 @@ The ``AuthNRequest`` will be sent signed or unsigned based on the security info
689
689
690
690
The IdP will then return the SAML Response to the user's client. The client is then forwarded to the **Assertion Consumer Service (ACS)** of the SP with this information.
691
691
692
-
We can set a ``return_to``url parameter to the login function and that will be converted as a ``RelayState`` parameter:
692
+
We can set a ``return_to``URL parameter to the login function and that will be converted as a ``RelayState`` parameter:
693
693
694
694
```python
695
695
target_url ='https://example.com'
@@ -711,7 +711,7 @@ auth.get_last_request_id()
711
711
#### The SP Endpoints ####
712
712
713
713
Related to the SP there are 3 important endpoints: The metadata view, the ACS view and the SLS view.
714
-
The toolkit provides examples of those views in the demos, but lets see an example.
714
+
The toolkit provides examples of those views in the demos, but let's see an example.
715
715
716
716
*** SP Metadata ***
717
717
@@ -891,7 +891,7 @@ The Logout Request will be sent signed or unsigned based on the security info of
891
891
892
892
The IdP will return the Logout Response through the user's client to the Single Logout Service (SLS) of the SP.
893
893
894
-
We can set a ``return_to``url parameter to the logout function and that will be converted as a ``RelayState`` parameter:
894
+
We can set a ``return_to``URL parameter to the logout function and that will be converted as a ``RelayState`` parameter:
895
895
896
896
```python
897
897
target_url ='https://example.com'
@@ -1020,7 +1020,7 @@ Main class of SAML Python Toolkit
1020
1020
****logout*** Initiates the SLO process.
1021
1021
****process_response*** Process the SAML Response sent by the IdP.
1022
1022
****process_slo*** Process the SAML Logout Response / Logout Request sent by the IdP.
1023
-
****redirect_to*** Redirects the user to the url past by parameter or to the url that we defined in our SSO Request.
1023
+
****redirect_to*** Redirects the user to the URL passed by parameter or to the URL that we defined in our SSO Request.
1024
1024
****is_authenticated*** Checks if the user is authenticated or not.
1025
1025
****get_attributes*** Returns the set of SAML attributes.
1026
1026
****get_attribute*** Returns the requested SAML attribute.
@@ -1029,8 +1029,8 @@ Main class of SAML Python Toolkit
1029
1029
****get_session_expiration*** Gets the ``SessionNotOnOrAfter`` from the ``AuthnStatement``.
1030
1030
****get_errors*** Returns a list with code errors if something went wrong.
1031
1031
****get_last_error_reason*** Returns the reason of the last error
1032
-
****get_sso_url*** Gets the SSO url.
1033
-
****get_slo_url*** Gets the SLO url.
1032
+
****get_sso_url*** Gets the SSO URL.
1033
+
****get_slo_url*** Gets the SLO URL.
1034
1034
****get_last_request_id*** The ``ID`` of the last Request SAML message generated (``AuthNRequest``, ``LogoutRequest``).
1035
1035
****get_last_authn_contexts*** Returns the list of authentication contexts sent in the last SAML Response.
1036
1036
****build_request_signature*** Builds the Signature of the SAML Request.
@@ -1155,7 +1155,7 @@ Auxiliary class that contains several methods
1155
1155
****validate_xml*** Validates a xml against a schema.
1156
1156
****format_cert*** Returns a X.509 cert (adding header & footer if required).
1157
1157
****format_private_key*** Returns a private key (adding header & footer if required).
1158
-
****redirect*** Executes a redirection to the provided url (or return the target url).
1158
+
****redirect*** Executes a redirection to the provided URL (or return the target URL).
1159
1159
****get_self_url_host*** Returns the protocol + the current host + the port (if different than common ports).
1160
1160
****get_self_host*** Returns the current host.
1161
1161
****is_https*** Checks if https or http.
@@ -1179,7 +1179,7 @@ Auxiliary class that contains several methods
1179
1179
****add_sign*** Adds signature key and senders certificate to an element (Message or Assertion).
1180
1180
****validate_sign*** Validates a signature (Message or Assertion).
1181
1181
****validate_binary_sign*** Validates signed bynary data (Used to validate GET Signature).
1182
-
****def get_encoded_parameter*** Return an url encoded get parameter value
1182
+
****def get_encoded_parameter*** Return an URL encoded get parameter value
@@ -1202,12 +1202,12 @@ Demos included in the toolkit
1202
1202
The toolkit includes 4 demos to teach how use the toolkit (Django, Flask, Pyramid and Bootle projects), take a look on them.
1203
1203
Demos require that SP and IdP are well configured before test it, so edit the settings files.
1204
1204
1205
-
Notice that each python framework has it own way to handle routes/urls and process request, so focus on
1205
+
Notice that each python framework has it own way to handle routes/URLs and process request, so focus on
1206
1206
how it deployed. New demos using other python frameworks are welcome as a contribution.
1207
1207
1208
1208
### Getting Started ###
1209
1209
1210
-
We said that this toolkit includes a demos, lets see how fast is deploy some of them.
1210
+
We said that this toolkit includes a demos, let's see how fast is deploy some of them.
1211
1211
1212
1212
*** Virtualenv ***
1213
1213
@@ -1276,23 +1276,23 @@ First we need to edit the ``saml/settings.json``, configure the SP part and rev
1276
1276
1277
1277
#### IdP setup ####
1278
1278
1279
-
Once the SP is configured, the metadata of the SP is published at the ``/metadata``url. Based on that info, configure the IdP.
1279
+
Once the SP is configured, the metadata of the SP is published at the ``/metadata``URL. Based on that info, configure the IdP.
1280
1280
1281
1281
#### How it works ####
1282
1282
1283
1283
1. First time you access to the main view ``http://localhost:8000``, you can select to login and return to the same view or login and be redirected to ``/?attrs`` (attrs view).
1284
1284
1285
1285
2. When you click:
1286
1286
1287
-
2.1 in the first link, we access to ``/?sso`` (index view). An ``AuthNRequest`` is sent to the IdP, we authenticate at the IdP and then a Response is sent through the user's client to the SP, specifically the Assertion Consumer Service view: /?acs. Notice that a RelayState parameter is set to the url that initiated the process, the index view.
1287
+
2.1 in the first link, we access to ``/?sso`` (index view). An ``AuthNRequest`` is sent to the IdP, we authenticate at the IdP and then a Response is sent through the user's client to the SP, specifically the Assertion Consumer Service view: /?acs. Notice that a RelayState parameter is set to the URL that initiated the process, the index view.
1288
1288
1289
-
2.2 in the second link we access to ``/?attrs`` (attrs view), we will expetience have the same process described at 2.1 with the diference that as ``RelayState`` is set the attrs url.
1289
+
2.2 in the second link we access to ``/?attrs`` (attrs view), we will experience the same process as described at 2.1 with the difference that as ``RelayState`` is set the attrs url.
1290
1290
1291
1291
3. The ``SAMLResponse`` is processed in the ACS ``/?acs``, if the Response is not valid, the process stops here and a message is shown. Otherwise we are redirected to the ``RelayState`` view. a) / or b) ``/?attrs``
1292
1292
1293
1293
4. We are logged in the app and the user attributes are showed. At this point, we can test the single log out functionality.
1294
1294
1295
-
The single log out funcionality could be tested by 2 ways.
1295
+
The single log out functionality could be tested by 2 ways.
1296
1296
1297
1297
5.1 SLO Initiated by SP. Click on the ``logout`` link at the SP, after that a Logout Request is sent to the IdP, the session at the IdP is closed and replies through the client to the SP with a Logout Response (sent to the Single Logout Service endpoint). The SLS endpoint ``/?sls`` of the SP process the Logout Response and if is valid, close the user session of the local app. Notice that the SLO Workflow starts and ends at the SP.
1298
1298
@@ -1333,7 +1333,7 @@ The django project contains:
1333
1333
1334
1334
****demo*** Is the main folder of the django project, that contains the typical files:
1335
1335
****settings.py*** Contains the default parameters of a django project except the SAML_FOLDER parameter, that may contain the path where is located the 'saml' folder.
1336
-
****urls.py*** A file that define url routes. In the demo we defined ``/`` that is related to the index view, ``/attrs`` that is related with the attrs view and ``/metadata``, related to th metadata view.
1336
+
****urls.py*** A file that defines URL routes. In the demo we defined ``/`` that is related to the index view, ``/attrs`` that is related with the attrs view and ``/metadata``, related to th metadata view.
1337
1337
****views.py*** This file contains the views of the django project and some aux methods.
1338
1338
****wsgi.py*** A file that let as deploy django using WSGI, the Python standard for web servers and applications.
1339
1339
@@ -1404,23 +1404,23 @@ First we need to edit the ``saml/settings.json``, configure the SP part and revi
1404
1404
1405
1405
#### IdP setup ####
1406
1406
1407
-
Once the SP is configured, the metadata of the SP is published at the ``/metadata/``url. Based on that info, configure the IdP.
1407
+
Once the SP is configured, the metadata of the SP is published at the ``/metadata/``URL. Based on that info, configure the IdP.
1408
1408
1409
1409
#### How it works ####
1410
1410
1411
1411
1. First time you access to the main view ``http://localhost:6543``, you can select to login and return to the same view or login and be redirected to ``/?attrs`` (attrs view).
1412
1412
1413
1413
2. When you click:
1414
1414
1415
-
2.1 in the first link, we access to ``/?sso`` (index view). An ``AuthNRequest`` is sent to the IdP, we authenticate at the IdP and then a Response is sent through the user's client to the SP, specifically the Assertion Consumer Service view: ``/?acs``. Notice that a RelayState parameter is set to the url that initiated the process, the index view.
1415
+
2.1 in the first link, we access to ``/?sso`` (index view). An ``AuthNRequest`` is sent to the IdP, we authenticate at the IdP and then a Response is sent through the user's client to the SP, specifically the Assertion Consumer Service view: ``/?acs``. Notice that a RelayState parameter is set to the URL that initiated the process, the index view.
1416
1416
1417
-
2.2 in the second link we access to ``/?attrs`` (attrs view), we will expetience have the same process described at 2.1 with the diference that as ``RelayState`` is set the attrs url.
1417
+
2.2 in the second link we access to ``/?attrs`` (attrs view), we will experience the same process as described at 2.1 with the difference that as ``RelayState`` is set the attrs URL.
1418
1418
1419
1419
3. The SAML Response is processed in the ACS ``/?acs``, if the Response is not valid, the process stops here and a message is shown. Otherwise we are redirected to the ``RelayState`` view. a) / or b) ``/?attrs``
1420
1420
1421
1421
4. We are logged in the app and the user attributes are showed. At this point, we can test the single log out functionality.
1422
1422
1423
-
The single log out funcionality could be tested by 2 ways.
1423
+
The single log out functionality could be tested by 2 ways.
1424
1424
1425
1425
5.1 SLO Initiated by SP. Click on the ``logout`` link at the SP, after that a Logout Request is sent to the IdP, the session at the IdP is closed and replies through the client to the SP with a Logout Response (sent to the Single Logout Service endpoint). The SLS endpoint ``/?sls`` of the SP process the Logout Response and if is valid, close the user session of the local app. Notice that the SLO Workflow starts and ends at the SP.
0 commit comments