[Openid-specs-heart] Feedback on the HEART OAuth and OpenID Connect profiles from Mike Jones

Justin Richer jricher at mit.edu
Tue May 10 12:52:55 UTC 2016


No doubt the the OpenID Connect certification process is exemplary and has helped drive adoption and interoperability, and in fact we’re developing a similar tool suite for HEART as well. HEART has a wider mission than just OIDC, of course, and so we need to consider specifying functionality that is more easily left to the implementors in OIDC. 

Unlike most members of the list, I was present during the decision to drop the CheckID endpoint, as evidenced by the issue I filed at the time to track the token introspection draft: https://bitbucket.org/openid/connect/issues/581/general-token-introspection (which was marked resolved without action by the editors). The CheckID endpoint in Connect was redundant, and I believe that *that* rationale is perfectly sound today as it was then. However, it was never an issue of giving *more* information or *different* information, it was a matter of the server unpacking *exactly* what was already in the JWT. The rationale for the endpoint was that it would save a client developer from using a JWT library at all, even to parse. If you read the current draft specs, that is not at all the intent in HEART. The information inside the JWT and inside the introspection response is intended to be distinct, and to fit different purposes. This is based on deployment experience and developer feedback over several projects, both what information is useful and what processes are able to be managed.

The thing is, we’re talking about very different kinds of situations here. The ID Token in connect is an assertion that is received directly by the party which is intended to consume it and isn’t handled by any third parties. Ergo, it needn’t be encrypted in the usual case in order to protect its contents: the client is the only party that handles the ID Token, it can read it directly. Additionally, the ID Token is intended to be consumed and effectively discarded. As it represents the authentication event, and never is passed to another system for access, the client can parse it and go on its way. The access token is a different beast entirely: it is received directly by the client and then handed to the protected resource. The client therefore has access to the token’s contents on the wire, and therefore potentially privacy-leaking information like “sub” and “scope” need to be protected from the prying eyes of the client. Indeed, even the audience list for the access token could be privacy leaking by allowing one resource server to discover, by way of an access token, that the user represented by one of its own records is also represented by a particular record on another server. By using an online lookup mechanism, introspection, we can very effectively limit the information inside the token to that which is needed for an optional first pass discovery and validation, and move all privacy sensitive information to the introspection response, which can of course be tailored to the protected resource that’s requesting it. 

Additionally, as long as a JWT is within its specified time period, it’s considered valid. If you’re using entirely stateless tokens, you can’t revoke them once they’ve been minted. This is simply not acceptable in many transactions in the healthcare (and other) domains, where fast revocation is a requirement for security. History has shown us that any standalone system, like X509 certificates for example, end up requiring a live status check mechanism in some circumstances, like OCSP for X509 certs. This is to say nothing of the growing size requirements for putting more and more information in the token itself. Many of us have seen how SAML assertions and their ilk have a tendency to explode overtime as new requirements and claims get brought into the mix. After all, a self-contained token needs to be ready to answer any question that might possibly be asked of it by any party down the line. This leads to bloat and confusion. 

I am aware, though many in the list might not be, that this is in contrast to capabilities available in Microsoft’s current product offering. Microsoft’s server currently issues encrypted JWTs that are keyed to the individual protected resource. This would solve the privacy issue mentioned above (though not liveness), so why doesn’t HEART just adopt encrypted access tokens? This of course requires registration and management of keys for protected resources, something that hasn’t been discussed here. It also historically is the source of Microsoft’s previously-required “resource” parameter to indicate the resource server and allow the AS to choose the correct key to encrypt the token with. This approach broke interoperability with off-the-shelf OAuth libraries and had to be worked around, as I understand it, for the OpenID Connect implementation to pass certification. Since HEART’s goals are beyond just OpenID Connect interoperability, we need to consider the impact of such decisions across AS and RS implementations from multiple vendors. 

In the end, we chose to balance between JWT and Introspection and specify both be made available to satisfy HEART’s goals. I agree that the justifications for this and other points below need to be spelled out better, but I do not agree with your conclusions regarding the appropriateness of introspection within the specification. Yes, we realize that some vendors will either need to implement this as new functionality or decide that they will not be a HEART compliant AS. That’s the same as with JWT formatted tokens with other vendors. You’ll note, of course, that neither of these requirements apply to HEART OIDC IdP’s, as is now stated in the current document drafts, thanks directly to your feedback. We anticipate that, much like the OIDC compliance tests, some vendors will decide to conform to some aspects of HEART’s profiles and not others, and we need to allow that in a way that isn’t detrimental to interoperability. 

 — Justin

