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: docs/source/AdministratorGuide/Configuration/ConfReference/Systems/Framework/Agents/MyProxyRenewalAgent/index.rst
Copy file name to clipboardExpand all lines: src/DIRAC/Core/Tornado/Server/private/BaseRequestHandler.py
+40-11Lines changed: 40 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,8 @@
1
-
"""DIRAC server has various passive components listening to incoming client requests and reacting accordingly by serving requested information, such as **services** or **APIs**. This module is basic for each of these components and describes the basic concept of access to them.
1
+
"""DIRAC server has various passive components listening to incoming client requests
2
+
and reacting accordingly by serving requested information,
3
+
such as **services** or **APIs**.
4
+
5
+
This module is basic for each of these components and describes the basic concept of access to them.
In order to create a class that inherits from ``BaseRequestHandler``, first you need to determine what HTTP methods need to be supported.
176
+
In order to create a class that inherits from ``BaseRequestHandler``,
177
+
first you need to determine what HTTP methods need to be supported.
172
178
Override the class variable ``SUPPORTED_METHODS`` by writing down the necessary methods there.
173
179
Note that by default all HTTP methods are supported.
174
180
@@ -182,8 +188,10 @@ class BaseRequestHandler(RequestHandler):
182
188
- ``auth_<method name>`` describes authorization rules for a single method and has higher priority than ``DEFAULT_AUTHORIZATION``
183
189
- ``METHOD_PREFIX`` helps in finding the target method, see the :py:meth:`_getMethod` methods, where described how exactly.
184
190
185
-
It is worth noting that DIRAC supports several ways to authorize the request and they are all descriptive in ``DEFAULT_AUTHENTICATION``.
186
-
Authorization schema is associated with ``_authz<SHEMA SHORT NAME>`` method and will be applied alternately as they are defined in the variable until one of them is successfully executed.
191
+
It is worth noting that DIRAC supports several ways to authorize
192
+
the request and they are all descriptive in ``DEFAULT_AUTHENTICATION``.
193
+
Authorization schema is associated with ``_authz<SHEMA SHORT NAME>``
194
+
method and will be applied alternately as they are defined in the variable until one of them is successfully executed.
187
195
If no authorization method completes successfully, access will be denied.
188
196
The following authorization schemas are supported by default:
189
197
@@ -250,7 +258,8 @@ def _authzMYAUTH(self):
250
258
- authentication request using one of the available algorithms called ``DEFAULT_AUTHENTICATION``, see :py:meth:`_gatherPeerCredentials` for more details.
251
259
- and finally authorizing the request to access the component, see :py:meth:`authQuery <DIRAC.Core.DISET.AuthManager.AuthManager.authQuery>` for more details.
252
260
253
-
If all goes well, then a method is executed, the name of which coincides with the name of the request method (e.g.: :py:meth:`get`) which does:
261
+
If all goes well, then a method is executed,
262
+
the name of which coincides with the name of the request method (e.g.: :py:meth:`get`) which does:
254
263
255
264
- execute the target method in an executor a separate thread.
256
265
- defines the arguments of the target method, see :py:meth:`_getMethodArgs`.
@@ -279,7 +288,8 @@ def _authzMYAUTH(self):
279
288
# Below are variables that the developer can OVERWRITE as needed
280
289
281
290
# System name with which this component is associated.
282
-
# Developer can overwrite this if your handler is outside the DIRAC system package (src/DIRAC/XXXSystem/<path to your handler>)
291
+
# Developer can overwrite this
292
+
# if your handler is outside the DIRAC system package (src/DIRAC/XXXSystem/<path to your handler>)
283
293
SYSTEM_NAME=None
284
294
COMPONENT_NAME=None
285
295
@@ -295,7 +305,9 @@ def _authzMYAUTH(self):
295
305
# Prefix of the target methods names if need to use a special prefix. By default its "export_".
296
306
METHOD_PREFIX="export_"
297
307
298
-
# What authorization type to use. This definition refers to the type of authentication, ie which algorithm will be used to verify the incoming request and obtain user credentials.
308
+
# What authorization type to use.
309
+
# This definition refers to the type of authentication,
310
+
# ie which algorithm will be used to verify the incoming request and obtain user credentials.
299
311
# These algorithms will be applied in the same order as in the list.
300
312
# SSL - add to list to enable certificate reading
301
313
# JWT - add to list to enable reading Bearer token
0 commit comments