-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PM-10394] Add new item type ssh key (#4575)
* Add ssh key item type * Add fingerprint * Limit ssh key ciphers to new clients * Fix enc string length for 4096 bit rsa keys * Remove keyAlgorithm from ssh cipher * Add featureflag and exclude mobile from sync * Add ssh-agent flag
- Loading branch information
1 parent
4fa1f0d
commit 319b13d
Showing
7 changed files
with
87 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Bit.Core.Utilities; | ||
using Bit.Core.Vault.Models.Data; | ||
|
||
namespace Bit.Api.Vault.Models; | ||
|
||
public class CipherSSHKeyModel | ||
{ | ||
public CipherSSHKeyModel() { } | ||
|
||
public CipherSSHKeyModel(CipherSSHKeyData data) | ||
{ | ||
PrivateKey = data.PrivateKey; | ||
PublicKey = data.PublicKey; | ||
KeyFingerprint = data.KeyFingerprint; | ||
} | ||
|
||
[EncryptedString] | ||
[EncryptedStringLength(5000)] | ||
public string PrivateKey { get; set; } | ||
[EncryptedString] | ||
[EncryptedStringLength(5000)] | ||
public string PublicKey { get; set; } | ||
[EncryptedString] | ||
[EncryptedStringLength(1000)] | ||
public string KeyFingerprint { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,5 @@ public enum CipherType : byte | |
SecureNote = 2, | ||
Card = 3, | ||
Identity = 4, | ||
SSHKey = 5, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace Bit.Core.Vault.Models.Data; | ||
|
||
public class CipherSSHKeyData : CipherData | ||
{ | ||
public CipherSSHKeyData() { } | ||
|
||
public string PrivateKey { get; set; } | ||
public string PublicKey { get; set; } | ||
public string KeyFingerprint { get; set; } | ||
} |