Skip to content

Commit 7bd3ad1

Browse files
dmihalcikdmihalcik-virtru
authored andcommitted
test(dpop): entitle opentdf-dpop client in shared subject condition set (DSPX-3397)
The DPoP tests authenticate as the opentdf-dpop client, but otdf_client_scs only entitled opentdf/opentdf-sdk, so the DPoP rewrap reached authorization and was denied (entitled:false -> 403). Add opentdf-dpop to the clientId allowlist so the DPoP-bound client is entitled like the other test clients. Signed-off-by: Dave Mihalcik <dmihalcik@virtru.com>
1 parent 424aed9 commit 7bd3ad1

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

xtest/fixtures/obligations.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
def otdf_client_scs(otdfctl: OpentdfCommandLineTool) -> abac.SubjectConditionSet:
1818
"""
1919
Creates a standard subject condition set for OpenTDF clients.
20-
This condition set matches client IDs 'opentdf' or 'opentdf-sdk'.
20+
This condition set matches client IDs 'opentdf', 'opentdf-sdk', or
21+
'opentdf-dpop' (the DPoP-bound client used by the DPoP tests).
2122
2223
Returns:
2324
abac.SubjectConditionSet: The created subject condition set
@@ -32,7 +33,11 @@ def otdf_client_scs(otdfctl: OpentdfCommandLineTool) -> abac.SubjectConditionSet
3233
abac.Condition(
3334
subject_external_selector_value=".clientId",
3435
operator=abac.SubjectMappingOperatorEnum.IN,
35-
subject_external_values=["opentdf", "opentdf-sdk"],
36+
subject_external_values=[
37+
"opentdf",
38+
"opentdf-sdk",
39+
"opentdf-dpop",
40+
],
3641
)
3742
],
3843
)

0 commit comments

Comments
 (0)