> On May 10, 2016, at 4:40 AM, Mike Jones <Michael.Jones at microsoft.com> wrote:
> 
> Let me second and expand upon Glen’s point.  OpenID Connect is designed to enable broad interoperability, with a strong certification program http://openid.net/certification/ <http://openid.net/certification/> as a tool to help practically promote that interoperability.  If the HEART specifications begin unnecessarily requiring functionality not necessary to satisfy the HEART mission, it will necessarily limit the applicability of the HEART profiles.  (Yes, some additional things are needed, but each addition should be clearly justified.)
>  
> Also, I’ll respond here to Justin’s comment “Interestingly, you find JWT reasonable and introspection not reasonable, while others have had the opposite view.”  The OpenID Connect working group explicitly decided to require that both OPs and RPs understand JWTs *exactly* so that they wouldn’t have to bear the additional implementation and run-time costs of introspection.
>  
> Some people won’t remember this, but OpenID Connect used to have an introspection endpoint called the Check ID Endpoint, but based on developer feedback, it was removed in May 2012 (see https://bitbucket.org/openid/connect/issues/570 <https://bitbucket.org/openid/connect/issues/570> andhttp://openid.net/specs/openid-connect-messages-1_0-10.html#anchor24 <http://openid.net/specs/openid-connect-messages-1_0-10.html#anchor24>).  Developers made it clear to us they would rather process JWTs directly, which they said based on experience, is easy, than pay the unnecessary costs of an introspection endpoint. <>
>  
> I believe that this rationale from developers is just as valid in 2016 as it was in 2012.  Therefore, please likewise simplify and increase the interoperability of the HEART profiles by removing the requirement for introspection.
>  
>                                                           -- Mike
>  
> From: Glen Marshall [SRS] [mailto:gfm at securityrs.com] 
> Sent: Monday, May 9, 2016 11:52 AM
> To: openid-specs-heart at lists.openid.net
> Cc: Mike Jones <Michael.Jones at microsoft.com>
> Subject: RE: [Openid-specs-heart] Feedback on the HEART OAuth and OpenID Connect profiles from Mike Jones
>  
> Mike Jones is onto something that may create difficulties for HEART.  In the cross-industry world, where healthcare is an equal partner with other industries, how much interoperability is required?  OAuth and UMA imply, at least to me, rather broad interoperability where one might have one place to express privacy requirements that apply to many different aspect of one’s life.  I suspect that the current US-centric boundaries for what is and isn’t health IT are more porous and less worldwide that we might have assumed.   
>  
> I would like to see some traceability from business and policy requirements to the technical profiles.  For example, is the assumption of having an indeterminate number of AS services with real-time discovery required by business or policy, or is an eventual goal.  How much new infrastructure is needed, and who will bear the costs and responsibility for it?
>  
>  
> Glen F. Marshall
> Consultant
> Security Risk Solutions, Inc.
> 698 Fishermans Bend
> Mount Pleasant, SC 29464
> Tel: (610) 644-2452 
> Mobile: (610) 613-3084
> gfm at securityrs.com <mailto:gfm at securityrs.com>
> www.SecurityRiskSolutions.com <http://www.securityrisksolutions.com/>
>  
> From: Openid-specs-heart [mailto:openid-specs-heart-bounces at lists.openid.net <mailto:openid-specs-heart-bounces at lists.openid.net>] On Behalf Of Justin Richer
> Sent: Sunday, May 8, 2016 08:26
> To: Mike Jones <Michael.Jones at microsoft.com <mailto:Michael.Jones at microsoft.com>>; openid-specs-heart at lists.openid.net <mailto:openid-specs-heart at lists.openid.net>
> Subject: Re: [Openid-specs-heart] Feedback on the HEART OAuth and OpenID Connect profiles from Mike Jones
>  
> Hi Mike,
> 
> Thanks for the thorough review. It's clear to me that for the most part the specs lack the appropriate justification for the decisions made therein, something that we've started to address with the latest draft changes. I'll go through each point below in turn when I get a chance later this week, but for example: the requirement for introspection at the OAuth AS is to allow interoperable onboarding of RS's. Instead of leaving this as an implementation choice, we are mandating the availability of this connection mechanism for interop. If you've got an embedded RS with your AS, you don't need to use it, but you need to make it available from the AS in order to allow other RS's to connect to you. Note: this is not a requirement of a Connect IdP that's not also acting as an OAuth AS (this point has been clarified in the latest drafts that I linked to the list the other day, I'd ask that you take a look at the new text, please!). Interestingly, you find JWT reasonable and introspection not reasonable, while others have had the opposite view. Therefore we need to clearly state why we have both, as we've attempted to do in the current draft:
> 
> http://openid.bitbucket.org/HEART/openid-heart-oauth2.html#rfc.section.4.2 <http://openid.bitbucket.org/HEART/openid-heart-oauth2.html#rfc.section.4.2>
> We realize that some of the decisions in the profiles are departures from what's common on OAuth systems, and that's OK. The goal of HEART is not to document what people are already doing, but instead to push the boundary of security and interoperability for this and possibly other vertical domains. 
> 
>  -- Justin
> 
> On 5/8/2016 1:27 AM, Mike Jones wrote:
> The 27 review feedback items below are based upon a complete read of the HEART OAuth and OpenID Connect profiles during the Implementer’s Draft review follows.  I believe that all the comments equally apply to the current working group drafts.  I’ve used links to the Implementer’s Drafts below since these are stable references to immutable versions.  They are intended to make the profiles clearer, more easily understood, more easily implemented, and more secure.
>  
> OAuth Profile - http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html>
>  
> http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.2.1.1 <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.2.1.1>
> 2.1.1. <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.2.1.1> Full Client with User Delegation <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#FullClient>
>  
> (1)  Why is this called a “full client”?  Wouldn’t a more descriptive name be something more aligned with OAuth naming, like “Client using Authorization Code Flow” or with OpenID Connect naming, like “Basic Client”?
>  
> (2)  Especially in light of the OAuth mix-up attacks, wouldn’t it be better for these clients to use, or at least be allowed to use, “response_type=id_token code”, rather than be required to use “response_type=code”?
>  
> (3)  What is the “unique key” that is RECOMMENDED used for, how is it used, and what restrictions are there on the key type?  For instance, is it assumed to be an asymmetric key?  Are there required or recommended algorithms to use, such as “RS256”?  The spec should say more about this in the interests of both interoperability and clarity.
>  
> (4)  What are the implications of not having the “unique key” (not following the RECOMMENDED)?  Why is this RECOMMENDED, rather than REQUIRED?  For one thing, not having this key would seem to conflict with the requirement in 2.2 to use private_key_jwt client authentication.
>  
> http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.2.1.2 <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.2.1.2>
> 2.1.2. <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.2.1.2> Browser-embedded Client with User Delegation <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#BrowserClient>
>  
> (5)  Why is this called “Browser-embedded Client” when this flow could also be used by non-browser applications?  Why not follow the OAuth and Connect naming conventions and call this an “Implicit Client”?
>  
> http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.2.1.3 <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.2.1.3>
> 2.1.3. <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.2.1.3> Direct Access Client <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#DirectClient>
>  
> (6)  What is the use case behind the decision for the profile to include use of the Client Credentials flow, especially when this bypasses user involvement and user consent?  Is including this actually necessary?  Many servers don’t support this, by design.
>  
> http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.2.2 <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.2.2>
> 2.2. <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.2.2> Requests to the Token Endpoint <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#RequestsToTokenEndpoint>
>  
> (7) The text “MAY use other asymmetric signature methods listed in the JSON Web Algorithms (JWA <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#RFC7518> [RFC7518]) specification” should actually refer to the IANA JSON Web Signature and Encryption Algorithms registry athttp://www.iana.org/assignments/jose/jose.xhtml#web-signature-encryption-algorithms <http://www.iana.org/assignments/jose/jose.xhtml#web-signature-encryption-algorithms> – not the JWA spec.
>  
> (8)  The paragraph including “Authorization servers MAY require some clients to additionally authenticate using mutual Transport Layer Security (TLS) authentication” is problematic in several ways.  First, how does the server communicate to the client that mutual TLS is required?  How is the client TLS key registered with the server?  Is support for mutual TLS required of servers?  Of clients?  If it’s not required, how is interop assured when it is used?
>  
> http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.3 <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.3>
> 3. <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.3> Client Registration <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#ClientRegistration>
>  
> (9)  The profile requires that “each client instance MUST receive a unique client identifier from the authorization server”.  This isn’t how most OAuth deployments work today – particular for native applications.  Is this significant departure from existing practice truly necessary or is this just a preference?  If it’s necessary, the specification should clearly say why.  If it’s not truly necessary, this requirement should be downgraded to being a recommendation.
>  
> http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.3.2 <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.3.2>
> 3.2. <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.3.2> Dynamic Registration <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#DynamicRegistration>
>  
> (10)  The profile requires the use of Dynamic Registration.  This is another significant departure from existing practice.  Like the previous comment, this requirement either needs to be justified as being essential or downgraded to being a recommendation.
>  
> (11)  The profile indicates that servers MAY accept software statements.  How does the server communicate to clients that it supports software statements or not?  How does it communicate whether their use by clients is required or not?  How does it communicate to developers and clients what kinds of software statements will be accepted and rejected?
>  
> (12)  The profile requires that authorization servers “MUST indicate to the end user that such a statement was used in the client's registration”.  This seems beyond silly, as most normal people would have no clue what such a message means or how they should respond to it (or the lack of it).  Requiring another “Click OK” barrier in the UI that people won’t understand and will just click through won’t help either usability or security.
>  
> http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.4 <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.4>
> 4. <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.4> OAuth 2.0 Server Profile <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#ServerProfile>
>  
> (13)  The profile requires that “The authorization server MUST limit each registered client (identified by a client ID) to a single grant type only”.  This may or may not be fine but doesn’t match existing practice for many implementations and the requirement isn’t justified in the specification.  At a minimum, clear rationale for this requirement needs to be included.
>  
> http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.4.1 <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.4.1>
> 4.1. <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.4.1> Discovery <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#Discovery>
>  
> (14)  The profile requires support for the introspection endpoint.  This unnecessarily increases the implementation footprint of both clients and servers, increases run-time cost of common operations, and is a significant deviation from most deployments.  If, for instance, the UMA profile requires introspection for some reason, add it there, but do not require HEART OAuth or Connect to support introspection.  This must be removed from the OAuth profile.
>  
> (15)  The profile requires support for the revocation endpoint.  This unnecessarily increases the implementation footprint of both clients and servers and is a significant deviation from most deployments.  If, for instance, the UMA profile requires revocation for some reason, add it there, but do not require HEART OAuth or Connect to support revocation.  This must be removed from the OAuth profile.
>  
> (16)  The profile states “It is RECOMMENDED that servers provide cache information through HTTP headers and make the cache valid for at least one week.”  How does this interact with the need to immediately rotate keys upon key compromise?  Is this saying that a compromised key must remain valid for at least a week?  If this isn’t implied by this recommendation, please explain what is actually implied for clients and servers.
>  
> http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.4.2 <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.4.2>
> 4.2. <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.4.2> JWT Bearer Tokens <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#JWTBearerTokens>
>  
> (17)  The spec is unclear what kinds of bearer tokens are being referred to here.  Is it saying that access tokens must be JWTs?  Is it saying that refresh tokens must be JWTs?  This is certainly a reasonable implementation choice but the specification does not clearly state why this is a requirement.  Please say why bearer tokens must be JWTs.
>  
> (18)  The profile says that an audience may be included.  Why is the audience not required?  What are the implications of sending and accepting bearer tokens that aren’t audience?
>  
> (19)  The profile requires including “azp” in JWT bearer tokens.  It’s now widely held by the OpenID Connect working group that “azp” is both underspecified and its inclusion in OpenID Connect was a mistake.  (Seehttps://bitbucket.org/openid/connect/issues/973/core-2-3137-azp-claim-underspecified-and <https://bitbucket.org/openid/connect/issues/973/core-2-3137-azp-claim-underspecified-and> - Core 2 / 3.1.3.7 - azp claim underspecified and overreaching.)  Please remove all uses of “azp” from the HEART specifications.  If the client ID needs to be conveyed, an appropriate new well-specified claim should be defined and used for this purpose.
>  
> http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.5 <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.5>
> 5. <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#rfc.section.5> Requests to the Protected Resource <http://openid.net/specs/openid-heart-oauth2-1_0-ID1.html#RequestsToProtectedResource>
>  
> (20)  The profile says that resources may support the query-parameter parameter method from RFC 6750.  This is a terrible security mistake.  Change the text to say that “Resources MUST NOT support the query-parameter parameter method from RFC 6750”.
>  
> OpenID Connect Profile - http://openid.net/specs/openid-heart-openid-connect-1_0-ID1.html <http://openid.net/specs/openid-heart-openid-connect-1_0-ID1.html>
>  
> http://openid.net/specs/openid-heart-openid-connect-1_0-ID1.html#rfc.section.2 <http://openid.net/specs/openid-heart-openid-connect-1_0-ID1.html#rfc.section.2>
> 2. <http://openid.net/specs/openid-heart-openid-connect-1_0-ID1.html#rfc.section.2> ID Tokens <http://openid.net/specs/openid-heart-openid-connect-1_0-ID1.html#IDTokens>
>  
> (21)  The profile says that “The ID Token MUST expire and SHOULD have an active lifetime no longer than five minutes”.  While this expiration time may be a reasonable implementation choice, the specification is silent on why this reasonably short expiration time is a requirement.  Please either justify this requirement or downgrade this text to a non-normative discussion on criteria for choosing appropriate ID Token lifetimes.
>  
> http://openid.net/specs/openid-heart-openid-connect-1_0-ID1.html#rfc.section.3 <http://openid.net/specs/openid-heart-openid-connect-1_0-ID1.html#rfc.section.3>
> 3. <http://openid.net/specs/openid-heart-openid-connect-1_0-ID1.html#rfc.section.3> UserInfo Endpoint <http://openid.net/specs/openid-heart-openid-connect-1_0-ID1.html#UserInfoEndpoint>
>  
> (22)  The profile requires supporting signed UserInfo responses.  This may be a reasonable thing for the profile to require but the specification fails to motivate this requirement.  Please do so.
>  
> (23)  The profile talks about encrypted UserInfo responses but doesn’t say whether support for these is required for clients or servers, or why.  Please do so.
>  
> http://openid.net/specs/openid-heart-openid-connect-1_0-ID1.html#rfc.section.4 <http://openid.net/specs/openid-heart-openid-connect-1_0-ID1.html#rfc.section.4>
> 4. <http://openid.net/specs/openid-heart-openid-connect-1_0-ID1.html#rfc.section.4> Request Objects <http://openid.net/specs/openid-heart-openid-connect-1_0-ID1.html#RequestObjects>
>  
> (24)  The profile requires that servers support request objects.  This may be a reasonable thing for the profile to require but the specification fails to motivate this requirement.  Please do so.
>  
> http://openid.net/specs/openid-heart-openid-connect-1_0-ID1.html#rfc.section.5 <http://openid.net/specs/openid-heart-openid-connect-1_0-ID1.html#rfc.section.5>
> 5. <http://openid.net/specs/openid-heart-openid-connect-1_0-ID1.html#rfc.section.5> Authentication Context <http://openid.net/specs/openid-heart-openid-connect-1_0-ID1.html#AuthenticationContext>
>  
> (25)  The profile uses URIs for FICAM LOA numbers as “acr” values.  This seems short-signed and limiting, as these values are specific to the United States and not international in nature.  These must be changed to appropriate international equivalents – especially in coordination with other working groups, such as MODRNA.
>  
> (26)  Remove the requirement to support the introspection endpoint from this profile, for the same reasons as in (14).
>  
> (27)  Remove the requirement to support the revocation endpoint from this profile, for the same reasons as in (15).
>  
>                                                           Thanks all,
>                                                           -- Mike]
>  
> 
> 
> 
> _______________________________________________
> Openid-specs-heart mailing list
> Openid-specs-heart at lists.openid.net <mailto:Openid-specs-heart at lists.openid.net>
> http://lists.openid.net/mailman/listinfo/openid-specs-heart <http://lists.openid.net/mailman/listinfo/openid-specs-heart>
>  
> _______________________________________________
> Openid-specs-heart mailing list
> Openid-specs-heart at lists.openid.net
> http://lists.openid.net/mailman/listinfo/openid-specs-heart

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openid.net/pipermail/openid-specs-heart/attachments/20160510/d5e605de/attachment.html>


More information about the Openid-specs-heart mailing list