Interoperability and conformance testing
A profile settles what implementations should do, but it can't show that a particular one does it. This lesson follows Lakeside Bank's authorization serverIn OAuth, the service that handles a person's sign-in and approval and decides which tokens to issue to a client. It may belong to the same company as the API, but its job is separate. and the printer's client through the mistakes two careful readings of the same profile can still make, how the OpenID Foundation's conformance suite finds the silent ones, what certificationA scheduled or triggered check in which a responsible person looks at access someone already has and decides whether they should keep it. It is also called certification, and it leaves a record of who decided what. adds, and how much a passing run actually proves.
Why a specification is not enough
Lakeside Bank says its authorizationDeciding whether a requested action is permitted, such as whether a signed-in account may delete a particular photo. Authentication says which account is asking; authorization decides what it can do. server follows FAPI 2.0OpenID Foundation security profiles that fix how OAuth and OpenID Connect are combined for high-risk APIs, such as open banking. FAPI 2.0 requires choices such as PAR, PKCE and sender-constrained tokens, and conformance tests check that a deployment follows them.. The printer's developers have built a client they believe does too. Both may be right. Or each may have misread one requirement in a way the other happens to tolerate, and the first sign of it will be a payment that fails for one customer in a hundred, or a missing check that no honest client ever triggers.
A profile settles what implementations should do. It cannot show that a particular implementation does it, because developers read the same text differently, and two kinds of mistake follow.
Some mistakes reject what should be accepted. A server might refuse a client assertion whose iat is half a second in the future, although the profile requires a tolerance of up to 10 seconds. A client might fail on a DPoP-Nonce challenge it never expected. These are interoperability failures. They are annoying, but they announce themselves quickly, because honest partners hit them.
Other mistakes accept what should be rejected. A server might accept a code a second time, forget to check that a tokenA piece of data issued by a trusted service that a client presents as a credential, for example to call an API or to report a sign-in. Some tokens carry readable claims; others are random strings that only the issuer can interpret. request carries a proof from the key the code was bound to, or accept authorization requests that did not come through PARAn OAuth extension, RFC 9126, in which the client sends its authorization request straight to the authorization server and gets back a short-lived request_uri. The browser carries only that reference, so the parameters cannot be read or changed on the way.. A client might never compare the iss parameter at all. These are security failures, and they stay silent. Honest partners never send the bad request, so everything works, and a server that rejects nothing at all looks perfect to every honest client.
The FAPI 2.0 profile makes the point itself: its protections depend on complete and correct implementations, and it says deployments should use certified implementations. Finding the silent failures needs someone who deliberately sends the requests an honest partner never would.
What honest partners send
- Complete flow
- works
- Second use of the same code
- never sent
- Proof from a different key
- never sent
- Authorization request without PAR
- never sent
Lakeside looks perfect
What the suite sends
- Complete flow
- PASSED
- Second use of the same code
- rejected: PASSED
- Proof from a different key
- accepted: FAILED
- Authorization request without PAR
- rejected: PASSED
The silent failure is found
A passing run covers one configuration, at one time, in the scenarios the suite covers.
Conformance testing
The OpenID Foundation maintains a conformance suite for that purpose. It is open source and free to use, either as a hosted service or run locally, for example as part of an automated build. It plays the other side of the exchange. To test an authorization server, the suite acts as its clients, including calls to a protected APIAn application programming interface: a defined way for software to interact with a service. A web API offers endpoints where other programs send HTTP requests. that the tester points it to. To test a client, it acts as the authorization server and the API. It is the same suite whose OpenID ConnectAn identity layer on top of OAuth 2.0 that lets an application sign people in with an account at another service. It adds the ID token, standard claims, and discovery to the OAuth exchange. test plans Conformance testing used for sign-in.
A tester chooses a test plan and configures it to match the implementation: which client authenticationChecking evidence that someone, or some application, controls an account, such as a password or a passkey. It establishes which account is being used, not what that account may do. method, which way of binding tokens, whether OpenID Connect is involved. The plan then runs a series of test modules, each one a scenario. Some follow the normal flow. Many are negative: they make a deliberate mistake and check that the implementation refuses it.
Test plan: FAPI 2.0 Security Profile, authorization server
Client authentication: private_key_jwt
Sender constraining: DPoP
PASSED complete flow succeeds
PASSED authorization request without PAR is rejected
PASSED second use of the same code is rejected
PASSED client assertion with the wrong audience is rejected
FAILED token request with a proof from a different key is accepted
REVIEW error page shown for a request_uri the server never issuedThis summary is illustrative. The real suite names its modules differently and runs many more of them. Its shape is accurate, though. Setting up a server test involves registering two separate clients with different keys or certificates, so the suite can try mixing them, for example by presenting one client's access tokenA token that a client presents to an API to use access it has been granted, usually limited in what it allows and how long it lasts. It authorizes API calls; it does not tell the client who signed in. with the other client's certificateA signed statement that a public key belongs to a name, such as a website's hostname, for stated purposes and a limited period. A certificate authority signs it, so software that trusts the authority can connect the key to the name. or key. Some tests also involve a person: when the correct behavior is for the authorization server to show an error page instead of redirecting anywhere, the tester records that page as evidence.
The failed line above is exactly the silent kind of failure. Lakeside's server would work with every honest client, and its tokens would still not be properly bound.
Certification
Once an implementation passes a test plan, its developer can apply to the OpenID Foundation for certification. The developer submits the test results with a signed declaration of conformance, a formal statement to the foundation and to the public that the tested deployment conforms, and pays a fee. The foundation publishes the certification, naming the implementation and the profile and options it was certified for, and the implementation may then carry the OpenID Certified mark.
This process is self-certification. The developer runs the tests and makes the declaration, rather than an independent auditor. Its value comes from the shared test suite and from the public, formal nature of the declaration. Some ecosystems require certification before a bank or a third party may join, which gives every participant the same baseline evidence about the others.
For the printer, certification is a reason to choose a library. A certified client library has been through the negative tests the printer would otherwise have to write itself.
What testing proves
A passing test plan shows that a particular implementation, in a particular configuration, behaved as the profile requires in the scenarios the suite covers, at the time it was tested. That is valuable evidence, and it is narrower than it sounds.
It does not cover other configurations, or the next release. A server certified with DPoPAn OAuth extension, RFC 9449, that binds tokens to a key pair the client holds. The client signs a fresh proof for each request, so a stolen token is useless without the private key. has not been tested with mutual TLS, and a change made after certification has not been tested at all. Teams that rely on the suite run it again whenever their implementation or configuration changes, ideally automatically.
It does not cover how the deployment is operated: where private keys are kept, how certificates are renewed, who can change client registrations, whether anyone notices unusual traffic. The FAPI 2.0 Attacker Model left those out on purpose, and so does the suite.
And it does not cover the application around the protocol. The suite can confirm that the printer's token is bound and that Lakeside's API checks the binding. It cannot confirm that the consent screen showed 42.50 EUR and the right payee, or that the payment API took the money from the account Ava chose. The printer and Lakeside still need their own tests for their own business rules.
Check your understanding
Try these questions before moving on. If an answer isn't right, use the feedback and try again.
Try it in the Lab
- Test the FAPI client the way the conformance suite wouldWrite and run a negative test plan against your FAPI 2.0 client, note PASS or FAIL with Audit reasons, and rerun it after a configuration change. Optionally, run the OpenID Foundation's FAPI 2.0 plan.