Skip to content

Commit 642d07d

Browse files
authored
feat(rest): support DLF openapi-v4 signing algorithm (#469)
1 parent 3cc1410 commit 642d07d

5 files changed

Lines changed: 635 additions & 32 deletions

File tree

‎docs/source/user_guide/catalog.rst‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,11 @@ registered on the REST server. The catalog is configured through the
6767
the role from the metadata endpoint when it is omitted.
6868
* ``dlf.signing-algorithm``: ``default`` selects DLF4-HMAC-SHA256 for DLF VPC
6969
endpoints and ``openapi`` selects ROA HMAC-SHA1 for DlfNext OpenAPI endpoints.
70-
When omitted, an endpoint containing ``dlfnext`` selects ``openapi`` and other
71-
endpoints select ``default``.
70+
``openapi-v4`` selects ACS4-HMAC-SHA256 for DlfNext OpenAPI endpoints. When a
71+
request matches a registered DlfNext operation, it also names that operation's
72+
API in the ``x-acs-action`` header; other requests are signed without it.
73+
Without this option, an endpoint containing ``dlfnext`` selects ``openapi`` and
74+
other endpoints select ``default``; ``openapi-v4`` is only used when configured.
7275
* ``table-default.<key>``: table option defaults applied when a created table
7376
left ``<key>`` unset.
7477
* ``header.<name>``: sent as the ``<name>`` http header on every request to the
@@ -103,6 +106,8 @@ are reloaded when less than one hour of validity remains.
103106
{"dlf.access-key-secret", "<access-key-secret>"},
104107
// Optional for temporary credentials:
105108
{"dlf.security-token", "<security-token>"},
109+
// Optional for endpoints that require ACS4-HMAC-SHA256 signing:
110+
{"dlf.signing-algorithm", "openapi-v4"},
106111
};
107112
108113
On creation the catalog queries the server's ``/v1/config`` endpoint and merges

‎include/paimon/catalog_options.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ struct PAIMON_EXPORT CatalogOptions {
6262
/// "dlf.token-ecs-role-name" - Optional ECS RAM role name.
6363
static const char DLF_TOKEN_ECS_ROLE_NAME[];
6464

65-
/// "dlf.signing-algorithm" - DLF signer ("default" or "openapi").
65+
/// "dlf.signing-algorithm" - DLF signer ("default", "openapi" or "openapi-v4").
6666
static const char DLF_SIGNING_ALGORITHM[];
6767

6868
/// "dlf.oss-endpoint" - OSS endpoint that overrides the "fs.oss.endpoint" of a data

0 commit comments

Comments
 (0)