-
Notifications
You must be signed in to change notification settings - Fork 1k
[Add]: Add SignClient Plugin
#3896
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
Conversation
baa51d5 to
61286b6
Compare
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <OutputType>Exe</OutputType> |
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.
Exe for tests?
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.
Every test project has this.
src/Plugins/SignClient/SignClient.cs
Outdated
| }; | ||
|
|
||
| // sign server run on localhost, so http is ok | ||
| var address = new IPEndPoint(IPAddress.Parse(settings.Host), settings.Port); |
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.
It's better to move the parse logic to settings, we will get a possible error earlier
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.
It's better to move the parse logic to settings, we will get a possible error earlier
Fixed
0a3b402 to
3337619
Compare
|
Why not create a agent? like ssh-agent and ssh-forward-agent? I would like to see a real key-exchange than some made up one. |
cschuchardt88
left a comment
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.
meeting talk
What needs to be changed? This is not about agent or key-exchange. This feature separates the part of signing with a private key and keeps the private key in a more secure place(sgx enclave, aws nitro, etc.). |
This is a feature being requested by NGD to protect privatekey in TEE, specifically for TEE, and has being under working for 2 months, its different from what you want. |
But they will be able to sign anything, without access to the private key |
|
The endPoint is not protected by password? |
doesn't mean this is right or correct solution |
Yes, this implementation has some issues and needs some improvement |
|
The expected behavior is: transactions or messages are constructed in the TEE side, and there will be whitelist/blacklist, only specific messages and trasnactions will be constructed and signed. This pr is only a plugin, it has no signing logic yet. but since author decides to close it. Lets keep discussing. |
It's good for me, but require https (possible now) and auth |
The problem with the current implementation is that any data can be signed, I'll change the current interface and implementation, so that it can only sign consensus messages.
I don't think
|
|
If it run in the same node, http is not the best protocol to communicate, use pipes |
Use |
|
@Wi1l-B0t lets talk requirements and solutions, having a different program like an agent service is fine. But having a plugin is not best solution. Plugins are optional. |
For the purpose of having TEE itself is optional, need TEE enabled server, not all node support it. |
|
https://github.com/ms-iot/security/tree/master/Limpet Building-and-Executing-TEE-based-applications-on-Azure-(April-2020).pdf using System;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Security.Cryptography.Cng;
public class TpmKeyExample
{
public static void Main(string[] args)
{
// 1. Create a CngKey using the Microsoft Platform Crypto Provider
CngKeyCreationParameters keyParams = new() { Provider = new CngProvider("Microsoft Platform Crypto Provider") };
CngKey key = CngKey.Create(CngAlgorithm.Rsa, "MyTPMKey", keyParams);
// 2. Use the key (e.g., sign a message)
using (RSACng rsa = new RSACng(key))
{
// ... your code to sign or encrypt using rsa ...
}
// 3. Export the public key (if needed)
// public byte[] publicKey = rsa.ExportSubjectPublicKeyInfo();
// 4. Clean up the key
key.Dispose();
}
} |
This may be a way to implement it. The |
This is a optional feature, so add this as a plugin |







Description
Add
SignClientPlugin to implement theSignerinterface, so that the signer can be implemented as an independent service.If want to protect the private keys in the node, these private keys cannot be stored as plain text in the node.
And the private key can only be decrypted in a protected place(for example: enclave).
But these protection mechanisms are varied, different cloud vendors and different CPUs have different mechanisms and usages.
So there are many benefits to implementing the protected part as a separate service.
This is a plugin, so if this plugin is not installed, it will not change any of the current behaviour.
Type of change
Checklist: