dataflow-core 2.1.15rc3__py3-none-any.whl → 2.1.15rc4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dataflow-core might be problematic. Click here for more details.
- authenticator/dataflowhubauthenticator.py +10 -3
- {dataflow_core-2.1.15rc3.dist-info → dataflow_core-2.1.15rc4.dist-info}/METADATA +1 -1
- {dataflow_core-2.1.15rc3.dist-info → dataflow_core-2.1.15rc4.dist-info}/RECORD +6 -6
- {dataflow_core-2.1.15rc3.dist-info → dataflow_core-2.1.15rc4.dist-info}/WHEEL +0 -0
- {dataflow_core-2.1.15rc3.dist-info → dataflow_core-2.1.15rc4.dist-info}/entry_points.txt +0 -0
- {dataflow_core-2.1.15rc3.dist-info → dataflow_core-2.1.15rc4.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import uuid
|
|
3
|
-
import re
|
|
1
|
+
import os, uuid, re, hashlib, secrets
|
|
4
2
|
from datetime import datetime, timedelta
|
|
5
3
|
from zoneinfo import ZoneInfo
|
|
6
4
|
from traitlets import Bool, Unicode
|
|
@@ -77,6 +75,13 @@ class DataflowBaseAuthenticator(Authenticator):
|
|
|
77
75
|
return email.split('@')[0]
|
|
78
76
|
return email
|
|
79
77
|
|
|
78
|
+
def generate_secure_password(self):
|
|
79
|
+
"""Generate a secure random password hash"""
|
|
80
|
+
salt = secrets.token_hex(16)
|
|
81
|
+
random_uuid = str(uuid.uuid4())
|
|
82
|
+
hash_obj = hashlib.sha256((random_uuid + salt).encode())
|
|
83
|
+
return hash_obj.hexdigest()
|
|
84
|
+
|
|
80
85
|
def create_new_user(self, email, first_name=None, last_name=None):
|
|
81
86
|
"""Create a new user with Applicant role"""
|
|
82
87
|
try:
|
|
@@ -103,11 +108,13 @@ class DataflowBaseAuthenticator(Authenticator):
|
|
|
103
108
|
)
|
|
104
109
|
counter += 1
|
|
105
110
|
|
|
111
|
+
secure_password = self.generate_secure_password()
|
|
106
112
|
new_user = m_user.User(
|
|
107
113
|
user_name=username,
|
|
108
114
|
first_name=first_name or username,
|
|
109
115
|
last_name=last_name or "",
|
|
110
116
|
email=email,
|
|
117
|
+
password=secure_password,
|
|
111
118
|
)
|
|
112
119
|
|
|
113
120
|
self.db.add(new_user)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
authenticator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
authenticator/dataflowairflowauthenticator.py,sha256=gEdCiL2yJQ7lYvAwbrjcAkccVMfehoMJldw9eU7cc2s,2243
|
|
3
|
-
authenticator/dataflowhubauthenticator.py,sha256=
|
|
3
|
+
authenticator/dataflowhubauthenticator.py,sha256=0dt8-yeFtty1kq50qxBHafzwuWy8fG00QVnq6svH12c,12913
|
|
4
4
|
authenticator/dataflowsupersetauthenticator.py,sha256=NkAmDaIc-ui-qEolu4xz_UY7P_2g8111hwNjPvAOW1Q,2839
|
|
5
5
|
dataflow/__init__.py,sha256=WTRg8HMpMWSgxYJ9ZGVldx4k07fAbta3mBmZ1hG9mWE,30
|
|
6
6
|
dataflow/configuration.py,sha256=7To6XwH1eESiYp39eqPcswXWwrdBUdPF6xN6WnazOF0,663
|
|
@@ -56,8 +56,8 @@ dfmigration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
56
56
|
dfmigration/env.py,sha256=w_3Kzr3LJCU5l1zBGsNcoNGZyR8fZEtMRsxE-cEqfHQ,1110
|
|
57
57
|
dfmigration/versions/001_initial_baseline_migration.py,sha256=lxjs7LZLs9-c7FQj7t7t49EOfLPPHMLI6iNp0PIBMRA,299
|
|
58
58
|
dfmigration/versions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
59
|
-
dataflow_core-2.1.
|
|
60
|
-
dataflow_core-2.1.
|
|
61
|
-
dataflow_core-2.1.
|
|
62
|
-
dataflow_core-2.1.
|
|
63
|
-
dataflow_core-2.1.
|
|
59
|
+
dataflow_core-2.1.15rc4.dist-info/METADATA,sha256=NM9-0YqN16BHxRN6iHZVfofebsfMK7zVVaL615WttpY,466
|
|
60
|
+
dataflow_core-2.1.15rc4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
61
|
+
dataflow_core-2.1.15rc4.dist-info/entry_points.txt,sha256=ppj_EIbYrJJwCPg1kfdsZk5q1N-Ejfis1neYrnjhO8o,117
|
|
62
|
+
dataflow_core-2.1.15rc4.dist-info/top_level.txt,sha256=-gGoIBh-bUMtzOdna2jsDOdkE2CRu3w3aA7yEFCmNAI,35
|
|
63
|
+
dataflow_core-2.1.15rc4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|