-
Notifications
You must be signed in to change notification settings - Fork 4
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
Bulk authorization for Nodes #62
Comments
The alternative to client credentials may be https://tools.ietf.org/html/rfc8628, but this requires a mechanism for the client to signal a code and URI to the user. The user could then use a tool to iterate over these codes and URIs from a number of clients. This also requires the Authorization Server to be modern enough to support this RFC. |
How does the user gather all the device code URLs? The device code flow only provides a mechanism for physical display but not "notifying a central authority". Users would still be force to inspect each device manually. |
Agreed. This would most likely require something new to be defined. |
Danny has also highlighted a (potential third?) option. The recent token exchange RFC (https://tools.ietf.org/html/rfc8693#section-2.3) could allow a Node (for example) to be passed a temporary token by a user (to an HTTP endpoint we'd have to define), which it could then exchange with the Auth server for a token it could then use. I'd have to read further into how you'd accurately scope these tokens. Again, this is quite new so may not be widely supported. |
That will similar to what you are doing with Authorization Code Flow, you must already be somehow doing a callback to an interface which support browsing (i.e. central authority) to kick start the flow. Using Device Code Flow, that could break up the authorization flow and alllowing the central authority gather all the callbacks in a list and somehow issue the bulk request, or at least given the central authority to authorize all the devices in its own manner. |
How does this work? How does each device producing a URL get gathered in the central authority? I think this is something that lacking in OAuth2 that we are trying to gain. The closest example is the Google Home app which scans the WiFi and Bluetooth for available devices... But I still need to navigate in the app to each one for me to authorize them. |
Is dynamic client registration the solution? From example, as an auth server, I obtain a request on The question I've been wondering, is this an auth server specific implementation detail? is it reasonable for us to spec a mechanism for this? if we spec something does it not force a non-standard auth server? |
https://tools.ietf.org/html/rfc7523
|
That was what I was thinking could be possible, but it would be good to demonstrate that there are existing auth servers already supporting that pattern or that suport an API on which such functionality could be built. @simonlo-sony also pointed out to me that the client may expect to use the STATE parameter (although IS-10 spec currently only mentions and recommends this for Token Requests not Client Registration) and reject requests to its Redirect URI that have taken too long, so we'd need to offer guidance around that at least? |
I found no mention of a state parameter in RFC 7591 for the client registration 🤔 Could you guys share where you saw that for client registration?
Might be worth seeing if this is in an RFC anywhere, I think it's a new issue however |
OK, I must have got the wrong end of the stick!! Sorry, @simonlo-sony... |
I believe the Keycloak implementation supports this form of approval by leaving clients in a disabled state once registered. Their UI does not make bulk approvals straightforward however, not least given that the display only shows the client ID rather than a more useful name. It may well be possible to deal with this via API but I haven't tried that yet. |
https://tools.ietf.org/html/rfc8628
https://tools.ietf.org/html/rfc8628#section-3.3
How do we spec 3? The callback to the broadcast controller would need to be configured in all the clients? |
My idea on step 3, client can foward the verification_uri and user_code to user defined endpoint on the broadcast controller, which is up to your own implementation. And yes the callback would have to be configured on each client. ps. diagram has been updated on step 3, using user_code instead of device_code |
If this configuration is acceptable, RFC 7523 allows us to start with an I wonder if the "general access pass" could be a security vulnerability if it was shared in the System API global resource for instance. MUST it be configure by a human in order to ensure only permitted device are allowed? Are broadcasters willing to accept installation time configuration for the environment/to enable this feature? Or does this defeat the purpose of the bulk? |
Examined on call. @jonathanthorpe-sony to review options and propose way forward |
Feeling on today's call is that this may need to wait for v1.1 |
👍 Hopefully the group can document its feeling on workaround in v1.0, and goal for how devices/clients that only support v1.0 will work in the future with clients/devices that support bulk auth as per a v1.1. |
@simonlo-sony and I have been thinking about this over the last week. The three strategies highlighted by @andrewbonney were:
In Simon and my discussion we revisited and rejected the Device Authorization Grant. As is covered in the discussion above, although the gathering of device codes could be automated, we don't know of a way that an authorization server could bulk authenticate those codes. The Token Exchange method is still under study, but is unlikely to be well supported by legacy Authorization Servers due to it being quite new (as Andrew pointed out above). The Mutual-TLS Client Authentication will certainly work in this situation as it requires no user interaction. It exchanges a client certificate for a token with no requirement for user credentials. Although promising, as mentioned by Andrew above, this might require some fundamental changes as it would require servers and clients to have digital certificates. When considering Mutual-TLS we observed that it seemed functionally equivalent to the Client Credential Grant - in one a client certificate is exchanged for a token, in the other the client secret and id are exchanged for a token. This led on to examining why Client Credential Grant hasn't been preferred for devices with no user interface. In the NMOS Authorization Overview there is reference to the Client Credential Grant being deprecated by the IETF. However, I'm struggling to see in the IETF Best Common Practices where they explicitly deprecate the use of this grant. I can only find some warnings in section 4.14. Can anyone help me understand why the Client Credential Grant has been discounted? As using this grant type would potentially solve both the problems of bulk authorization and authorization of devices with no UI. |
Hi @jonathanthorpe-sony. I've copied some thoughts below regarding some rationale for different flows in various NMOS workflows. It's a bit of a brain dump so apologies in advance. Client Authentication vs User Authentication:
The Client Credentials flow doesn't provide user authentication, only client auth, whilst redirection flows such as the Auth Code flow provides user authentication and client auth depending on if the client is public or not. Use Cases
Client Registration and Verification We could define some safeguards for dynamic client registration, which may require a large spec change but it seems to me to be the most logical place to put a client verification step, or we accept that the ability to gain access to the network is enough of a safeguard against rogue actors. But it means any device that gains access to the network could both register, get a set of client credentials, and get tokens straight off the bat when using the client credentials grant. Flow Comparison Conclusion |
I should point out that if we permit the Client Creds Grant, further restrictions would need to be enforced within the Auth Server / added to the spec. For instance, we wouldn't want Broadcast Controllers clients registering with the CC Grant and the IS-05 scope, as it could then request tokens implicitly and perform IS-05 connections without user interaction. So we'd either restrict client credential flows to clients that only have IS-04 (or other applicable IS specs) as the registered scope and assign them a fixed value for the private |
Hi @dannymeloy, many thanks for your explanation. I think you've presented the issues quite succinctly, and absolutely agree with your conclusion regarding the balance between usability/interoperability, and security. As you may know, it was the usability angle that precipitated the question over bulk authorization, as the burden of authorizing multiple (tens, hundreds?) or nodes on the network would degrade the user experience. Currently broadcasters are happily using air-gapping to secure their networks (with no network level security), My concern is that without a security solution that is low touch from the end-user perspective there will be resistance to adoption of the standard. I agree that if used, the Client Credentials Grant should be reserved for those nodes with only IS-04 scope, and that equipment with a user interface such as the broadcast controller should use the Authorization Code Flow. In terms of mitigation, could a best practice be recommended around Auth Server registration restrictions e.g. limiting registrations by subnet, having an allow list etc. ? |
Moved to #76 |
Simon recently brought up the issue that the user interaction in the auth code flow (for initial authorization) means that deployments of large numbers of Nodes could be very involved.
Auth servers support various mechanisms to automate client registration, but the only method to deal with this for the token flows is to use the client credentials flow. At present we don't permit this, and I believe we've discussed its use at length previously.
Adding client credentials support is relatively straightforward from a spec perspective, but it's quite a significant change. It would also place a much greater importance on authentication/authorization steps during the client registration process, which we don't currently mandate. Further to this, given that client credentials may be more dangerous if leaked, it may be worth considering things like mutual TLS in order to bind credentials to a given key pair (see https://tools.ietf.org/html/rfc8705#section-2).
This needs further discussion.
The text was updated successfully, but these errors were encountered: