Conformance suite: pdp_auth_type=api_key is unusable with discovery, and blocks the invalid-credentials 401 module
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- java
- Domain
- testing-qa
Research direction
Start by locating AddApiKeyAuthenticationParametersToAuthzenApiRequest, GetPDPDynamicServerConfiguration, GetPDPStaticServerConfiguration, and CorruptAuthzenClientCredentials in the conformance suite. Run the six AuthZEN plans with discovery plus api_key and the invalid-credentials module under api_key. Done means the discovery combination preserves the configured key and the invalid-credentials module reaches its 401 evaluation without requiring an unused client object.
Written by the indexing model from the issue text.
Description
Two of the pdp_auth_type=api_key paths in the AuthZEN conformance modules do not work. Both are in the conformance suite rather than the specification; filing here since #640 is also a harness report.
api_key cannot be combined with pdp_server_metadata=discovery.
AddApiKeyAuthenticationParametersToAuthzenApiRequest reads the key from the pdp environment object:
String secret = env.getString("pdp", "api_key");
but GetPDPDynamicServerConfiguration replaces that object wholesale with the fetched metadata document:
JsonObject serverConfig = JsonParser.parseString(jsonString).getAsJsonObject();
env.putObject("pdp", serverConfig);
so the pdp.api_key supplied in the test configuration is gone by the time the first authenticated request is built. GetPDPStaticServerConfiguration puts config.pdp into the environment instead, which keeps it. Every (discovery, api_key) run therefore fails at the first authenticated condition with:
'PDP API Key' field is missing from the 'AuthZEN' section in the test configuration
Observed on all 148 applicable modules across the six AuthZEN plans. The same two variant parameters are advertised as independent, so the combination is selectable in the UI.
authzen-pdp-evaluation-invalid-credentials-returns-401 cannot run under api_key.
The module declares itself applicable to it:
@VariantNotApplicable(parameter = PDPAuthType.class, values = {"none", "mtls"})
but CorruptAuthzenClientCredentials requires a client object:
@PreEnvironment(required = {"client", "pdp"})
and @VariantSetup(parameter = PDPAuthType.class, value = "api_key") never creates one, so the module ends with:
couldn't find required object in environment before evaluation: client
The condition body already handles either credential, corrupting client.client_secret and pdp.api_key independently and erroring only when neither is present, so requiring client up front looks stricter than intended.
Found running the six AuthZEN plans against an OPA-based PDP. With static + api_key the rest of the suite is unaffected: 145 of 149 modules pass, the remainder being this one and #640.
- Dominant language
- TypeScript
- Stars
- 170
- Forks
- 46
- Avg merge
- 18h 5m
- Merged PRs (30d)
- 43
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openid/authzen
-
Certification Scenario §7.2.2, §7.3.2 and §7.4.2: identical results, or identical fixture results?Possibly taken @alexolivier claimed this 4 days ago. Openauthorization-api certification
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Search interop runner compares results as JSON strings, so member order decides PASS/FAILMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openid/authzen#693 · 3 comments ·
Maintainers usually reply within 1 day
-
certification
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openid/authzen#640 · 1 comment ·
Maintainers usually reply within 1 day
-
access-requests
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
openid/authzen#578 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 35/100
Maintainers usually reply within 1 day
Similar issues
-
needs-area
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Azure/typespec-azure#5936 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 Half a day Newbie friendliness 72/100
vercel-labs/scriptc#2910 ·
Maintainers usually reply within 1 day
-
automation missing-model model-sync provider:fireworks-ai
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anomalyco/models.dev#12458 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day