Skip to content

Conversation

jovasco
Copy link
Contributor

@jovasco jovasco commented Oct 16, 2017

Only credentials in the exclude credentials list that match this RPID should result in a not allowed error.


Preview | Diff

Only credentials in the exclude credentials list that match this RPID should result in a not allowed error.
@emlun
Copy link
Member

emlun commented Oct 16, 2017

Does anyone object to marking this as non-substantive to let @jovasco through the check?

@emlun
Copy link
Member

emlun commented Oct 16, 2017

If not, I'll do so at 2017-10-17T16:00Z.

@emlun
Copy link
Member

emlun commented Oct 16, 2017

Scratch that, I'll leave this to the requested reviewers instead. :)

Copy link
Contributor

@equalsJeffH equalsJeffH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this issue intersects with work occuring in PR #498. AFAICT this change is OK, shall I address it in PR #498?

index.bs Outdated
1. Check if a credential matching an [=list/item=] of |excludeCredentialDescriptorList| is present on this authenticator. If
so, return an error code equivalent to "{{NotAllowedError}}" and terminate the operation.
1. Check if a credential matching an [=list/item=] of |excludeCredentialDescriptorList| is present on this authenticator for
the supplied |rpId|. If so, return an error code equivalent to "{{NotAllowedError}}" and terminate the operation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, the discrete |rpId| parameter is disappearing in PR #498 because it is duplicated in rpEntity.id. That fix is in PR #498. I'd also word this a bit differently.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wel, I am not a native English speaker :),

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries -- is there a submitted issue corresponding to this PR ? if not please submit one, and I can/will address in pr #498

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I submitted issue #654 for this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sigh -- @jovasco had already submitted issue #650 which I'd missed. thx.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has to be rpEntity.id. Apart from that it looks fine to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akshayku Fixed.

@equalsJeffH
Copy link
Contributor

equalsJeffH commented Oct 18, 2017

@jovasco sub'd issue #650 for this -- if another(s) can double-check that this change is correct, I'll address issue #654 in PR #498 and we can close this PR.

cc: @jcjones @AngeloKai @leshi

@equalsJeffH equalsJeffH added this to the WD-07 milestone Oct 18, 2017
@jcjones
Copy link
Contributor

jcjones commented Oct 19, 2017

I disagree with adding this into the algorithm steps, as it implies checking the rpId of a credential before using it -- which is impossible for the implementing browser to do, as PublicKeyCredentialDescriptor doesn't provide a way to check that.

There should be a correspondence between a Credential ID and an RP ID, but it has to be managed by the authenticator. Some authenticators might use business logic here ("I made this CredID for X.Y, but this is for Z.Y, nope!"), some might use cryptography to mix the RP ID into the Credential ID's byte array. That's an implementation detail.

IMO this should go into the security considerations section instead. Maybe something to the effect of:

Authenticators, when presented a Credential ID for an RP ID, SHOULD 
ensure that the Credential ID was created for this RP ID before accepting
it for use.

@jcjones
Copy link
Contributor

jcjones commented Oct 19, 2017

Apologies, I misunderstood which section this was actually being placed into -- this does make sense for the authenticator's makeCredential algorithm. I'll properly review.

Copy link
Contributor

@jcjones jcjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reads fine to me.

@jcjones
Copy link
Contributor

jcjones commented Oct 19, 2017

Marked as non substantive for IPR from ash-nazg.

@equalsJeffH
Copy link
Contributor

Ok, since this is not as clear-cut as I'd thought wrt the language to use, I will not address this (and issue #650) in PR #498. will comment further in this PR.

index.bs Outdated
1. Check if a credential matching an [=list/item=] of |excludeCredentialDescriptorList| is present on this authenticator. If
so, return an error code equivalent to "{{NotAllowedError}}" and terminate the operation.
1. Check if a credential matching an [=list/item=] of |excludeCredentialDescriptorList| is present on this authenticator for
the supplied |rpId|. If so, return an error code equivalent to "{{NotAllowedError}}" and terminate the operation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has to be rpEntity.id. Apart from that it looks fine to me.

Copy link
Contributor

@equalsJeffH equalsJeffH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please see comment below on refining the matching language in this step.

index.bs Outdated
so, return an error code equivalent to "{{NotAllowedError}}" and terminate the operation.
1. Check if a credential matching an [=list/item=] of |excludeCredentialDescriptorList| is present on this authenticator for
the supplied <code>|rpEntity|.{{PublicKeyCredentialRpEntity/id}}</code>. If so, return an error code equivalent to
"{{NotAllowedError}}" and terminate the operation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this step, where we are matching creds bound to an authnr to credDescriptors, is similar to step 16.2 in section #discover-from-external-source. Note that the latter step matches on rpId, credential ID, and cred type.

Should not this authenticatorMakeCredential step similarly match on the same items?

