Introduction of the optional authentication mechanism for Labgrid (i.e. Oauth2) for securing gRPC communication between coordinator, client, exporter #1499
Replies: 3 comments 6 replies
-
Hi, I'd like you to know that we have read your questions and need to discuss this internally before posting an answer, thanks for your patience. |
Beta Was this translation helpful? Give feedback.
-
For now, we've tried to keep the complexity in labgrid low by relying on network- and SSH-level authentication to restrict access to our labgrid instance. I understand that in some scenarios, not all users of a labgrid instance should have access to all places. At a high level, we have mainly three kinds of connections that might need authentication:
For 1., I think token based authentication makes a lot of sense. The token can be passed as headers in gRPC and checked by the coordinator. I don't really have an opinion how the coordinator would check the token and then authorized the client for specific resources, so I'd be open to suggestions. The client could use a system-wide configuration to select some Python backend module which is then used to acquire a token from SSO (or from somewhere else). For 2., SSO doesn't really seem applicable, as the exporter runs as a service, without any specific (human) user being involved. So, perhaps a fixed token or TLS client certificates would be more appropriate. In a scenario with authentication, direct TCP connection to PDUs or other resource would likely be block by a firewall, so all actual control of the DUT would happen via SSH. Either by executing commands (
|
Beta Was this translation helpful? Give feedback.
-
Hi @jluebbe
We would like to use the OAuth2/OIDC (Open ID Connect) tokens with configurable roles + scopes. This would allow us to minimize the number of configuration changes and avoid configuring UNIX users or ACLs. We are aiming at generating tokens (JWT OAuth) with different privileges and for different purposes (so only selected, authenticated users would be able to delete the place, etc.). The usage of the standard Python 'entry-points' instrumentation would allow us to instantiate and use such plugins delivered as separate Python packages (installed within the labgrid virtual environment) - effectively avoiding polluting the labgrid code base with the company's specific implementations. The proposed authentication mechanism (using encrypted gRPC channels + passing JWT tokens in HTTP/2 headers): is based on the sample solutions available in the official gRPC repository: We believe this is an effective and lightweight way to implement authentication. Would it be possible to get your opinion about this proposed solution: #1541? |
Beta Was this translation helpful? Give feedback.
-
Hello,
I work for ARM Ltd.
We are planning to use the Labgrid for our testing and releases purposes (part of the build and CI/CD pipelines).
Currently, the main obstacle from our perspective (commercial organization) is the lack of an authentication/authorization.
I am aware that the Labgrid is an open-source, publicly available product that can be adapted by many organizations/projects, and the authentication/authorization mechanism may not be the desired thing.
I would like to get your opinions about the potential introduction of the authentication mechanism to secure a communication between the labgird-client(s), labgrid-cooridnator, and labgrid-exporter. The gRPC protocol provides many options to configure and use authentication.
The potential authentication mechanism would probably be OAuth2 with the external authentication provider (like Github, Google, Microsoft, Facebook, etc.), the mechanism would require to:
The scope of changes would probably include:
If possible, I would like to learn your opinions and views on:
?
Beta Was this translation helpful? Give feedback.
All reactions