Skip to content

Commit 2b9b7e7

Browse files
authored
Add another well-known check (w3c-fedid#760)
* Add another well-known check This PR enforces that accounts_endpoint and login_url are present in the well-known file whenever the client_metadata is used. Fixes w3c-fedid#700 * Update index.bs
1 parent 99a9978 commit 2b9b7e7

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

spec/index.bs

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ An extension may use the following instead of the [=create identity credential/s
11331133
The <a>fetch the config file</a> algorithm fetches both the [=well-known file=] and the config file from
11341134
the [=IDP=], checks that the config file is mentioned in the [=well-known file=], and returns the config.
11351135

1136-
<div algorithm>
1136+
<div algorithm="fetch the config file">
11371137
To <dfn>fetch the config file</dfn> given an {{IdentityProviderConfig}} |provider| and
11381138
|globalObject|, run the following steps. This returns an {{IdentityProviderAPIConfig}}
11391139
or failure.
@@ -1241,7 +1241,8 @@ or failure.
12411241
1. If |skipWellKnown| is true, return |config|.
12421242
1. Wait for |wellKnown| to be set.
12431243
1. If |wellKnown| is failure, return failure.
1244-
1. If |wellKnown|.{{IdentityProviderWellKnown/accounts_endpoint}} and
1244+
1. <dfn for="fetch the config file">Check accounts and login url step</dfn>: If
1245+
|wellKnown|.{{IdentityProviderWellKnown/accounts_endpoint}} and
12451246
|wellKnown|.{{IdentityProviderWellKnown/login_url}} are set:
12461247
1. Let |well_known_accounts_url| be the result of [=computing the manifest URL=] with
12471248
|provider|, |wellKnown|.{{IdentityProviderWellKnown/accounts_endpoint}}, and
@@ -1258,6 +1259,14 @@ or failure.
12581259

12591260
</div>
12601261

1262+
<div class="issue" heading="extension">
1263+
An extension which implements the client metadata endpoint must add the following step right before
1264+
the [=fetch the config file/check accounts and login url step=]:
1265+
1. If |config|.{{IdentityProviderAPIConfig/client_metadata_endpoint}} is set but either
1266+
|wellKnown|.{{IdentityProviderWellKnown/accounts_endpoint}} or
1267+
|wellKnown|.{{IdentityProviderWellKnown/login_url}} is not set, return failure.
1268+
</div>
1269+
12611270
NOTE: a two-tier file system is used in order to prevent the [=IDP=] from easily determining the [=RP=]
12621271
that a user is visiting by encoding the information in the config file path. This issue is solved by
12631272
requiring a [=well-known file=] to be on the root of the [=IDP=]. The config file itself can be anywhere, but
@@ -2064,7 +2073,11 @@ The {{IdentityProviderWellKnown}} JSON object has the following semantics:
20642073
:: A URL that points to the same location as the {{IdentityProviderAPIConfig/login_url}} in [[#idp-api-config-file]]s.
20652074
</dl>
20662075

2067-
Either <b>provider_urls</b> or both <b>accounts_endpoint</b> and <b>login_url</b> are required.
2076+
Either {{IdentityProviderWellKnown/provider_urls}} or both
2077+
{{IdentityProviderWellKnown/accounts_endpoint}} and {{IdentityProviderWellKnown/login_url}} are
2078+
required. If the [=config file=] contains the {{IdentityProviderAPIConfig/client_metadata_endpoint}},
2079+
then both {{IdentityProviderWellKnown/accounts_endpoint}} and {{IdentityProviderWellKnown/login_url}}
2080+
are required.
20682081

20692082
<!-- ============================================================ -->
20702083
## The config file ## {#idp-api-config-file}

0 commit comments

Comments
 (0)