<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Mar 14, 2025 at 12:51 AM Joseph Heenan <<a href="mailto:joseph@authlete.com">joseph@authlete.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Dick,<br>
<br>
<br>
> On 14 Mar 2025, at 01:01, Dick Hardt via Openid-specs-ab <<a href="mailto:openid-specs-ab@lists.openid.net" target="_blank">openid-specs-ab@lists.openid.net</a>> wrote:<br>
> <br>
> <br>
> Building on Joseph's response:<br>
> > The confusion attack only really applies where you have a ‘sub’ value that can contain a client id or a user identifier. That isn’t the case here.<br>
> <br>
> An objective is to have a Command Token that is used in the `activate` and `maintain` commands to be able to be verified and processed similar to an id_token allowing code reuse.<br>
> <br>
> the id_token specifies that the client_id is the `aud` claim, so following that same semantic keeps things simple for the RP<br>
> <br>
> We do want to provide mechanisms that make it easy for an RP to not confuse id_tokens and command tokens -- We can add that the command claim MUST NOT be in an id_token, and per the other thread, we could require OPs that support OP Commands to require a nonce in the id_token. <br>
<br>
Unfortunately I think it’s not just the RP that we need to worry about - whilst doing so is contentious, there are various patterns of third parties accepting id tokens, and we should at least be aware of the implications if one of those third parties would accept a command token in place of an id_token.<br></blockquote><div><br></div><div>I'm not that familiar with those patterns Joseph. Would you share those so we can reflect on how to minimize the risk of a command_token being used in place of an id_token?<br><br>Perhaps Andrii's proposal (if I understood it correctly) of the `aud` being the commands_uri and the `client_id` claim containing the client_id is the better approach. It seems this would significantly reduce the risk of token confusion.<br><br>The command token endpoint then knows the command was intended for it, and it and the `client_id` is then just a claim in the command. This may simplify RPs that host multiple client tenants that are each identified by their own client_id value<br><br>The example at the end of section 4 would then change from <br><br><div><font face="monospace">{</font></div><div><font face="monospace"> "iss": "<a href="https://op.example.org">https://op.example.org</a>",</font></div><div><font face="monospace"> "sub": "248289761001",</font></div><div><font face="monospace"> "aud": "s6BhdRkqt3",</font></div><div><font face="monospace"> "iat": 1734004000,</font></div><div><font face="monospace"> "exp": 1734004060,</font></div><div><font face="monospace"> "jti": "bWJr",</font></div><div><font face="monospace"> "command": "unauthorize",</font></div><div><font face="monospace">}</font><br><br>to <br><br><div><font face="monospace">{</font></div><div><font face="monospace"> "iss": "<a href="https://op.example.org">https://op.example.org</a>",</font></div><div><font face="monospace"> "aud": "<a href="https://rp.example.net/commands">https://rp.example.net/commands</a>",</font></div><div><font face="monospace"> "sub": "248289761001",</font></div><div><font face="monospace"> "client_id": "s6BhdRkqt3",</font></div><div><font face="monospace"> "iat": 1734004000,</font></div><div><font face="monospace"> "exp": 1734004060,</font></div><div><font face="monospace"> "jti": "bWJr",</font></div><div><font face="monospace"> "command": "unauthorize",</font></div><div><font face="monospace">}<br><br></font></div></div></div><div><font face="arial, sans-serif">where </font><span style="font-family:monospace"><a href="https://rp.example.net/commands">https://rp.example.net/commands</a> </span><font face="arial, sans-serif">is the </font><span style="font-family:monospace">commands_uri</span></div></div></div></div></div></div></div>