perun.proxy.utils 2.0.0__tar.gz → 2.1.0__tar.gz

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.
Files changed (35) hide show
  1. perun.proxy.utils-2.1.0/PKG-INFO +212 -0
  2. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/README.md +35 -11
  3. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun/proxy/utils/nagios/check_saml.py +22 -6
  4. perun.proxy.utils-2.1.0/perun.proxy.utils.egg-info/PKG-INFO +212 -0
  5. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun.proxy.utils.egg-info/entry_points.txt +0 -1
  6. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/setup.cfg +1 -1
  7. perun.proxy.utils-2.0.0/PKG-INFO +0 -177
  8. perun.proxy.utils-2.0.0/perun.proxy.utils.egg-info/PKG-INFO +0 -177
  9. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/LICENSE +0 -0
  10. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun/proxy/utils/__init__.py +0 -0
  11. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun/proxy/utils/metadata_expiration.py +0 -0
  12. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun/proxy/utils/nagios/__init__.py +0 -0
  13. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun/proxy/utils/nagios/check_custom_command.py +0 -0
  14. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun/proxy/utils/nagios/check_dockers.py +0 -0
  15. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun/proxy/utils/nagios/check_exabgp_propagation.py +0 -0
  16. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun/proxy/utils/nagios/check_ldap.py +0 -0
  17. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun/proxy/utils/nagios/check_ldap_syncrepl.py +0 -0
  18. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun/proxy/utils/nagios/check_mongodb.py +0 -0
  19. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun/proxy/utils/nagios/check_nginx.py +0 -0
  20. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun/proxy/utils/nagios/check_pgsql.py +0 -0
  21. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun/proxy/utils/nagios/check_php_syntax.py +0 -0
  22. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun/proxy/utils/nagios/check_privacyidea.py +0 -0
  23. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun/proxy/utils/nagios/check_rpc_status.py +0 -0
  24. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun/proxy/utils/nagios/check_user_logins.py +0 -0
  25. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun/proxy/utils/nagios/webserver_availability.py +0 -0
  26. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun/proxy/utils/print_docker_versions.py +0 -0
  27. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun/proxy/utils/run_probes.py +0 -0
  28. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun/proxy/utils/run_version_script.py +0 -0
  29. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun/proxy/utils/separate_oidc_logs.py +0 -0
  30. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun/proxy/utils/separate_ssp_logs.py +0 -0
  31. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun.proxy.utils.egg-info/SOURCES.txt +0 -0
  32. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun.proxy.utils.egg-info/dependency_links.txt +0 -0
  33. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun.proxy.utils.egg-info/requires.txt +6 -6
  34. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/perun.proxy.utils.egg-info/top_level.txt +0 -0
  35. {perun.proxy.utils-2.0.0 → perun.proxy.utils-2.1.0}/setup.py +0 -0
