Skip to content

Commit 96ad99e

Browse files
Merge pull request #333 from onelogin/saml-migration
Remove references to onelogin provided support to prepare for transfer to SAML-Toolkits from OneLogin
2 parents ba572e2 + e07d54c commit 96ad99e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+433
-540
lines changed

.github/workflows/python-package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313

1414
jobs:
1515
test:
16-
runs-on: ubuntu-latest
16+
runs-on: ubuntu-20.04
1717
strategy:
1818
fail-fast: false
1919
matrix:
@@ -47,7 +47,7 @@ jobs:
4747
- name: Test
4848
run: make pytest
4949
lint:
50-
runs-on: ubuntu-latest
50+
runs-on: ubuntu-20.04
5151
steps:
5252
- uses: actions/checkout@v2
5353
- uses: actions/setup-python@v2

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2010-2021 OneLogin, Inc.
1+
Copyright (c) 2010-2022 OneLogin, Inc.
22

33
Permission is hereby granted, free of charge, to any person
44
obtaining a copy of this software and associated documentation

README.md

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
# OneLogin's SAML Python Toolkit (compatible with Python3)
1+
# SAML Python Toolkit (compatible with Python3)
22

33
[![Build Status](https://api.travis-ci.org/onelogin/python3-saml.png?branch=master)](http://travis-ci.org/onelogin/python3-saml)
44
[![PyPi Version](https://img.shields.io/pypi/v/python3-saml.svg)](https://pypi.python.org/pypi/python3-saml)
55
![Python versions](https://img.shields.io/pypi/pyversions/python3-saml.svg)
66

7-
## **Notice:** This project is currently not under active development, please see [#320](https://github.com/onelogin/python3-saml/issues/320) for more information.
8-
97
Add SAML support to your Python software using this library.
10-
Forget those complicated libraries and use the open source library provided
11-
and supported by OneLogin Inc.
8+
Forget those complicated libraries and use the open source library provided by the SAML tool community.
129

13-
This version supports Python3. There is a separate version that only support Python2: [python-saml](https://github.com/onelogin/python-saml)
10+
This version supports Python3. Python 2 support was deprecated on Jan 1st, 2020: [python-saml](https://github.com/onelogin/python-saml)
1411

1512
#### Warning ####
1613

@@ -34,7 +31,7 @@ Update ``python3-saml`` to ``>= 1.2.1``, ``1.2.0`` had a bug on signature valida
3431

3532
#### Security Guidelines ####
3633

37-
If you believe you have discovered a security vulnerability in this toolkit, please report it at https://www.onelogin.com/security with a description. We follow responsible disclosure guidelines, and will work with you to quickly find a resolution.
34+
If you believe you have discovered a security vulnerability in this toolkit, please report it in an issue with a description. We follow responsible disclosure guidelines, and will work with you to quickly find a resolution.
3835

3936
Why add SAML support to my software?
4037
------------------------------------
@@ -62,7 +59,7 @@ since 2002, but lately it is becoming popular due its advantages:
6259
General Description
6360
-------------------
6461

65-
OneLogin's SAML Python toolkit lets you turn your Python application into a SP
62+
SAML Python toolkit lets you turn your Python application into a SP
6663
(Service Provider) that can be connected to an IdP (Identity Provider).
6764

6865
**Supports:**
@@ -83,7 +80,6 @@ OneLogin's SAML Python toolkit lets you turn your Python application into a SP
8380
* **Easy to use** - Programmer will be allowed to code high-level and
8481
low-level programming, 2 easy to use APIs are available.
8582
* **Tested** - Thoroughly tested.
86-
* **Popular** - OneLogin's customers use it. Add easy support to your Django/Flask web projects.
8783

8884
Installation
8985
------------
@@ -103,8 +99,8 @@ Review the ``setup.py`` file to know the version of the library that ``python3-s
10399

104100
The toolkit is hosted on GitHub. You can download it from:
105101

106-
* Latest release: https://github.com/onelogin/python3-saml/releases/latest
107-
* Master repo: https://github.com/onelogin/python3-saml/tree/master
102+
* Latest release: https://github.com/saml-toolkits/python3-saml/releases/latest
103+
* Master repo: https://github.com/saml-toolkits/python3-saml/tree/master
108104

109105
Copy the core of the library ``(src/onelogin/saml2 folder)`` and merge the ``setup.py`` inside the Python application. (Each application has its structure so take your time to locate the Python SAML toolkit in the best place).
110106

@@ -148,10 +144,10 @@ SAML Messages have a limited timelife (NotBefore, NotOnOrAfter) that
148144
make harder this kind of attacks, but they are still possible.
149145

150146
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
151-
to be stored the amount of time of the SAML Message life time, so
147+
to be stored the amount of time of the SAML Message life time, so
152148
we don't need to store all processed message/assertion Ids, but the most recent ones.
153149

154-
The OneLogin_Saml2_Auth class contains the [get_last_request_id](https://github.com/onelogin/python3-saml/blob/ab62b0d6f3e5ac2ae8e95ce3ed2f85389252a32d/src/onelogin/saml2/auth.py#L357), [get_last_message_id](https://github.com/onelogin/python3-saml/blob/ab62b0d6f3e5ac2ae8e95ce3ed2f85389252a32d/src/onelogin/saml2/auth.py#L364) and [get_last_assertion_id](https://github.com/onelogin/python3-saml/blob/ab62b0d6f3e5ac2ae8e95ce3ed2f85389252a32d/src/onelogin/saml2/auth.py#L371) methods to retrieve the IDs
150+
The OneLogin_Saml2_Auth class contains the [get_last_request_id](https://github.com/onelogin/python3-saml/blob/ab62b0d6f3e5ac2ae8e95ce3ed2f85389252a32d/src/onelogin/saml2/auth.py#L357), [get_last_message_id](https://github.com/onelogin/python3-saml/blob/ab62b0d6f3e5ac2ae8e95ce3ed2f85389252a32d/src/onelogin/saml2/auth.py#L364) and [get_last_assertion_id](https://github.com/onelogin/python3-saml/blob/ab62b0d6f3e5ac2ae8e95ce3ed2f85389252a32d/src/onelogin/saml2/auth.py#L371) methods to retrieve the IDs
155151

156152
Checking that the ID of the current Message/Assertion does not exists in the lis of the ones already processed will prevent replay attacks.
157153

@@ -161,7 +157,7 @@ Getting Started
161157

162158
### Knowing the toolkit ###
163159

164-
The new OneLogin SAML Toolkit contains different folders (``certs``, ``lib``, ``demo-django``, ``demo-flask`` and ``tests``) and some files.
160+
The new SAML Toolkit contains different folders (``certs``, ``lib``, ``demo-django``, ``demo-flask`` and ``tests``) and some files.
165161

166162
Let's start describing them:
167163

@@ -267,7 +263,7 @@ This is the ``settings.json`` file:
267263
// URL Location where the <Response> from the IdP will be returned
268264
"url": "https://<sp_domain>/?acs",
269265
// SAML protocol binding to be used when returning the <Response>
270-
// message. OneLogin Toolkit supports this endpoint for the
266+
// message. SAML Toolkit supports this endpoint for the
271267
// HTTP-POST binding only.
272268
"binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
273269
},
@@ -279,7 +275,7 @@ This is the ``settings.json`` file:
279275
// OPTIONAL: only specify if different from url parameter
280276
//"responseUrl": "https://<sp_domain>/?sls",
281277
// SAML protocol binding to be used when returning the <Response>
282-
// message. OneLogin Toolkit supports the HTTP-Redirect binding
278+
// message. SAML Toolkit supports the HTTP-Redirect binding
283279
// only for this endpoint.
284280
"binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
285281
},
@@ -289,7 +285,7 @@ This is the ``settings.json`` file:
289285
"attributeConsumingService": {
290286
// OPTIONAL: only specifiy if SP requires this.
291287
// index is an integer which identifies the attributeConsumingService used
292-
// to the SP. OneLogin toolkit supports configuring only one attributeConsumingService
288+
// to the SP. SAML toolkit supports configuring only one attributeConsumingService
293289
// but in certain cases the SP requires a different value. Defaults to '1'.
294290
// "index": '1',
295291
"serviceName": "SP test",
@@ -333,7 +329,7 @@ This is the ``settings.json`` file:
333329
// will be sent.
334330
"url": "https://app.onelogin.com/trust/saml2/http-post/sso/<onelogin_connector_id>",
335331
// SAML protocol binding to be used when returning the <Response>
336-
// message. OneLogin Toolkit supports the HTTP-Redirect binding
332+
// message. SAML Toolkit supports the HTTP-Redirect binding
337333
// only for this endpoint.
338334
"binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
339335
},
@@ -342,10 +338,10 @@ This is the ``settings.json`` file:
342338
// URL Location where the <LogoutRequest> from the IdP will be sent (IdP-initiated logout)
343339
"url": "https://app.onelogin.com/trust/saml2/http-redirect/slo/<onelogin_connector_id>",
344340
// URL Location where the <LogoutResponse> from the IdP will sent (SP-initiated logout, reply)
345-
// OPTIONAL: only specify if different from url parameter
341+
// OPTIONAL: only specify if different from url parameter
346342
"responseUrl": "https://app.onelogin.com/trust/saml2/http-redirect/slo_return/<onelogin_connector_id>",
347343
// SAML protocol binding to be used when returning the <Response>
348-
// message. OneLogin Toolkit supports the HTTP-Redirect binding
344+
// message. SAML Toolkit supports the HTTP-Redirect binding
349345
// only for this endpoint.
350346
"binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
351347
},
@@ -483,7 +479,7 @@ In addition to the required settings data (idp, sp), extra settings can be defin
483479
// 'http://www.w3.org/2001/04/xmldsig-more#sha384'
484480
// 'http://www.w3.org/2001/04/xmlenc#sha512'
485481
'digestAlgorithm': "http://www.w3.org/2001/04/xmlenc#sha256",
486-
482+
487483
// Specify if you want the SP to view assertions with duplicated Name or FriendlyName attributes to be valid
488484
// Defaults to false if not specified
489485
'allowRepeatAttributeName': false,
@@ -562,7 +558,7 @@ There's an easier method -- use a metadata exchange. Metadata is just an XML fi
562558

563559
Using ````parse_remote```` IdP metadata can be obtained and added to the settings without further ado.
564560

565-
Take in mind that the OneLogin_Saml2_IdPMetadataParser class does not validate in any way the URL that is introduced in order to be parsed.
561+
Take in mind that the OneLogin_Saml2_IdPMetadataParser class does not validate in any way the URL that is introduced in order to be parsed.
566562

567563
Usually the same administrator that handles the Service Provider also sets the URL to the IdP, which should be a trusted resource.
568564

@@ -985,7 +981,7 @@ Described below are the main classes and methods that can be invoked from the SA
985981

986982
#### OneLogin_Saml2_Auth - auth.py ####
987983

988-
Main class of OneLogin Python Toolkit
984+
Main class of SAML Python Toolkit
989985

990986
* `__init__` Initializes the SP SAML instance.
991987
* ***login*** Initiates the SSO process.
@@ -1078,7 +1074,7 @@ SAML 2 Logout Response class
10781074

10791075
#### OneLogin_Saml2_Settings - settings.py ####
10801076

1081-
Configuration of the OneLogin Python Toolkit
1077+
Configuration of the SAML Python Toolkit
10821078

10831079
* `__init__` Initializes the settings: Sets the paths of the different folders and Loads settings info from settings file or array/object provided.
10841080
* ***check_settings*** Checks the settings info.
@@ -1246,7 +1242,7 @@ The flask project contains:
12461242

12471243
#### SP setup ####
12481244

1249-
The Onelogin's Python Toolkit allows you to provide the settings info in 2 ways: Settings files or define a setting dict. In the ``demo-flask``, it uses the first method.
1245+
The SAML Python Toolkit allows you to provide the settings info in 2 ways: Settings files or define a setting dict. In the ``demo-flask``, it uses the first method.
12501246

12511247
In the ``index.py`` file we define the ``app.config['SAML_PATH']``, that will target to the ``saml`` folder. We require it in order to load the settings files.
12521248

@@ -1319,7 +1315,7 @@ The tornado project contains:
13191315

13201316
#### SP setup ####
13211317

1322-
The Onelogin's Python Toolkit allows you to provide the settings info in 2 ways: Settings files or define a setting dict. In the ``demo-tornado``, it uses the first method.
1318+
The SAML Python Toolkit allows you to provide the settings info in 2 ways: Settings files or define a setting dict. In the ``demo-tornado``, it uses the first method.
13231319

13241320
In the ``settings.py`` file we define the ``SAML_PATH``, that will target to the ``saml`` folder. We require it in order to load the settings files.
13251321

@@ -1392,7 +1388,7 @@ The django project contains:
13921388

13931389
#### SP setup ####
13941390

1395-
The Onelogin's Python Toolkit allows you to provide the settings info in 2 ways: settings files or define a setting dict. In the demo-django it used the first method.
1391+
The SAML Python Toolkit allows you to provide the settings info in 2 ways: settings files or define a setting dict. In the demo-django it used the first method.
13961392

13971393
After set the ``SAML_FOLDER`` in the ``demo/settings.py``, the settings of the Python toolkit will be loaded on the Django web.
13981394

@@ -1472,7 +1468,7 @@ The Pyramid project contains:
14721468

14731469
#### SP setup ####
14741470

1475-
The Onelogin's Python Toolkit allows you to provide the settings info in 2 ways: settings files or define a setting dict. In ``demo_pyramid`` the first method is used.
1471+
The SAML Python Toolkit allows you to provide the settings info in 2 ways: settings files or define a setting dict. In ``demo_pyramid`` the first method is used.
14761472

14771473
In the ``views.py`` file we define the ``SAML_PATH``, which will target the ``saml`` folder. We require it in order to load the settings files.
14781474

demo-django/saml/certs/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Take care of this folder that could contain private key. Be sure that this folder never is published.
22

3-
Onelogin Python Toolkit expects that certs for the SP could be stored in this folder as:
3+
SAML Python Toolkit expects that certs for the SP could be stored in this folder as:
44

55
* sp.key Private Key
66
* sp.crt Public cert

demo-django/templates/base.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77

8-
<title>A Python SAML Toolkit by OneLogin demo</title>
8+
<title>A Python SAML Toolkit demo</title>
99

1010
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
1111

@@ -18,7 +18,7 @@
1818
</head>
1919
<body>
2020
<div class="container">
21-
<h1>A Python SAML Toolkit by OneLogin demo</h1>
21+
<h1>A Python SAML Toolkit demo</h1>
2222

2323
{% block content %}{% endblock %}
2424
</div>

demo-flask/saml/certs/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Take care of this folder that could contain private key. Be sure that this folder never is published.
22

3-
Onelogin Python Toolkit expects that certs for the SP could be stored in this folder as:
3+
SAML Python Toolkit expects that certs for the SP could be stored in this folder as:
44

55
* sp.key Private Key
66
* sp.crt Public cert

demo-flask/templates/base.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77

8-
<title>A Python SAML Toolkit by OneLogin demo</title>
8+
<title>A Python SAML Toolkit demo</title>
99

1010
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
1111

@@ -18,7 +18,7 @@
1818
</head>
1919
<body>
2020
<div class="container">
21-
<h1>A Python SAML Toolkit by OneLogin demo</h1>
21+
<h1>A Python SAML Toolkit demo</h1>
2222

2323
{% block content %}{% endblock %}
2424
</div>

demo-tornado/saml/certs/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Take care of this folder that could contain private key. Be sure that this folder never is published.
22

3-
Onelogin Python Toolkit expects that certs for the SP could be stored in this folder as:
3+
SAML Python Toolkit expects that certs for the SP could be stored in this folder as:
44

55
* sp.key Private Key
66
* sp.crt Public cert

demo-tornado/templates/base.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77

8-
<title>A Python SAML Toolkit by OneLogin demo</title>
8+
<title>A Python SAML Toolkit demo</title>
99

1010
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
1111

@@ -18,7 +18,7 @@
1818
</head>
1919
<body>
2020
<div class="container">
21-
<h1>A Python SAML Toolkit by OneLogin demo</h1>
21+
<h1>A Python SAML Toolkit demo</h1>
2222

2323
{% block content %}{% end %}
2424
</div>

demo_pyramid/demo_pyramid/saml/certs/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Take care of this folder that could contain private key. Be sure that this folder never is published.
22

3-
Onelogin Python Toolkit expects that certs for the SP could be stored in this folder as:
3+
SAML Python Toolkit expects that certs for the SP could be stored in this folder as:
44

55
* sp.key Private Key
66
* sp.crt Public cert

0 commit comments

Comments
 (0)