Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sim swap alignement with commonalities 0.5 #180
Sim swap alignement with commonalities 0.5 #180
Changes from 6 commits
8749bf3
43a76ba
178f304
8d3ccaa
0b7a44e
393e05f
ce7b6ca
57cbe1f
dfa475e
25752f6
d536b53
e524399
1774ca9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"to identify a device" this is not the case, the API does not need to identify a device at all. MSIDN is subscription ID, not a device ID. And the API implementation does not need to identify the device either.
Considering that API description targets application developers, using "device" is rather misleading. It makes a reader think that this API target exact phone unit like geo location APIs do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed accordingly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the advantages of the CAMARA approach is that application developers can use APIs such as SIM Swap without knowing (or learning) the MSISDN at all. All they need to do is identify a device using the subscription, and capture its IP address. I think ruthlessly expunging "device" from our documentation and baking in "phone number" mean this possibility gets overlooked.
It would be nice if we could come up with some "developer friendly" formulation of words which also captures this possibility, as there will be use cases out there that would benefit from this approach if only developers were aware of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eric-murray To be sure to follow you - as in the body we can only use the phone number - you want to highlight the point that via the 3-legged token we can value in the
login-hint
other identifier like ip?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bigludo7
No, it was just a general comment - I'm not expecting the documentation to be updated because of it.
Using a 2-legged access token and explicit identifier will very much be the exception for CAMARA APIs, and yet it is the definition of the explicit identifier that dominates the API description. For the normal case of a 3-legged access token, the token itself is not classified as a "device" token or "phone number" token. The very same token could be used for both a "phone number" API (such as SIM Swap) and a "device" API (such as Device Status).
If 3-legged tokens were the only option, we would not have to go through these mental gymnastics of documenting an API as either a "device" API or a "phone number" API. It is to be hoped that we can come to some agreement on a common formulation for the documentation that reveals this capability to developers without confusing them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a 3-legged access token, the "processing" will already have been done. The SIM Swap API itself does not need to do anything different.
I take the point that IP as a device identifier is not persistent. An API consumer cannot capture the IP address and expect to use that the following week to check the SIM Swap status of the associated subscription. But if they immediately obtain an access token for that IP, then they can check the SIM Swap status for the subscription used by that device, all without even knowing what the MSISDN is.
It is this possibility I think gets overlooked - using "phone number" APIs without knowing the phone number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my point was that SimSwap does not target a device, it targets an MSISDN.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SIM Swap targets the mobile subscription. The API consumer does not need to know the MSISDN to use the API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gregory1g @eric-murray Does this discussion prevent me to merge this PR? with the M3 at the horizon we need to move forward for the yaml & work on the other asset. I can try to copy paste your comment in the discussion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bigludo7
No changes needed, just proceed with the M3 as planned.
Probably the full range of use cases that can be supported by an API can be better advertised through developer portals rather than the YAML documentation anyway. But we can maybe think later on how we can better document what a developer needs to know or needs access to in order to use an API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"the subject will be identified from the optional
phoneNumber
identifier" says that the phoneNumner is not the subject of the API, but just a helper to identify the device. This is confusing. The original terminology was simpler to understand. Especially when one also reads documentation for other API which really target a device.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed accordingly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: use "phoneNumer" instead of "subject" - it is still a single word and it is simpler to understand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed accordingly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the logic of the change, but this is a not-backward compatible change. Currently one may send 3-legged token and the phoneNumber (even if this is not recommended), with this change this will cause a error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree we have a breaking change here but we have to follow commonalities. Indeed, If you use 3-legs access token with a phoneNumber in the body you'll have a 422 UNNECESSARY_IDENTIFIER while previously it worked.
As a reminder we introduced this to avoid 'hidden' number verification
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The purpose of my comment was to highlight this, and make sure that the consequences of new commonalities are not overlooked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this error for 3-legged token invocation only it should not say "not included in the request", because this is not allowed for the 3-legged invocation.
If the error is generic it should not explicitly mention 3-legged token (because it could be a 2-legged token). Like "An identifier is not included in the request and the device or phone number identification cannot be derived from access token".
Since "MISSING_IDENTIFIER" error message uses a generic "access token" style, I suggest to use generic style here as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is generic.
I followed commonalities guideline see here.
I suggest @gregory1g that you post your comment in commonalities as it makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created an issue there: camaraproject/Commonalities#370
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
according to Eric, commonality's "description" is not a error message to be send, it is a description for the reader of the table in the document. While example of the message is in the "Message example" column. An this is just an example, different API can use different text
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposal discussed with @fernandopradocabrillo : We propose to add precision about this error in the Test Case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reworked the yaml & TC to add all clarification - please review.