aws-python-helper 1.7.0__tar.gz → 1.7.1__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.
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/PKG-INFO +1 -1
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/api/base.py +7 -3
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/permissions/__init__.py +2 -1
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/permissions/catalog.py +13 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper.egg-info/PKG-INFO +1 -1
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/pyproject.toml +1 -1
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/README.md +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/__init__.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/api/__init__.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/api/auth_middleware.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/api/auth_validators.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/api/dispatcher.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/api/exceptions.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/api/fetcher.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/api/handler.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/context/__init__.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/context/session.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/context/state_validator.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/database/__init__.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/database/database_proxy.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/database/external_database_proxy.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/database/external_mongo_manager.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/database/mongo_manager.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/fargate/__init__.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/fargate/executor.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/fargate/fetcher.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/fargate/handler.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/fargate/task_base.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/invoker/__init__.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/invoker/api_client.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/invoker/exceptions.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/invoker/lambda_invoker.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/lambda_standalone/__init__.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/lambda_standalone/base.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/lambda_standalone/fetcher.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/lambda_standalone/handler.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/model_index_sync/__init__.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/model_index_sync/base.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/model_query/__init__.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/model_query/base.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/repository/__init__.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/repository/audit.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/repository/base.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/sns/__init__.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/sns/publisher.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/sqs/__init__.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/sqs/consumer_base.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/sqs/fetcher.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/sqs/handler.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/utils/__init__.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/utils/json_encoder.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/utils/response.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/utils/serializer.py +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper.egg-info/SOURCES.txt +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper.egg-info/dependency_links.txt +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper.egg-info/requires.txt +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper.egg-info/top_level.txt +0 -0
- {aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/setup.cfg +0 -0
|
@@ -203,10 +203,14 @@ class API(ABC):
|
|
|
203
203
|
|
|
204
204
|
@property
|
|
205
205
|
def service_code(self) -> str:
|
|
206
|
-
"""Names this service inside a permission, as in `core:GET /users`.
|
|
207
|
-
import os
|
|
206
|
+
"""Names this service inside a permission, as in `core:GET /users`.
|
|
208
207
|
|
|
209
|
-
|
|
208
|
+
Resolved by the same function the catalog uses, so the name a permission
|
|
209
|
+
is stored under and the name it is demanded by cannot drift.
|
|
210
|
+
"""
|
|
211
|
+
from ..permissions import service_code
|
|
212
|
+
|
|
213
|
+
return service_code()
|
|
210
214
|
|
|
211
215
|
@property
|
|
212
216
|
def auth_data(self) -> Optional[Dict[str, Any]]:
|
{aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/permissions/__init__.py
RENAMED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
from .catalog import ALL, allows, discover, required_for, service_wildcard
|
|
1
|
+
from .catalog import ALL, allows, discover, required_for, service_code, service_wildcard
|
|
2
2
|
|
|
3
3
|
__all__ = [
|
|
4
4
|
"ALL",
|
|
5
5
|
"allows",
|
|
6
6
|
"discover",
|
|
7
7
|
"required_for",
|
|
8
|
+
"service_code",
|
|
8
9
|
"service_wildcard",
|
|
9
10
|
]
|
{aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/permissions/catalog.py
RENAMED
|
@@ -35,6 +35,19 @@ FILE_METHODS = {
|
|
|
35
35
|
ALL = "*"
|
|
36
36
|
|
|
37
37
|
|
|
38
|
+
def service_code() -> str:
|
|
39
|
+
"""The name this service takes inside a permission code, as in `core:GET /users`.
|
|
40
|
+
|
|
41
|
+
One function on purpose. Publishing the catalog and checking a permission are
|
|
42
|
+
two different places, and if each resolves the name its own way one stores
|
|
43
|
+
`core:GET /users` while the other demands `constitution-core:GET /users`.
|
|
44
|
+
Nothing reports that: every role with explicit permissions just gets 403 on
|
|
45
|
+
everything, and a role holding `*` keeps working, so it looks like a problem
|
|
46
|
+
with the role.
|
|
47
|
+
"""
|
|
48
|
+
return os.getenv("SERVICE_CODE") or os.getenv("NAMESPACE") or "service"
|
|
49
|
+
|
|
50
|
+
|
|
38
51
|
def discover(api_root: str, service: str) -> List[Dict[str, str]]:
|
|
39
52
|
"""Every endpoint this service answers, as permission records.
|
|
40
53
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/api/auth_middleware.py
RENAMED
|
File without changes
|
{aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/api/auth_validators.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/context/state_validator.py
RENAMED
|
File without changes
|
|
File without changes
|
{aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/database/database_proxy.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/database/mongo_manager.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/invoker/lambda_invoker.py
RENAMED
|
File without changes
|
{aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/lambda_standalone/__init__.py
RENAMED
|
File without changes
|
{aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/lambda_standalone/base.py
RENAMED
|
File without changes
|
{aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/lambda_standalone/fetcher.py
RENAMED
|
File without changes
|
{aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/lambda_standalone/handler.py
RENAMED
|
File without changes
|
{aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/model_index_sync/__init__.py
RENAMED
|
File without changes
|
{aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/model_index_sync/base.py
RENAMED
|
File without changes
|
{aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/model_query/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper/repository/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{aws_python_helper-1.7.0 → aws_python_helper-1.7.1}/aws_python_helper.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|