Skip to content
This repository was archived by the owner on Jul 6, 2022. It is now read-only.

Commit b6e791f

Browse files
authored
adds security section (#47)
- add security section - update content - fix github deployment state - update about page based on readme.md
1 parent d0a6457 commit b6e791f

3 files changed

Lines changed: 64 additions & 2 deletions

File tree

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,38 @@ You can find the [reference](/docs/PSCredentialStore.md) in the /docs/ path as w
3535
- PowerShell >= `5.1`
3636
- .NET Framework >= `4.6` or .NET Core >= `1.0`
3737

38+
:bomb: About Security
39+
============
40+
41+
>This section explains some security topics and the the design decisions we made to balance the usage and security needs.
42+
43+
To be able to delegate `PSCredentials` objects we can't exclusively rely on the `SecureString` cmdlets. You can't
44+
decrypt and reuse such credentials from a different user account or even machine. This is caused by automatically
45+
generated encryption key which, is used create a `Secure String` based encrypted string.
46+
47+
In order to delegate a password, while still using the underlying security framework, we have to provide a custom
48+
encryption key. This leads to the fact, that everyone who has access to the key could encrypt or decrypt your data.
49+
50+
So we decided to use the public and private keys from valid certificates as part of the custom encryption keys to encrypt your data.
51+
52+
This means clearly: Everyone who has access to the `CredentialStore` needs also access to the certificate file to work with it.
53+
54+
Keep in mind you need to secure the access with your NTFS file permissions to avoid unwanted usage. Another option is
55+
to import the certificate into your certification vaults of you operating system. In this case you can grand the
56+
permission to the certificates itself.
57+
58+
Here is s brief hierarchy description of the certificate location: *(First match wins)*
59+
60+
| CredentialStore Type | Certificate Location |
61+
| -------------------- | ---------------------- |
62+
| Private | `CurrentUser`\\`My` |
63+
| Shared (Windows) | `CurrentUser`\\`My` |
64+
| | `LocalMachine`\\`Root` |
65+
| Shared (Linux) | `LocalMachine`\\`My` |
66+
| | `LocalMachine`\\`Root` |
67+
68+
69+
3870
:hammer_and_wrench: Installation
3971
============
4072

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ deploy:
6161
secure: M+bBX5/nKdJB0eViP7xtrLVTwf3vGDUA9N2MMprZp2i+9ZR3CBVcJnSzJWUmalhB
6262
artifact: PSCredentialStore.zip # upload all NuGet packages to release assets
6363
draft: false
64-
prerelease: true
64+
prerelease: false
6565
on:
6666
branch: master # build release on master branch changes
6767

docs/about_PSCredentialStore.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,36 @@ For more details read the [about_PSCredentialStore](/docs/about_PSCredentialStor
2626
- PowerShell >= `5.1`
2727
- .NET Framework >= `4.6` or .NET Core >= `1.0`
2828

29+
## About Security
30+
31+
>This section explains some security topics and the the design decisions we made to balance the usage and security needs.
32+
33+
To be able to delegate `PSCredentials` objects we can't exclusively rely on the `SecureString` cmdlets. You can't
34+
decrypt and reuse such credentials from a different user account or even machine. This is caused by automatically
35+
generated encryption key which, is used create a `Secure String` based encrypted string.
36+
37+
In order to delegate a password, while still using the underlying security framework, we have to provide a custom
38+
encryption key. This leads to the fact, that everyone who has access to the key could encrypt or decrypt your data.
39+
40+
So we decided to use the public and private keys from valid certificates as part of the custom encryption keys to encrypt your data.
41+
42+
This means clearly: Everyone who has access to the `CredentialStore` needs also access to the certificate file to work with it.
43+
44+
Keep in mind you need to secure the access with your NTFS file permissions to avoid unwanted usage. Another option is
45+
to import the certificate into your certification vaults of you operating system. In this case you can grand the
46+
permission to the certificates itself.
47+
48+
Here is s brief hierarchy description of the certificate location: *(First match wins)*
49+
50+
| CredentialStore Type | Certificate Location |
51+
| -------------------- | ---------------------- |
52+
| Private | `CurrentUser`\\`My` |
53+
| Shared (Windows) | `CurrentUser`\\`My` |
54+
| | `LocalMachine`\\`Root` |
55+
| Shared (Linux) | `LocalMachine`\\`My` |
56+
| | `LocalMachine`\\`Root` |
57+
58+
2959
## Installation
3060

3161
## PowerShellGallery.com (Recommended Way)
@@ -56,7 +86,7 @@ New-CredentialStore
5686
# Private credential store with certificate store usage
5787
New-CredentialStore -UseCertStore
5888
59-
# Shared credential rtore
89+
# Shared credential store
6090
New-CredentialStore -Shared
6191
6292
#Shared credential store in custom Location

0 commit comments

Comments
 (0)