ocai-aws 0.1.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.
- ocai_aws-0.1.1/.gitignore +60 -0
- ocai_aws-0.1.1/CHANGELOG.md +15 -0
- ocai_aws-0.1.1/PKG-INFO +56 -0
- ocai_aws-0.1.1/README.md +41 -0
- ocai_aws-0.1.1/pyproject.toml +28 -0
- ocai_aws-0.1.1/src/ocai/aws/__init__.py +5 -0
- ocai_aws-0.1.1/src/ocai/aws/_sdk.py +59 -0
- ocai_aws-0.1.1/src/ocai/aws/credentials.py +154 -0
- ocai_aws-0.1.1/src/ocai/aws/py.typed +0 -0
- ocai_aws-0.1.1/tests/AWS-VECTORS-LICENSE +202 -0
- ocai_aws-0.1.1/tests/AWS-VECTORS-NOTICE +5 -0
- ocai_aws-0.1.1/tests/aws_vectors.json +243 -0
- ocai_aws-0.1.1/tests/http/bedrock_signed_attempts.json +82 -0
- ocai_aws-0.1.1/tests/test_execution.py +261 -0
- ocai_aws-0.1.1/tests/test_signing.py +129 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
build/
|
|
7
|
+
dist/
|
|
8
|
+
*.so
|
|
9
|
+
|
|
10
|
+
# uv / venv
|
|
11
|
+
.venv/
|
|
12
|
+
uv.lock.bak
|
|
13
|
+
|
|
14
|
+
# Tooling caches
|
|
15
|
+
.pytest_cache/
|
|
16
|
+
.ruff_cache/
|
|
17
|
+
.mypy_cache/
|
|
18
|
+
.import_linter_cache/
|
|
19
|
+
.coverage
|
|
20
|
+
htmlcov/
|
|
21
|
+
|
|
22
|
+
# Docs site build output and page cache (zensical build)
|
|
23
|
+
/site/
|
|
24
|
+
/.cache/
|
|
25
|
+
|
|
26
|
+
# Node (future typescript/)
|
|
27
|
+
node_modules/
|
|
28
|
+
*.tsbuildinfo
|
|
29
|
+
|
|
30
|
+
# Go (future go/)
|
|
31
|
+
/go/bin/
|
|
32
|
+
|
|
33
|
+
# Editors / OS. Shared editor settings ARE committed: the multi-root workspace
|
|
34
|
+
# (ocai.code-workspace) and each folder's .vscode/settings.json + extensions.json
|
|
35
|
+
# give Pylance/Ruff the right interpreter per project. Personal files stay local.
|
|
36
|
+
.idea/
|
|
37
|
+
.vscode/*
|
|
38
|
+
!.vscode/settings.json
|
|
39
|
+
!.vscode/extensions.json
|
|
40
|
+
.DS_Store
|
|
41
|
+
|
|
42
|
+
# Per-user agent settings (never commit personal permissions)
|
|
43
|
+
.claude/settings.local.json
|
|
44
|
+
.codex/config.toml
|
|
45
|
+
|
|
46
|
+
# Platform build and browser-test artifacts
|
|
47
|
+
.nuxt/
|
|
48
|
+
.output/
|
|
49
|
+
platform/test-results/
|
|
50
|
+
platform/playwright-report/
|
|
51
|
+
|
|
52
|
+
# Local environment files: the root .env is the active one, .envs/ holds the
|
|
53
|
+
# per-environment variants (`task env -- <ENV>` copies .envs/.env.<ENV> to .env).
|
|
54
|
+
# Never committed: they hold credentials.
|
|
55
|
+
/.env
|
|
56
|
+
/.envs/
|
|
57
|
+
.local/
|
|
58
|
+
|
|
59
|
+
# Task execution fingerprints
|
|
60
|
+
.task/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Releases are managed by the repository changeset workflow.
|
|
4
|
+
## 0.1.1 (2026-11-11)
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
#### Authenticate explicit AWS requests through the existing credential contract
|
|
9
|
+
|
|
10
|
+
Add SigV4Credential backed by AWS-maintained signing, with per-attempt request
|
|
11
|
+
isolation and no SDK objects in the public API. The AWS dependency stays in the
|
|
12
|
+
external ocai-aws package; core dependencies are unchanged. (WU-47, #106)
|
|
13
|
+
|
|
14
|
+
Extend the import-contract regression count for the explicit credential boundary;
|
|
15
|
+
no kernel runtime or dependency change.
|
ocai_aws-0.1.1/PKG-INFO
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: ocai-aws
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Explicit AWS authentication for ocai transport requests.
|
|
5
|
+
Project-URL: Homepage, https://github.com/ocarinow/ocai
|
|
6
|
+
Project-URL: Source, https://github.com/ocarinow/ocai
|
|
7
|
+
Project-URL: Documentation, https://ocarinow.github.io/ocai/
|
|
8
|
+
Project-URL: Changelog, https://github.com/ocarinow/ocai/blob/main/python/packages/ocai-aws/CHANGELOG.md
|
|
9
|
+
Author: ocai maintainers
|
|
10
|
+
License-Expression: FSL-1.1-ALv2
|
|
11
|
+
Requires-Python: >=3.13
|
|
12
|
+
Requires-Dist: awscrt<0.39,>=0.38.1
|
|
13
|
+
Requires-Dist: ocai<0.2,>=0.1
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
|
|
16
|
+
# ocai-aws
|
|
17
|
+
|
|
18
|
+
Explicit AWS authentication for ocai, independent of Bedrock or model codecs.
|
|
19
|
+
`SigV4Credential` delegates signing to AWS-maintained `awscrt`; it does not
|
|
20
|
+
implement cryptography or construct an AWS service client.
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
from ocai.aws import SigV4Credential
|
|
24
|
+
|
|
25
|
+
credential = SigV4Credential(
|
|
26
|
+
access_key="synthetic-access-key",
|
|
27
|
+
secret_key="synthetic-secret-key",
|
|
28
|
+
session_token="synthetic-session-token", # omit for long-lived keys
|
|
29
|
+
region="us-east-1",
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Pass the credential to the existing model/binding composition API. The driver
|
|
34
|
+
applies it to its detached transport request after policies, once per attempt.
|
|
35
|
+
Body bytes and effective headers are signed. SDK requests contain no CallContext.
|
|
36
|
+
The region is explicit; the default signing service is `bedrock`.
|
|
37
|
+
|
|
38
|
+
There is no environment/profile discovery, IMDS, STS call or automatic refresh.
|
|
39
|
+
Supply updated credentials explicitly when required. Aware `clock` injection
|
|
40
|
+
supports reproducible offline verification; the default reads current UTC on
|
|
41
|
+
every attempt. Representations redact access keys, secret keys and session tokens;
|
|
42
|
+
signing failures have generic messages without SDK exception chaining.
|
|
43
|
+
|
|
44
|
+
The kernel has no AWS dependency. Installing this external package installs the
|
|
45
|
+
AWS CRT native runtime; use a platform with an upstream wheel or its supported
|
|
46
|
+
build toolchain. ocai never enables native SDK diagnostic logging. Applications
|
|
47
|
+
must treat any explicitly enabled upstream diagnostic logging as sensitive.
|
|
48
|
+
|
|
49
|
+
Qualified scope: SigV4 header signing with normalized/double-encoded paths,
|
|
50
|
+
queries, headers, fixed byte bodies, optional session tokens and per-attempt
|
|
51
|
+
signing. No unsigned-payload mode, presigned URL, SigV4a, S3-specific path rules
|
|
52
|
+
or streamed request body. Response streaming does not change request signing.
|
|
53
|
+
Bedrock hosts and semantic codecs are separate packages/WUs.
|
|
54
|
+
|
|
55
|
+
Published AWS signing vectors and recorded HTTP attempts test the actual SDK,
|
|
56
|
+
without live credentials or SDK mocks.
|
ocai_aws-0.1.1/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# ocai-aws
|
|
2
|
+
|
|
3
|
+
Explicit AWS authentication for ocai, independent of Bedrock or model codecs.
|
|
4
|
+
`SigV4Credential` delegates signing to AWS-maintained `awscrt`; it does not
|
|
5
|
+
implement cryptography or construct an AWS service client.
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
from ocai.aws import SigV4Credential
|
|
9
|
+
|
|
10
|
+
credential = SigV4Credential(
|
|
11
|
+
access_key="synthetic-access-key",
|
|
12
|
+
secret_key="synthetic-secret-key",
|
|
13
|
+
session_token="synthetic-session-token", # omit for long-lived keys
|
|
14
|
+
region="us-east-1",
|
|
15
|
+
)
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Pass the credential to the existing model/binding composition API. The driver
|
|
19
|
+
applies it to its detached transport request after policies, once per attempt.
|
|
20
|
+
Body bytes and effective headers are signed. SDK requests contain no CallContext.
|
|
21
|
+
The region is explicit; the default signing service is `bedrock`.
|
|
22
|
+
|
|
23
|
+
There is no environment/profile discovery, IMDS, STS call or automatic refresh.
|
|
24
|
+
Supply updated credentials explicitly when required. Aware `clock` injection
|
|
25
|
+
supports reproducible offline verification; the default reads current UTC on
|
|
26
|
+
every attempt. Representations redact access keys, secret keys and session tokens;
|
|
27
|
+
signing failures have generic messages without SDK exception chaining.
|
|
28
|
+
|
|
29
|
+
The kernel has no AWS dependency. Installing this external package installs the
|
|
30
|
+
AWS CRT native runtime; use a platform with an upstream wheel or its supported
|
|
31
|
+
build toolchain. ocai never enables native SDK diagnostic logging. Applications
|
|
32
|
+
must treat any explicitly enabled upstream diagnostic logging as sensitive.
|
|
33
|
+
|
|
34
|
+
Qualified scope: SigV4 header signing with normalized/double-encoded paths,
|
|
35
|
+
queries, headers, fixed byte bodies, optional session tokens and per-attempt
|
|
36
|
+
signing. No unsigned-payload mode, presigned URL, SigV4a, S3-specific path rules
|
|
37
|
+
or streamed request body. Response streaming does not change request signing.
|
|
38
|
+
Bedrock hosts and semantic codecs are separate packages/WUs.
|
|
39
|
+
|
|
40
|
+
Published AWS signing vectors and recorded HTTP attempts test the actual SDK,
|
|
41
|
+
without live credentials or SDK mocks.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "ocai-aws"
|
|
7
|
+
version = "0.1.1"
|
|
8
|
+
description = "Explicit AWS authentication for ocai transport requests."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.13"
|
|
11
|
+
license = "FSL-1.1-ALv2"
|
|
12
|
+
authors = [{ name = "ocai maintainers" }]
|
|
13
|
+
dependencies = ["ocai>=0.1,<0.2", "awscrt>=0.38.1,<0.39"]
|
|
14
|
+
|
|
15
|
+
[project.urls]
|
|
16
|
+
Homepage = "https://github.com/ocarinow/ocai"
|
|
17
|
+
Source = "https://github.com/ocarinow/ocai"
|
|
18
|
+
Documentation = "https://ocarinow.github.io/ocai/"
|
|
19
|
+
Changelog = "https://github.com/ocarinow/ocai/blob/main/python/packages/ocai-aws/CHANGELOG.md"
|
|
20
|
+
|
|
21
|
+
[tool.hatch.build.targets.wheel]
|
|
22
|
+
packages = ["src/ocai"]
|
|
23
|
+
|
|
24
|
+
[tool.hatch.build]
|
|
25
|
+
dev-mode-dirs = ["src"]
|
|
26
|
+
|
|
27
|
+
[tool.ocai]
|
|
28
|
+
role = "credential"
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""Typed view of the narrow AWS CRT public signing API (upstream is untyped).
|
|
2
|
+
|
|
3
|
+
These protocols describe upstream call signatures, not an alternative signer.
|
|
4
|
+
The real library is exercised by official vectors and recorded driver tests.
|
|
5
|
+
No SDK objects escape through the public ocai API.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from collections.abc import Iterator
|
|
11
|
+
from concurrent.futures import Future
|
|
12
|
+
from datetime import datetime
|
|
13
|
+
from importlib import import_module
|
|
14
|
+
from io import BytesIO
|
|
15
|
+
from typing import Protocol
|
|
16
|
+
from typing import cast
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class Headers(Protocol):
|
|
20
|
+
def __iter__(self) -> Iterator[tuple[str, str]]: ...
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class Request(Protocol):
|
|
24
|
+
@property
|
|
25
|
+
def headers(self) -> Headers: ...
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class ProviderFactory(Protocol):
|
|
29
|
+
def new_static(
|
|
30
|
+
self, access_key_id: str, secret_access_key: str, session_token: str | None = None
|
|
31
|
+
) -> object: ...
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class AuthModule(Protocol):
|
|
35
|
+
AwsCredentialsProvider: ProviderFactory
|
|
36
|
+
|
|
37
|
+
def AwsSigningConfig(
|
|
38
|
+
self, *, credentials_provider: object, region: str, service: str, date: datetime
|
|
39
|
+
) -> object: ...
|
|
40
|
+
|
|
41
|
+
def aws_sign_request(
|
|
42
|
+
self, http_request: Request, signing_config: object
|
|
43
|
+
) -> Future[Request]: ...
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class HttpModule(Protocol):
|
|
47
|
+
def HttpHeaders(self, name_value_pairs: list[tuple[str, str]]) -> Headers: ...
|
|
48
|
+
|
|
49
|
+
def HttpRequest(
|
|
50
|
+
self, *, method: str, path: str, headers: Headers, body_stream: BytesIO
|
|
51
|
+
) -> Request: ...
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def load() -> tuple[AuthModule, HttpModule]:
|
|
55
|
+
"""Load only public SDK value/signing modules, with their documented types."""
|
|
56
|
+
return (
|
|
57
|
+
cast(AuthModule, import_module("awscrt.auth")),
|
|
58
|
+
cast(HttpModule, import_module("awscrt.http")),
|
|
59
|
+
)
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"""AWS-owned SigV4 signing at the detached transport credential boundary."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from collections.abc import Callable
|
|
6
|
+
from datetime import UTC
|
|
7
|
+
from datetime import datetime
|
|
8
|
+
from io import BytesIO
|
|
9
|
+
from typing import TYPE_CHECKING
|
|
10
|
+
from urllib.parse import urlsplit
|
|
11
|
+
|
|
12
|
+
from ocai.aws import _sdk
|
|
13
|
+
from ocai.core.credentials import CredentialError
|
|
14
|
+
|
|
15
|
+
if TYPE_CHECKING:
|
|
16
|
+
from ocai.wire.http import HttpRequest
|
|
17
|
+
|
|
18
|
+
_AUTH_HEADERS = frozenset(
|
|
19
|
+
{"authorization", "x-amz-date", "x-amz-security-token", "x-amz-content-sha256"}
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _now() -> datetime:
|
|
24
|
+
return datetime.now(UTC)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def _valid(value: object) -> bool:
|
|
28
|
+
return isinstance(value, str) and bool(value.strip()) and not any(c in value for c in "\r\n\0")
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class SigV4Credential:
|
|
32
|
+
"""Sign a serialized request with explicit AWS credentials using AWS CRT.
|
|
33
|
+
|
|
34
|
+
No default chain, environment, profile, network client or token refresh is
|
|
35
|
+
used. The default service is Bedrock; region must be supplied explicitly.
|
|
36
|
+
General SigV4 header signing is supported, not S3-specific signing, SigV4a,
|
|
37
|
+
presigned URLs or streamed request bodies. Response streaming is supported.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
__slots__ = ("_auth", "_http", "_provider", "_region", "_service", "_clock")
|
|
41
|
+
|
|
42
|
+
def __init__(
|
|
43
|
+
self,
|
|
44
|
+
access_key: str,
|
|
45
|
+
secret_key: str,
|
|
46
|
+
*,
|
|
47
|
+
region: str,
|
|
48
|
+
session_token: str | None = None,
|
|
49
|
+
service: str = "bedrock",
|
|
50
|
+
clock: Callable[[], datetime] = _now,
|
|
51
|
+
) -> None:
|
|
52
|
+
"""Create a credential without discovering or retrieving any secrets.
|
|
53
|
+
|
|
54
|
+
Args:
|
|
55
|
+
access_key: Explicit AWS access key identifier.
|
|
56
|
+
secret_key: Explicit AWS secret access key.
|
|
57
|
+
region: Region used in the signature scope.
|
|
58
|
+
session_token: Optional explicit temporary session token.
|
|
59
|
+
service: AWS signing service name; defaults to bedrock.
|
|
60
|
+
clock: Aware UTC-compatible time source, read once per attempt.
|
|
61
|
+
|
|
62
|
+
Raises:
|
|
63
|
+
CredentialError: If inputs are empty or SDK initialization fails.
|
|
64
|
+
"""
|
|
65
|
+
if not all(_valid(v) for v in (access_key, secret_key, region, service)) or (
|
|
66
|
+
session_token is not None and not _valid(session_token)
|
|
67
|
+
):
|
|
68
|
+
raise CredentialError("AWS credentials require non-empty, single-line values")
|
|
69
|
+
self._region = region
|
|
70
|
+
self._service = service
|
|
71
|
+
self._clock = clock
|
|
72
|
+
self._auth, self._http = _sdk.load()
|
|
73
|
+
provider: object | None = None
|
|
74
|
+
try:
|
|
75
|
+
provider = self._auth.AwsCredentialsProvider.new_static(
|
|
76
|
+
access_key, secret_key, session_token
|
|
77
|
+
)
|
|
78
|
+
except Exception:
|
|
79
|
+
# Do not propagate SDK text or retain the original exception as context.
|
|
80
|
+
provider = None
|
|
81
|
+
if provider is None:
|
|
82
|
+
raise CredentialError("AWS static credential initialization failed")
|
|
83
|
+
self._provider = provider
|
|
84
|
+
|
|
85
|
+
def apply(self, request: HttpRequest) -> None:
|
|
86
|
+
"""Sign a private SDK request, then copy its headers to the transport copy.
|
|
87
|
+
|
|
88
|
+
The drivers must supply their independent transport request. Authentication
|
|
89
|
+
headers are replaced on repeated application; request body, URL, timeout,
|
|
90
|
+
attempt and governance context are not modified or passed to the SDK.
|
|
91
|
+
|
|
92
|
+
Args:
|
|
93
|
+
request: The detached, fully serialized transport request.
|
|
94
|
+
|
|
95
|
+
Raises:
|
|
96
|
+
CredentialError: If the URL, clock or signing operation is invalid.
|
|
97
|
+
"""
|
|
98
|
+
signed: dict[str, str] | None = None
|
|
99
|
+
try:
|
|
100
|
+
url = urlsplit(request.url)
|
|
101
|
+
if (
|
|
102
|
+
url.scheme not in ("http", "https")
|
|
103
|
+
or not url.hostname
|
|
104
|
+
or url.username is not None
|
|
105
|
+
or url.password is not None
|
|
106
|
+
or url.fragment
|
|
107
|
+
):
|
|
108
|
+
raise ValueError("invalid signing URL")
|
|
109
|
+
host = url.hostname
|
|
110
|
+
if ":" in host:
|
|
111
|
+
host = f"[{host}]"
|
|
112
|
+
if url.port is not None and url.port != (443 if url.scheme == "https" else 80):
|
|
113
|
+
host += f":{url.port}"
|
|
114
|
+
for key, value in request.headers.items():
|
|
115
|
+
if key.lower() == "host" and value.lower() != host.lower():
|
|
116
|
+
raise ValueError("host header disagrees with signing URL")
|
|
117
|
+
headers = {
|
|
118
|
+
key: value
|
|
119
|
+
for key, value in request.headers.items()
|
|
120
|
+
if key.lower() not in _AUTH_HEADERS and key.lower() != "host"
|
|
121
|
+
}
|
|
122
|
+
headers["Host"] = host
|
|
123
|
+
path = url.path or "/"
|
|
124
|
+
if url.query:
|
|
125
|
+
path += "?" + url.query
|
|
126
|
+
when = self._clock()
|
|
127
|
+
if when.tzinfo is None or when.utcoffset() is None:
|
|
128
|
+
raise ValueError("signing clock must be timezone-aware")
|
|
129
|
+
sdk_request = self._http.HttpRequest(
|
|
130
|
+
method=request.method,
|
|
131
|
+
path=path,
|
|
132
|
+
headers=self._http.HttpHeaders(list(headers.items())),
|
|
133
|
+
body_stream=BytesIO(request.body or b""),
|
|
134
|
+
)
|
|
135
|
+
config = self._auth.AwsSigningConfig(
|
|
136
|
+
credentials_provider=self._provider,
|
|
137
|
+
region=self._region,
|
|
138
|
+
service=self._service,
|
|
139
|
+
date=when.astimezone(UTC),
|
|
140
|
+
)
|
|
141
|
+
self._auth.aws_sign_request(sdk_request, config).result()
|
|
142
|
+
signed = dict(sdk_request.headers)
|
|
143
|
+
except Exception:
|
|
144
|
+
# Signing may mention headers or keys in upstream exception messages.
|
|
145
|
+
# Raise outside the handler so no secret-bearing exception is chained.
|
|
146
|
+
signed = None
|
|
147
|
+
if signed is None:
|
|
148
|
+
raise CredentialError("AWS request signing failed")
|
|
149
|
+
request.headers.clear()
|
|
150
|
+
request.headers.update(signed)
|
|
151
|
+
|
|
152
|
+
def __repr__(self) -> str:
|
|
153
|
+
"""Redact all credential material, including the access key identifier."""
|
|
154
|
+
return "SigV4Credential(***redacted***)"
|
|
File without changes
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
AWS signing test vectors in aws_vectors.json are adapted from aws-c-auth.
|
|
2
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
Licensed under Apache-2.0; see AWS-VECTORS-LICENSE.
|
|
4
|
+
Source commit: bdb7cef99d8bd1ad3c189b1400140a7787e47105.
|
|
5
|
+
Changes: selected header-signing vectors packaged as JSON; expected values unchanged.
|