The OpenID Foundation provides a set of [conformance test profiles][oidc-conf-profiles] that test both Relying Party and OpenID Provider (OP) OpenID Connect implementations. Upon submission of [results][oidc-result-submission] and an affirmative response, the affirmed OP will be listed as a [certified OP][oidc-certified-ops] on the OpenID Connect website and allowed to use the [certification mark][oidc-cert-mark] according to the certification [terms and conditions][oidc-terms-conds], section 3(d).
Dex is an OP that strives to implement the [mandatory set][oidc-core-spec-mandatory] of OpenID Connect features, and can be tested against the Basic OpenID Provider profile ([profile outline][oidc-conf-profiles], section 2.1.1). These tests ensure that all features required by a [basic client][oidc-basic-client-spec] work as expected.
Features are currently under development to fully comply with the Basic profile, as dex currently does not. The following issues track our progress:
There are two ways to set up an OpenID test instance:
1. Configure a test instance provided by The OpenID Foundation by following [instructions][oidc-test-config] on their website.
1. Download their test runner from [GitHub][oidc-github] and follow the instructions in the [README][oidc-github-readme].
* Requires `docker` and `docker-compose`
Configuration is essentially the same for either type of OpenID test instance. We will proceed with option 1 in this example, and set up an [AWS EC2 instance][aws-ec2-instance] to deploy dex:
* Create an [AWS EC2 instance][aws-ec2-quick-start] and connect to your instance using [SSH][aws-ec2-ssh].
* Install [dex][dex-install].
* Ensure whatever port dex is listening on (usually 5556) is open to ingress traffic in your security group configuration.
* In this example the public DNS name, automatically assigned to each internet-facing EC2 instance, is **my-test-ec2-server.com**. You can find your instances' in the AWS EC2 management console.
### Configuring an OpenID test instance
1. Navigate to [https://op.certification.openid.net:60000][oidc-test-start].
1. Click 'New' configuration.
1. Input your issuer url: `http://my-test-ec2-server.com:5556/dex`.
1. Select `code` as the response type.
1. Click 'Create' to further configure your OpenID instance.
1. On the next page, copy and paste the `redirect_uris` into the `redirectURIs` config field (see below).
1. At this point we can run dex, as we have all the information necessary to create a config file (`oidc-config.yaml` in this example):
* Fill in all configuration information that the `/.well-known/openid-configuration` endpoint returns, althgouh this is not strictly necessary. We should give the test cases as much information about dex's OP implementation as possible.
1. Press the 'Save and Start' button to start your OpenID test instance.
1. Follow the provided link.
1. Run through each test case, following all instructions given by individual cases.
* In order to pass certain cases, screenshots of OP responses might be required.