@@ -0,0 +1,212 @@
1
+ Metadata-Version: 2.1
2
+ Name: perun.proxy.utils
3
+ Version: 2.1.0
4
+ Summary: Module with utilities and monitoring probes
5
+ Home-page: https://gitlab.ics.muni.cz/perun-proxy-aai/proxyidp-scripts.git
6
+ Requires-Python: >=3.9
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Requires-Dist: setuptools
10
+ Requires-Dist: pymongo~=4.3
11
+ Requires-Dist: asyncssh~=2.13
12
+ Requires-Dist: docker~=6.0
13
+ Requires-Dist: beautifulsoup4~=4.12
14
+ Requires-Dist: requests~=2.31
15
+ Requires-Dist: PyYAML<7.0,>=5.4
16
+ Requires-Dist: check_nginx_status~=1.0
17
+ Requires-Dist: pyotp~=2.9
18
+ Provides-Extra: ldap
19
+ Requires-Dist: ldap3~=2.9.1; extra == "ldap"
20
+ Requires-Dist: check_syncrepl_extended~=2020.13; extra == "ldap"
21
+ Provides-Extra: postgresql
22
+ Requires-Dist: psycopg2-binary~=2.9; extra == "postgresql"
23
+
24
+ # Perun proxy utils
25
+
26
+ Scripts and monitoring probes related to Perun ProxyIdP.
27
+
28
+ ## Installation
29
+
30
+ Install via pip:
31
+
32
+ ```sh
33
+ pip install perun.proxy.utils
34
+ ```
35
+
36
+ There are several extras which are required only for some scripts:
37
+
38
+ - `[ldap]` for check_ldap and check_ldap_syncrepl
39
+ - this also requires
40
+ installing [build prerequisites of the python-ldap library](https://www.python-ldap.org/en/latest/installing.html#build-prerequisites)
41
+ - `[postgresql]` for check_pgsql
42
+
43
+ ## Scripts
44
+
45
+ ### run_probes
46
+
47
+ - script designed to execute multiple monitoring probes
48
+ - output is compatible with CheckMK
49
+ - it is required to put configuration file to `/etc/run_probes_cfg.yaml`
50
+
51
+ For usage instructions, run:
52
+
53
+ ```sh
54
+ run_probes
55
+ ```
56
+
57
+ ### separate_ssp_script.py
58
+
59
+ - Script for remove all logs from test accounts from SimpleSAMLlogs
60
+
61
+ - Params:
62
+ - 1 - The file name
63
+
64
+ ### backup_database.sh
65
+
66
+ - Do mysqldump into `/opt/mariadb_backup` and remove all dump file older than 7 days
67
+
68
+ ### separate_oidc_logs.py
69
+
70
+ - Script for remove all logs from test accounts from OIDC logs
71
+
72
+ ### metadata_expiration.py
73
+
74
+ - This script checks whether there are some metadata close to expiration date
75
+
76
+ - Params:
77
+ - 1 - url to a page which prints a time when expires the metadata closest to
78
+ expiration
79
+
80
+ ### print_docker_versions.py
81
+
82
+ - This script collects system info, docker engine info and the versions of running
83
+ containers and then prints it to the stdout in the JSON format
84
+ - A python [docker library](https://pypi.org/project/docker/) is needed to run the
85
+ script
86
+
87
+ - Options:
88
+ - -e,--exclude NAMES - space delimited string of container names to exclude from the
89
+ listing
90
+
91
+ ### run_version_script.py
92
+
93
+ - This scripts runs the print_docker_version.py script on the given machines. The
94
+ collected versions are then printed as a MD table to the stdout
95
+
96
+ - Options:
97
+ - -e,--exclude NAMES - space delimited string of container names to exclude from the
98
+ listing
99
+ - Params:
100
+ - 1... - machines to run the script on in the form of user@adress, the user needs
101
+ root privileges to execute the script
102
+
103
+ ## Nagios probes
104
+
105
+ All nagios scripts are located under `nagios` directory.
106
+
107
+ ### check_mongodb
108
+
109
+ Nagios monitoring probe for mongodb.
110
+
111
+ Tested options:
112
+
113
+ - connect
114
+ - connections
115
+ - replication_lag
116
+ - replset_state
117
+
118
+ (some possible options may not work since there are constructs which are not supported
119
+ by the latest mongodb versions)
120
+
121
+ For usage instructions, run:
122
+
123
+ ```sh
124
+ check_mongodb --help
125
+ ```
126
+
127
+ ### check_saml.py
128
+
129
+ SAML authentication check compatible with SimpleSAMLphp and mitreID.
130
+
131
+ Basic OIDC check can be triggered by adding `--basic-oidc-check` switch. This checks
132
+ for `state` and `code` parameters in the result url after a log in attempt.
133
+
134
+ For more usage instructions, run:
135
+
136
+ ```sh
137
+ check_saml --help
138
+ ```
139
+
140
+ Example:
141
+
142
+ ```sh
143
+ python3 check_saml.py
144
+ --username "my_username"
145
+ --password "my_password"
146
+ --username-field "j_username"
147
+ --password-field "j_password"
148
+ --postlogout-string "Successful logout"
149
+ ```
150
+
151
+ ### check_user_logins.py
152
+
153
+ Check users which login in repeatedly more often than a specified threshold (logins per
154
+ seconds).
155
+
156
+ For usage instructions, run:
157
+
158
+ ```sh
159
+ check_user_logins --help
160
+ ```
161
+
162
+ Example:
163
+
164
+ ```sh
165
+ python3 check_user_logins.py
166
+ -p /var/log/proxyaai/simplesamlphp/simplesamlphp/simplesamlphp.log
167
+ -l 5
168
+ -s 60
169
+ -r "^(?P<datetime>.{20}).*audit-login.* (?P<userid>[0-9]+)@muni\.cz$"
170
+ -d "%b %d %Y %H:%M:%S"
171
+ ```
172
+
173
+ ### check_ldap
174
+
175
+ Check whether an LDAP server is available.
176
+
177
+ For usage instructions, run:
178
+
179
+ ```sh
180
+ check_ldap --help
181
+ ```
182
+
183
+ ### check_ldap_syncrepl
184
+
185
+ Check whether an LDAP replica is up to date with the provider.
186
+
187
+ #### Usage
188
+
189
+ ```sh
190
+ check_ldap_syncrepl --help
191
+ ```
192
+
193
+ ### check_privacyidea
194
+
195
+ Check whether privacyidea is available by performing TOTP authentication via the API.
196
+ Use caching arguments for avoiding failure when one TOTP code is used two times.
197
+
198
+ For usage instructions, run:
199
+
200
+ ```sh
201
+ check_privacyidea --help
202
+ ```
203
+
204
+ ### check_pgsql
205
+
206
+ Check connection to PostgreSQL using a configurable query.
207
+
208
+ For usage instructions, run:
209
+
210
+ ```sh
211
+ check_pgsql --help
212
+ ```
@@ -13,7 +13,8 @@ pip install perun.proxy.utils
13
13
  There are several extras which are required only for some scripts:
14
14
 
15
15
  - `[ldap]` for check_ldap and check_ldap_syncrepl
16
- - this also requires installing [build prerequisites of the python-ldap library](https://www.python-ldap.org/en/latest/installing.html#build-prerequisites)
16
+ - this also requires
17
+ installing [build prerequisites of the python-ldap library](https://www.python-ldap.org/en/latest/installing.html#build-prerequisites)
17
18
  - `[postgresql]` for check_pgsql
18
19
 
19
20
  ## Scripts
@@ -50,24 +51,31 @@ run_probes
50
51
  - This script checks whether there are some metadata close to expiration date
51
52
 
52
53
  - Params:
53
- - 1 - url to a page which prints a time when expires the metadata closest to expiration
54
+ - 1 - url to a page which prints a time when expires the metadata closest to
55
+ expiration
54
56
 
55
57
  ### print_docker_versions.py
56
58
 
57
- - This script collects system info, docker engine info and the versions of running containers and then prints it to the stdout in the JSON format
58
- - A python [docker library](https://pypi.org/project/docker/) is needed to run the script
59
+ - This script collects system info, docker engine info and the versions of running
60
+ containers and then prints it to the stdout in the JSON format
61
+ - A python [docker library](https://pypi.org/project/docker/) is needed to run the
62
+ script
59
63
 
60
64
  - Options:
61
- - -e,--exclude NAMES - space delimited string of container names to exclude from the listing
65
+ - -e,--exclude NAMES - space delimited string of container names to exclude from the
66
+ listing
62
67
 
63
68
  ### run_version_script.py
64
69
 
65
- - This scripts runs the print_docker_version.py script on the given machines. The collected versions are then printed as a MD table to the stdout
70
+ - This scripts runs the print_docker_version.py script on the given machines. The
71
+ collected versions are then printed as a MD table to the stdout
66
72
 
67
73
  - Options:
68
- - -e,--exclude NAMES - space delimited string of container names to exclude from the listing
74
+ - -e,--exclude NAMES - space delimited string of container names to exclude from the
75
+ listing
69
76
  - Params:
70
- - 1... - machines to run the script on in the form of user@adress, the user needs root privileges to execute the script
77
+ - 1... - machines to run the script on in the form of user@adress, the user needs
78
+ root privileges to execute the script
71
79
 
72
80
  ## Nagios probes
73
81
 
@@ -84,7 +92,8 @@ Tested options:
84
92
  - replication_lag
85
93
  - replset_state
86
94
 
87
- (some possible options may not work since there are constructs which are not supported by the latest mongodb versions)
95
+ (some possible options may not work since there are constructs which are not supported
96
+ by the latest mongodb versions)
88
97
 
89
98
  For usage instructions, run:
90
99
 
@@ -96,15 +105,30 @@ check_mongodb --help
96
105
 
97
106
  SAML authentication check compatible with SimpleSAMLphp and mitreID.
98
107
 
99
- For usage instructions, run:
108
+ Basic OIDC check can be triggered by adding `--basic-oidc-check` switch. This checks
109
+ for `state` and `code` parameters in the result url after a log in attempt.
110
+
111
+ For more usage instructions, run:
100
112
 
101
113
  ```sh
102
114
  check_saml --help
103
115
  ```
104
116
 
117
+ Example:
118
+
119
+ ```sh
120
+ python3 check_saml.py
121
+ --username "my_username"
122
+ --password "my_password"
123
+ --username-field "j_username"
124
+ --password-field "j_password"
125
+ --postlogout-string "Successful logout"
126
+ ```
127
+
105
128
  ### check_user_logins.py
106
129
 
107
- Check users which login in repeatedly more often than a specified threshold (logins per seconds).
130
+ Check users which login in repeatedly more often than a specified threshold (logins per
131
+ seconds).
108
132
 
109
133
  For usage instructions, run:
110
134
 
@@ -4,21 +4,21 @@
4
4
  make a full roundtrip test for SAML based SSO
5
5
  """
6
6
 
7
+ import argparse
7
8
  import base64
8
9
  import hmac
10
+ import http.cookiejar
9
11
  import os
12
+ import re
13
+ import ssl
10
14
  import struct
11
- import argparse
12
15
  import sys
16
+ import tempfile
13
17
  import time
14
- import urllib.request
15
18
  import urllib.error
16
19
  import urllib.parse
17
- import ssl
18
- import tempfile
19
- import re
20
+ import urllib.request
20
21
  from html.parser import HTMLParser
21
- import http.cookiejar
22
22
 
23
23
  STATUS = {"OK": 0, "WARNING": 1, "CRITICAL": 2, "UNKNOWN": 3}
24
24
 
@@ -197,6 +197,11 @@ def get_args():
197
197
  default="check_saml_cache",
198
198
  help="name of the file used for the cache",
199
199
  )
200
+ parser.add_argument(
201
+ "--basic-oidc-check",
202
+ action="store_true",
203
+ help="check for presence of state and code parameters in the result",
204
+ )
200
205
 
201
206
  return parser.parse_args()
202
207
 
@@ -508,6 +513,17 @@ class SAMLChecker:
508
513
  "WARNING",
509
514
  )
510
515
 
516
+ if self.args.basic_oidc_check:
517
+ mandatory_parameters = ["code=", "state="]
518
+ for param in mandatory_parameters:
519
+ if param not in response_url:
520
+ if self.args.verbose >= 3:
521
+ print(response_url)
522
+ self.finish(
523
+ f"Missing mandatory parameter '{param}' in response url.",
524
+ "CRITICAL",
525
+ )
526
+
511
527
  if not self.args.skip_logout_check:
512
528
  # test logout
513
529
  logout_html, logout_url = self.initial_request(self.args.logout_url)
@@ -0,0 +1,212 @@
1
+ Metadata-Version: 2.1
2
+ Name: perun.proxy.utils
3
+ Version: 2.1.0
4
+ Summary: Module with utilities and monitoring probes
5
+ Home-page: https://gitlab.ics.muni.cz/perun-proxy-aai/proxyidp-scripts.git
6
+ Requires-Python: >=3.9
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Requires-Dist: setuptools
10
+ Requires-Dist: pymongo~=4.3
11
+ Requires-Dist: asyncssh~=2.13
12
+ Requires-Dist: docker~=6.0
13
+ Requires-Dist: beautifulsoup4~=4.12
14
+ Requires-Dist: requests~=2.31
15
+ Requires-Dist: PyYAML<7.0,>=5.4
16
+ Requires-Dist: check_nginx_status~=1.0
17
+ Requires-Dist: pyotp~=2.9
18
+ Provides-Extra: ldap
19
+ Requires-Dist: ldap3~=2.9.1; extra == "ldap"
20
+ Requires-Dist: check_syncrepl_extended~=2020.13; extra == "ldap"
21
+ Provides-Extra: postgresql
22
+ Requires-Dist: psycopg2-binary~=2.9; extra == "postgresql"
23
+
24
+ # Perun proxy utils
25
+
26
+ Scripts and monitoring probes related to Perun ProxyIdP.
27
+
28
+ ## Installation
29
+
30
+ Install via pip:
31
+
32
+ ```sh
33
+ pip install perun.proxy.utils
34
+ ```
35
+
36
+ There are several extras which are required only for some scripts:
37
+
38
+ - `[ldap]` for check_ldap and check_ldap_syncrepl
39
+ - this also requires
40
+ installing [build prerequisites of the python-ldap library](https://www.python-ldap.org/en/latest/installing.html#build-prerequisites)
41
+ - `[postgresql]` for check_pgsql
42
+
43
+ ## Scripts
44
+
45
+ ### run_probes
46
+
47
+ - script designed to execute multiple monitoring probes
48
+ - output is compatible with CheckMK
49
+ - it is required to put configuration file to `/etc/run_probes_cfg.yaml`
50
+
51
+ For usage instructions, run:
52
+
53
+ ```sh
54
+ run_probes
55
+ ```
56
+
57
+ ### separate_ssp_script.py
58
+
59
+ - Script for remove all logs from test accounts from SimpleSAMLlogs
60
+
61
+ - Params:
62
+ - 1 - The file name
63
+
64
+ ### backup_database.sh
65
+
66
+ - Do mysqldump into `/opt/mariadb_backup` and remove all dump file older than 7 days
67
+
68
+ ### separate_oidc_logs.py
69
+
70
+ - Script for remove all logs from test accounts from OIDC logs
71
+
72
+ ### metadata_expiration.py
73
+
74
+ - This script checks whether there are some metadata close to expiration date
75
+
76
+ - Params:
77
+ - 1 - url to a page which prints a time when expires the metadata closest to
78
+ expiration
79
+
80
+ ### print_docker_versions.py
81
+
82
+ - This script collects system info, docker engine info and the versions of running
83
+ containers and then prints it to the stdout in the JSON format
84
+ - A python [docker library](https://pypi.org/project/docker/) is needed to run the
85
+ script
86
+
87
+ - Options:
88
+ - -e,--exclude NAMES - space delimited string of container names to exclude from the
89
+ listing
90
+
91
+ ### run_version_script.py
92
+
93
+ - This scripts runs the print_docker_version.py script on the given machines. The
94
+ collected versions are then printed as a MD table to the stdout
95
+
96
+ - Options:
97
+ - -e,--exclude NAMES - space delimited string of container names to exclude from the
98
+ listing
99
+ - Params:
100
+ - 1... - machines to run the script on in the form of user@adress, the user needs
101
+ root privileges to execute the script
102
+
103
+ ## Nagios probes
104
+
105
+ All nagios scripts are located under `nagios` directory.
106
+
107
+ ### check_mongodb
108
+
109
+ Nagios monitoring probe for mongodb.
110
+
111
+ Tested options:
112
+
113
+ - connect
114
+ - connections
115
+ - replication_lag
116
+ - replset_state
117
+
118
+ (some possible options may not work since there are constructs which are not supported
119
+ by the latest mongodb versions)
120
+
121
+ For usage instructions, run:
122
+
123
+ ```sh
124
+ check_mongodb --help
125
+ ```
126
+
127
+ ### check_saml.py
128
+
129
+ SAML authentication check compatible with SimpleSAMLphp and mitreID.
130
+
131
+ Basic OIDC check can be triggered by adding `--basic-oidc-check` switch. This checks
132
+ for `state` and `code` parameters in the result url after a log in attempt.
133
+
134
+ For more usage instructions, run:
135
+
136
+ ```sh
137
+ check_saml --help
138
+ ```
139
+
140
+ Example:
141
+
142
+ ```sh
143
+ python3 check_saml.py
144
+ --username "my_username"
145
+ --password "my_password"
146
+ --username-field "j_username"
147
+ --password-field "j_password"
148
+ --postlogout-string "Successful logout"
149
+ ```
150
+
151
+ ### check_user_logins.py
152
+
153
+ Check users which login in repeatedly more often than a specified threshold (logins per
154
+ seconds).
155
+
156
+ For usage instructions, run:
157
+
158
+ ```sh
159
+ check_user_logins --help
160
+ ```
161
+
162
+ Example:
163
+
164
+ ```sh
165
+ python3 check_user_logins.py
166
+ -p /var/log/proxyaai/simplesamlphp/simplesamlphp/simplesamlphp.log
167
+ -l 5
168
+ -s 60
169
+ -r "^(?P<datetime>.{20}).*audit-login.* (?P<userid>[0-9]+)@muni\.cz$"
170
+ -d "%b %d %Y %H:%M:%S"
171
+ ```
172
+
173
+ ### check_ldap
174
+
175
+ Check whether an LDAP server is available.
176
+
177
+ For usage instructions, run:
178
+
179
+ ```sh
180
+ check_ldap --help
181
+ ```
182
+
183
+ ### check_ldap_syncrepl
184
+
185
+ Check whether an LDAP replica is up to date with the provider.
186
+
187
+ #### Usage
188
+
189
+ ```sh
190
+ check_ldap_syncrepl --help
191
+ ```
192
+
193
+ ### check_privacyidea
194
+
195
+ Check whether privacyidea is available by performing TOTP authentication via the API.
196
+ Use caching arguments for avoiding failure when one TOTP code is used two times.
197
+
198
+ For usage instructions, run:
199
+
200
+ ```sh
201
+ check_privacyidea --help
202
+ ```
203
+
204
+ ### check_pgsql
205
+
206
+ Check connection to PostgreSQL using a configurable query.
207
+
208
+ For usage instructions, run:
209
+
210
+ ```sh
211
+ check_pgsql --help
212
+ ```
@@ -19,4 +19,3 @@ run_probes = perun.proxy.utils.run_probes:main
19
19
  run_version_script = perun.proxy.utils.run_version_script:main
20
20
  separate_oidc_logs = perun.proxy.utils.separate_oidc_logs:main
21
21
  separate_ssp_logs = perun.proxy.utils.separate_ssp_logs:main
22
-
@@ -1,5 +1,5 @@
1
1
  [metadata]
2
- version = 2.0.0
2
+ version = 2.1.0
3
3
  license_files = LICENSE
4
4
  long_description = file: README.md
5
5
  long_description_content_type = text/markdown
@@ -1,177 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: perun.proxy.utils
3
- Version: 2.0.0
4
- Summary: Module with utilities and monitoring probes
5
- Home-page: https://gitlab.ics.muni.cz/perun-proxy-aai/proxyidp-scripts.git
6
- License: UNKNOWN
7
- Description: # Perun proxy utils
8
-
9
- Scripts and monitoring probes related to Perun ProxyIdP.
10
-
11
- ## Installation
12
-
13
- Install via pip:
14
-
15
- ```sh
16
- pip install perun.proxy.utils
17
- ```
18
-
19
- There are several extras which are required only for some scripts:
20
-
21
- - `[ldap]` for check_ldap and check_ldap_syncrepl
22
- - this also requires installing [build prerequisites of the python-ldap library](https://www.python-ldap.org/en/latest/installing.html#build-prerequisites)
23
- - `[postgresql]` for check_pgsql
24
-
25
- ## Scripts
26
-
27
- ### run_probes
28
-
29
- - script designed to execute multiple monitoring probes
30
- - output is compatible with CheckMK
31
- - it is required to put configuration file to `/etc/run_probes_cfg.yaml`
32
-
33
- For usage instructions, run:
34
-
35
- ```sh
36
- run_probes
37
- ```
38
-
39
- ### separate_ssp_script.py
40
-
41
- - Script for remove all logs from test accounts from SimpleSAMLlogs
42
-
43
- - Params:
44
- - 1 - The file name
45
-
46
- ### backup_database.sh
47
-
48
- - Do mysqldump into `/opt/mariadb_backup` and remove all dump file older than 7 days
49
-
50
- ### separate_oidc_logs.py
51
-
52
- - Script for remove all logs from test accounts from OIDC logs
53
-
54
- ### metadata_expiration.py
55
-
56
- - This script checks whether there are some metadata close to expiration date
57
-
58
- - Params:
59
- - 1 - url to a page which prints a time when expires the metadata closest to expiration
60
-
61
- ### print_docker_versions.py
62
-
63
- - This script collects system info, docker engine info and the versions of running containers and then prints it to the stdout in the JSON format
64
- - A python [docker library](https://pypi.org/project/docker/) is needed to run the script
65
-
66
- - Options:
67
- - -e,--exclude NAMES - space delimited string of container names to exclude from the listing
68
-
69
- ### run_version_script.py
70
-
71
- - This scripts runs the print_docker_version.py script on the given machines. The collected versions are then printed as a MD table to the stdout
72
-
73
- - Options:
74
- - -e,--exclude NAMES - space delimited string of container names to exclude from the listing
75
- - Params:
76
- - 1... - machines to run the script on in the form of user@adress, the user needs root privileges to execute the script
77
-
78
- ## Nagios probes
79
-
80
- All nagios scripts are located under `nagios` directory.
81
-
82
- ### check_mongodb
83
-
84
- Nagios monitoring probe for mongodb.
85
-
86
- Tested options:
87
-
88
- - connect
89
- - connections
90
- - replication_lag
91
- - replset_state
92
-
93
- (some possible options may not work since there are constructs which are not supported by the latest mongodb versions)
94
-
95
- For usage instructions, run:
96
-
97
- ```sh
98
- check_mongodb --help
99
- ```
100
-
101
- ### check_saml.py
102
-
103
- SAML authentication check compatible with SimpleSAMLphp and mitreID.
104
-
105
- For usage instructions, run:
106
-
107
- ```sh
108
- check_saml --help
109
- ```
110
-
111
- ### check_user_logins.py
112
-
113
- Check users which login in repeatedly more often than a specified threshold (logins per seconds).
114
-
115
- For usage instructions, run:
116
-
117
- ```sh
118
- check_user_logins --help
119
- ```
120
-
121
- Example:
122
-
123
- ```sh
124
- python3 check_user_logins.py
125
- -p /var/log/proxyaai/simplesamlphp/simplesamlphp/simplesamlphp.log
126
- -l 5
127
- -s 60
128
- -r "^(?P<datetime>.{20}).*audit-login.* (?P<userid>[0-9]+)@muni\.cz$"
129
- -d "%b %d %Y %H:%M:%S"
130
- ```
131
-
132
- ### check_ldap
133
-
134
- Check whether an LDAP server is available.
135
-
136
- For usage instructions, run:
137
-
138
- ```sh
139
- check_ldap --help
140
- ```
141
-
142
- ### check_ldap_syncrepl
143
-
144
- Check whether an LDAP replica is up to date with the provider.
145
-
146
- #### Usage
147
-
148
- ```sh
149
- check_ldap_syncrepl --help
150
- ```
151
-
152
- ### check_privacyidea
153
-
154
- Check whether privacyidea is available by performing TOTP authentication via the API.
155
- Use caching arguments for avoiding failure when one TOTP code is used two times.
156
-
157
- For usage instructions, run:
158
-
159
- ```sh
160
- check_privacyidea --help
161
- ```
162
-
163
- ### check_pgsql
164
-
165
- Check connection to PostgreSQL using a configurable query.
166
-
167
- For usage instructions, run:
168
-
169
- ```sh
170
- check_pgsql --help
171
- ```
172
-
173
- Platform: UNKNOWN
174
- Requires-Python: >=3.9
175
- Description-Content-Type: text/markdown
176
- Provides-Extra: ldap
177
- Provides-Extra: postgresql
@@ -1,177 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: perun.proxy.utils
3
- Version: 2.0.0
4
- Summary: Module with utilities and monitoring probes
5
- Home-page: https://gitlab.ics.muni.cz/perun-proxy-aai/proxyidp-scripts.git
6
- License: UNKNOWN
7
- Description: # Perun proxy utils
8
-
9
- Scripts and monitoring probes related to Perun ProxyIdP.
10
-
11
- ## Installation
12
-
13
- Install via pip:
14
-
15
- ```sh
16
- pip install perun.proxy.utils
17
- ```
18
-
19
- There are several extras which are required only for some scripts:
20
-
21
- - `[ldap]` for check_ldap and check_ldap_syncrepl
22
- - this also requires installing [build prerequisites of the python-ldap library](https://www.python-ldap.org/en/latest/installing.html#build-prerequisites)
23
- - `[postgresql]` for check_pgsql
24
-
25
- ## Scripts
26
-
27
- ### run_probes
28
-
29
- - script designed to execute multiple monitoring probes
30
- - output is compatible with CheckMK
31
- - it is required to put configuration file to `/etc/run_probes_cfg.yaml`
32
-
33
- For usage instructions, run:
34
-
35
- ```sh
36
- run_probes
37
- ```
38
-
39
- ### separate_ssp_script.py
40
-
41
- - Script for remove all logs from test accounts from SimpleSAMLlogs
42
-
43
- - Params:
44
- - 1 - The file name
45
-
46
- ### backup_database.sh
47
-
48
- - Do mysqldump into `/opt/mariadb_backup` and remove all dump file older than 7 days
49
-
50
- ### separate_oidc_logs.py
51
-
52
- - Script for remove all logs from test accounts from OIDC logs
53
-
54
- ### metadata_expiration.py
55
-
56
- - This script checks whether there are some metadata close to expiration date
57
-
58
- - Params:
59
- - 1 - url to a page which prints a time when expires the metadata closest to expiration
60
-
61
- ### print_docker_versions.py
62
-
63
- - This script collects system info, docker engine info and the versions of running containers and then prints it to the stdout in the JSON format
64
- - A python [docker library](https://pypi.org/project/docker/) is needed to run the script
65
-
66
- - Options:
67
- - -e,--exclude NAMES - space delimited string of container names to exclude from the listing
68
-
69
- ### run_version_script.py
70
-
71
- - This scripts runs the print_docker_version.py script on the given machines. The collected versions are then printed as a MD table to the stdout
72
-
73
- - Options:
74
- - -e,--exclude NAMES - space delimited string of container names to exclude from the listing
75
- - Params:
76
- - 1... - machines to run the script on in the form of user@adress, the user needs root privileges to execute the script
77
-
78
- ## Nagios probes
79
-
80
- All nagios scripts are located under `nagios` directory.
81
-
82
- ### check_mongodb
83
-
84
- Nagios monitoring probe for mongodb.
85
-
86
- Tested options:
87
-
88
- - connect
89
- - connections
90
- - replication_lag
91
- - replset_state
92
-
93
- (some possible options may not work since there are constructs which are not supported by the latest mongodb versions)
94
-
95
- For usage instructions, run:
96
-
97
- ```sh
98
- check_mongodb --help
99
- ```
100
-
101
- ### check_saml.py
102
-
103
- SAML authentication check compatible with SimpleSAMLphp and mitreID.
104
-
105
- For usage instructions, run:
106
-
107
- ```sh
108
- check_saml --help
109
- ```
110
-
111
- ### check_user_logins.py
112
-
113
- Check users which login in repeatedly more often than a specified threshold (logins per seconds).
114
-
115
- For usage instructions, run:
116
-
117
- ```sh
118
- check_user_logins --help
119
- ```
120
-
121
- Example:
122
-
123
- ```sh
124
- python3 check_user_logins.py
125
- -p /var/log/proxyaai/simplesamlphp/simplesamlphp/simplesamlphp.log
126
- -l 5
127
- -s 60
128
- -r "^(?P<datetime>.{20}).*audit-login.* (?P<userid>[0-9]+)@muni\.cz$"
129
- -d "%b %d %Y %H:%M:%S"
130
- ```
131
-
132
- ### check_ldap
133
-
134
- Check whether an LDAP server is available.
135
-
136
- For usage instructions, run:
137
-
138
- ```sh
139
- check_ldap --help
140
- ```
141
-
142
- ### check_ldap_syncrepl
143
-
144
- Check whether an LDAP replica is up to date with the provider.
145
-
146
- #### Usage
147
-
148
- ```sh
149
- check_ldap_syncrepl --help
150
- ```
151
-
152
- ### check_privacyidea
153
-
154
- Check whether privacyidea is available by performing TOTP authentication via the API.
155
- Use caching arguments for avoiding failure when one TOTP code is used two times.
156
-
157
- For usage instructions, run:
158
-
159
- ```sh
160
- check_privacyidea --help
161
- ```
162
-
163
- ### check_pgsql
164
-
165
- Check connection to PostgreSQL using a configurable query.
166
-
167
- For usage instructions, run:
168
-
169
- ```sh
170
- check_pgsql --help
171
- ```
172
-
173
- Platform: UNKNOWN
174
- Requires-Python: >=3.9
175
- Description-Content-Type: text/markdown
176
- Provides-Extra: ldap
177
- Provides-Extra: postgresql
@@ -1,16 +1,16 @@
1
- PyYAML<7.0,>=5.4
1
+ setuptools
2
+ pymongo~=4.3
2
3
  asyncssh~=2.13
4
+ docker~=6.0
3
5
  beautifulsoup4~=4.12
6
+ requests~=2.31
7
+ PyYAML<7.0,>=5.4
4
8
  check_nginx_status~=1.0
5
- docker~=6.0
6
- pymongo~=4.3
7
9
  pyotp~=2.9
8
- requests~=2.31
9
- setuptools
10
10
 
11
11
  [ldap]
12
- check_syncrepl_extended~=2020.13
13
12
  ldap3~=2.9.1
13
+ check_syncrepl_extended~=2020.13
14
14
 
15
15
  [postgresql]
16
16
  psycopg2-binary~=2.9