e.g.:
1. Check if a credential matching an [=list/item=] of |excludeCredentialDescriptorList| is bound to this authenticator by matching with <code>|rpEntity|.{{PublicKeyCredentialRpEntity/id}}</code>, <code>|excludeCredentialDescriptorList|.{{PublicKeyCredentialDescriptor/id}}</code>, and <code>|excludeCredentialDescriptorList|.{{PublicKeyCredentialDescriptor/type}}</code>. If so, return an error code equivalent to "{{NotAllowedError}}" and terminate the operation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that is inherent in checking [=list/item] but the check for the rpID is not. It perfectly possible that an item is present on the authenticator but for a different rpID while if ID and type are invalid, this cannot be a credential on this authenticator.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems you @jovasco are saying that we do not need to be explicit regarding the definition of "matching" in this context. However, the present language in step 16.2 in section #discover-from-external-source is the result of addressing issue #280. I would not be surprised to have a similar issue raised here down the road if we are not explicit. Is there any harm/errors with the proposed language above?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@equalsJeffH Alright, if we do this, we better do it right:

  1. Check if a credential matching an [=list/item=] of |excludeCredentialDescriptorList| is bound to this authenticator with the following procedure:
    1. verify that the |excludeCredentialDescriptorList|.{{PublicKeyCredentialDescriptor/id}} was generated by this Authenticator.
    2. verify that the |excludeCredentialDescriptorList|.{{PublicKeyCredentialDescriptor/type}} matches the |excludeCredentialDescriptorList|.{{PublicKeyCredentialDescriptor/id}}
    3. verify that |rpEntity|.{{PublicKeyCredentialRpEntity/id}} is identical to the one used to create the |excludeCredentialDescriptorList|.{{PublicKeyCredentialDescriptor/id}}.

If all of these check succeed, return an error code equivalent to "{{NotAllowedError}}" and terminate the operation.

If you agree I will update the pull request for both make crednetial and getassertion.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jovasco proposed:

  1. Check if a credential matching an [=list/item=] of |excludeCredentialDescriptorList| is bound to this authenticator with the following procedure:

hm, I think i see whay you are getting at -- i.e., being even more explicit -- though, this does not seem correct to me...in the above, do you mean to also say "...for each item of |excludeCredentialDescriptorList| ?

     i. verify that the <code>|excludeCredentialDescriptorList|.
         {{PublicKeyCredentialDescriptor/id}}</code> 
         was generated by this Authenticator.

in the above, "generated by this authnr" is not what we are looking for. Rather, we are trying to ascertain whether there exists a cred bound to this authnr having a credential ID matching |excludeCredentialDescriptorList|.{{PublicKeyCredentialDescriptor/id}}.

    ii.  verify that the <code>|excludeCredentialDescriptorList|.
         {{PublicKeyCredentialDescriptor/type}}</code> matches the
        <code>|excludeCredentialDescriptorList|.{{PublicKeyCredentialDescriptor/id}}</code> 

in the above, do you mean to say something like "if there exists a cred bound to this authnr whose {{PublicKeyCredentialDescriptor/type}} value matches |excludeCredentialDescriptorList|.{{PublicKeyCredentialDescriptor/type}} ?

    iii. verify that <code>|rpEntity|.{{PublicKeyCredentialRpEntity/id}}</code> is 
         identical to the one used to create the <code>|excludeCredentialDescriptorList|.
         {{PublicKeyCredentialDescriptor/id}}</code>.

in the above, do you mean to say something like "if there exists a cred bound to this authnr whose RP ID matches |excludeCredentialDescriptorList|.{{PublicKeyCredentialDescriptor/id}}" ?

Perhaps the below works ?

3. Check if any credential, bound to this authenticator and matching an [=list/item=] of |excludeCredentialDescriptorList|, exists. A match occurs if a credential matches all of an |excludeCredentialDescriptorList| item's <code>|rpEntity|. {{PublicKeyCredentialRpEntity/id}}</code>, <code>|excludeCredentialDescriptorList|. {{PublicKeyCredentialDescriptor/id}}</code>, and <code>|excludeCredentialDescriptorList|.{{PublicKeyCredentialDescriptor/type}}</code>. If so, return an error code equivalent to "{{NotAllowedError}}" and terminate the operation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@equalsJeffH I modified it slightly. rpId is not part of the exclude list item and I found the language a bit tortured.

@equalsJeffH
Copy link
Contributor

review of this is here: #651 (review)

@equalsJeffH
Copy link
Contributor

Do we similarly need to refine step 3 of the authenticatorGetAssertion operation (#op-get-assertion)?

@akshayku
Copy link
Contributor

@equalsJeffH Yes, we do.

@jovasco
Copy link
Contributor Author

jovasco commented Oct 23, 2017

@equalsJeffH Yes.

@jovasco
Copy link
Contributor Author

jovasco commented Oct 23, 2017

Fixed.

@nadalin
Copy link
Contributor

nadalin commented Oct 23, 2017

@akshayku Have you reviewed the changes yet as we would like to merge this

Copy link
Contributor

@akshayku akshayku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Copy link
Contributor

@selfissued selfissued left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me.

@equalsJeffH
Copy link
Contributor

i still have a question here: #651 (comment)

@equalsJeffH
Copy link
Contributor

reply to @jovasco here: #651 (comment)

@jcjones
Copy link
Contributor

jcjones commented Nov 1, 2017

I'm willing to take over this PR to resolve @equalsJeffH 's comments if @jovasco does not have time to do it this week. I can do it on Friday, 3 Nov.

Johan Verrept added 4 commits November 2, 2017 16:40
Also added a reference to the list item back in the correct place.
@equalsJeffH
Copy link
Contributor

thanks, this looks good to me.

Copy link
Contributor

@equalsJeffH equalsJeffH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@jcjones jcjones merged commit 625bd7a into w3c:master Nov 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants