update references #60
16
README.md
16
README.md
@ -4,8 +4,8 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/OCram85/PSCredentialStore/">
|
<a href="https://gitea.ocram85.com/OCram85/PSCredentialStore/">
|
||||||
<img src="https://raw.githubusercontent.com/OCram85/PSCredentialStore/master/assets/social-logo.png" alt="PSCredentialStore" />
|
<img src="https://gitea.ocram85.com/OCram85/PSCredentialStore/raw/branch/master/assets/social-logo.png" alt="PSCredentialStore" />
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@ -14,16 +14,18 @@
|
|||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
🔐 A simple credential manager to store and reuse multiple PSCredential objects.
|
🔐 A simple cross-platform credential manager for PSCredential objects.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://cloud.drone.io/OCram85/PSCredentialStore">
|
<a href="https://drone.ocram85.com/OCram85/PSCredentialStore">
|
||||||
<img src="https://cloud.drone.io/api/badges/OCram85/PSCredentialStore/status.svg" alt="Master Branch Build Status">
|
<img src="https://drone.ocram85.com/api/badges/OCram85/PSCredentialStore/status.svg" alt="Master Branch Build Status">
|
||||||
</a>
|
</a>
|
||||||
|
<!-- CodeCove disabled for self hosting git
|
||||||
<a href="https://codecov.io/gh/OCram85/PSCredentialStore">
|
<a href="https://codecov.io/gh/OCram85/PSCredentialStore">
|
||||||
<img src="https://codecov.io/gh/OCram85/PSCredentialStore/branch/master/graph/badge.svg" alt="CodeCov">
|
<img src="https://codecov.io/gh/OCram85/PSCredentialStore/branch/master/graph/badge.svg" alt="CodeCov">
|
||||||
</a>
|
</a>
|
||||||
|
-->
|
||||||
<a href="https://www.powershellgallery.com/packages/PSCredentialStore">
|
<a href="https://www.powershellgallery.com/packages/PSCredentialStore">
|
||||||
<img src="https://img.shields.io/powershellgallery/v/PSCredentialStore.svg?style=plastic" alt="PowershellGallery Published Version">
|
<img src="https://img.shields.io/powershellgallery/v/PSCredentialStore.svg?style=plastic" alt="PowershellGallery Published Version">
|
||||||
</a>
|
</a>
|
||||||
@ -49,7 +51,7 @@ need to store credentials for non interactive usage like in scheduled tasks.
|
|||||||
Starting with version `1.0.0` PSCredential uses Pfx certificates fo encryption. You can use Pfx certificate files
|
Starting with version `1.0.0` PSCredential uses Pfx certificates fo encryption. You can use Pfx certificate files
|
||||||
or certificates stored in the certificate store.
|
or certificates stored in the certificate store.
|
||||||
|
|
||||||
For more details read the [about_PSCredentialStore](/docs/about_PSCredentialStore.md) page on github or via CLI with
|
For more details read the [about_PSCredentialStore](/docs/about_PSCredentialStore.md) page on gitea or via CLI with
|
||||||
`Get-Help about_PSCredentialStore`.
|
`Get-Help about_PSCredentialStore`.
|
||||||
|
|
||||||
You can find the [reference](/docs/PSCredentialStore.md) in the /docs/ path as well.
|
You can find the [reference](/docs/PSCredentialStore.md) in the /docs/ path as well.
|
||||||
@ -99,7 +101,7 @@ Here is s brief hierarchy description of the certificate location: *(First match
|
|||||||
|
|
||||||
### :building_construction: Manual Way
|
### :building_construction: Manual Way
|
||||||
|
|
||||||
* Take a look at the [Latest Release](https://github.com/OCram85/PSCredentialStore/releases/latest) page.
|
* Take a look at the [Latest Release](https://gitea.ocram85.com/OCram85/PSCredentialStore/releases/latest) page.
|
||||||
* Download the `PSCredentialStore.zip`.
|
* Download the `PSCredentialStore.zip`.
|
||||||
* Unpack the zip file and put it in your Powershell module path.
|
* Unpack the zip file and put it in your Powershell module path.
|
||||||
* Don't forget to change the NTFS permission flag in the context menu.
|
* Don't forget to change the NTFS permission flag in the context menu.
|
||||||
|
@ -1,147 +1,147 @@
|
|||||||
# PSCredentialStore
|
# PSCredentialStore
|
||||||
## about_PSCredentialStore
|
## about_PSCredentialStore
|
||||||
|
|
||||||
|
|
||||||
# SHORT DESCRIPTION
|
# SHORT DESCRIPTION
|
||||||
PSCredentialStore enables managing multiple PSCredential objects.
|
PSCredentialStore enables managing multiple PSCredential objects.
|
||||||
|
|
||||||
|
|
||||||
# LONG DESCRIPTION
|
# LONG DESCRIPTION
|
||||||
The PSCredentialStore is a simple credential manager for `PSCredential` objects. It stores PSCredentials in a simple json
|
The PSCredentialStore is a simple credential manager for `PSCredential` objects. It stores PSCredentials in a simple json
|
||||||
file. You can choose between a private and shared credential store. The private one exists in your profile and can
|
file. You can choose between a private and shared credential store. The private one exists in your profile and can
|
||||||
ony accessed by your account on the same machine. The shared store enables you to use different credentials for your
|
ony accessed by your account on the same machine. The shared store enables you to use different credentials for your
|
||||||
scripts without exposing them as plain text.
|
scripts without exposing them as plain text.
|
||||||
|
|
||||||
PSCredentialStore was developed to simplify the delegation of complex powershell scripts. In this case you often
|
PSCredentialStore was developed to simplify the delegation of complex powershell scripts. In this case you often
|
||||||
need to store credentials for non interactive usage like in scheduled tasks.
|
need to store credentials for non interactive usage like in scheduled tasks.
|
||||||
|
|
||||||
Starting with version `1.0.0` PSCredential uses Pfx certificates fo encryption. You can use Pfx certificate files
|
Starting with version `1.0.0` PSCredential uses Pfx certificates fo encryption. You can use Pfx certificate files
|
||||||
or certificates stored in the certificate store.
|
or certificates stored in the certificate store.
|
||||||
|
|
||||||
For more details read the [about_PSCredentialStore](/docs/about_PSCredentialStore.md) page on github or via CLI with
|
For more details read the [about_PSCredentialStore](/docs/about_PSCredentialStore.md) page on gitea or via CLI with
|
||||||
`Get-Help about_PSCredentialStore`.
|
`Get-Help about_PSCredentialStore`.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- PowerShell >= `5.1`
|
- PowerShell >= `5.1`
|
||||||
- .NET Framework >= `4.6` or .NET Core >= `1.0`
|
- .NET Framework >= `4.6` or .NET Core >= `1.0`
|
||||||
|
|
||||||
## About Security
|
## About Security
|
||||||
|
|
||||||
>This section explains some security topics and the the design decisions we made to balance the usage and security needs.
|
>This section explains some security topics and the the design decisions we made to balance the usage and security needs.
|
||||||
|
|
||||||
To be able to delegate `PSCredentials` objects we can't exclusively rely on the `SecureString` cmdlets. You can't
|
To be able to delegate `PSCredentials` objects we can't exclusively rely on the `SecureString` cmdlets. You can't
|
||||||
decrypt and reuse such credentials from a different user account or even machine. This is caused by automatically
|
decrypt and reuse such credentials from a different user account or even machine. This is caused by automatically
|
||||||
generated encryption key which, is used create a `Secure String` based encrypted string.
|
generated encryption key which, is used create a `Secure String` based encrypted string.
|
||||||
|
|
||||||
In order to delegate a password, while still using the underlying security framework, we have to provide a custom
|
In order to delegate a password, while still using the underlying security framework, we have to provide a custom
|
||||||
encryption key. This leads to the fact, that everyone who has access to the key could encrypt or decrypt your data.
|
encryption key. This leads to the fact, that everyone who has access to the key could encrypt or decrypt your data.
|
||||||
|
|
||||||
So we decided to use the public and private keys from valid certificates as part of the custom encryption keys to encrypt your data.
|
So we decided to use the public and private keys from valid certificates as part of the custom encryption keys to encrypt your data.
|
||||||
|
|
||||||
This means clearly: Everyone who has access to the `CredentialStore` needs also access to the certificate file to work with it.
|
This means clearly: Everyone who has access to the `CredentialStore` needs also access to the certificate file to work with it.
|
||||||
|
|
||||||
Keep in mind you need to secure the access with your NTFS file permissions to avoid unwanted usage. Another option is
|
Keep in mind you need to secure the access with your NTFS file permissions to avoid unwanted usage. Another option is
|
||||||
to import the certificate into your certification vaults of you operating system. In this case you can grand the
|
to import the certificate into your certification vaults of you operating system. In this case you can grand the
|
||||||
permission to the certificates itself.
|
permission to the certificates itself.
|
||||||
|
|
||||||
Here is s brief hierarchy description of the certificate location: *(First match wins)*
|
Here is s brief hierarchy description of the certificate location: *(First match wins)*
|
||||||
|
|
||||||
| CredentialStore Type | Certificate Location |
|
| CredentialStore Type | Certificate Location |
|
||||||
| -------------------- | ---------------------- |
|
| -------------------- | ---------------------- |
|
||||||
| Private | `CurrentUser`\\`My` |
|
| Private | `CurrentUser`\\`My` |
|
||||||
| Shared (Windows) | `CurrentUser`\\`My` |
|
| Shared (Windows) | `CurrentUser`\\`My` |
|
||||||
| | `LocalMachine`\\`Root` |
|
| | `LocalMachine`\\`Root` |
|
||||||
| Shared (Linux) | `LocalMachine`\\`My` |
|
| Shared (Linux) | `LocalMachine`\\`My` |
|
||||||
| | `LocalMachine`\\`Root` |
|
| | `LocalMachine`\\`Root` |
|
||||||
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
## PowerShellGallery.com (Recommended Way)
|
## PowerShellGallery.com (Recommended Way)
|
||||||
|
|
||||||
* Make sure you use PowerShell 5.1 or higher with `$PSVersionTable`.
|
* Make sure you use PowerShell 5.1 or higher with `$PSVersionTable`.
|
||||||
* Use the builtin PackageManagement and install with: `Install-Module PSCredentialStore`
|
* Use the builtin PackageManagement and install with: `Install-Module PSCredentialStore`
|
||||||
* Done. Start exploring the Module with `Import-Module PSCredentialStore ; Get-Command -Module PSCredentialStore`
|
* Done. Start exploring the Module with `Import-Module PSCredentialStore ; Get-Command -Module PSCredentialStore`
|
||||||
|
|
||||||
## Manual Way
|
## Manual Way
|
||||||
|
|
||||||
* Take a look at the [Latest Release](https://github.com/OCram85/PSCredentialStore/releases/latest) page.
|
* Take a look at the [Latest Release](https://github.com/OCram85/PSCredentialStore/releases/latest) page.
|
||||||
* Download the `PSCredentialStore.zip`.
|
* Download the `PSCredentialStore.zip`.
|
||||||
* Unpack the Zip and put it in your Powershell Module path.
|
* Unpack the Zip and put it in your Powershell Module path.
|
||||||
* Don't forget to change the NTFS permission flag in the context menu.
|
* Don't forget to change the NTFS permission flag in the context menu.
|
||||||
* Start with `Import-Module PSCredentialStore`
|
* Start with `Import-Module PSCredentialStore`
|
||||||
|
|
||||||
**1.** First we need a blank credential store. You can decide between a *private* or *shared* store. The private
|
**1.** First we need a blank credential store. You can decide between a *private* or *shared* store. The private
|
||||||
Credential Store can only be accessed with your profile on the machine you created it.
|
Credential Store can only be accessed with your profile on the machine you created it.
|
||||||
|
|
||||||
Starting with version `1.0.0` you can decide the storage type of your fresh created certificate. As default
|
Starting with version `1.0.0` you can decide the storage type of your fresh created certificate. As default
|
||||||
PSCredentialStore creates a new pfx certificate file beside the credential store itself. Optionally you can provide
|
PSCredentialStore creates a new pfx certificate file beside the credential store itself. Optionally you can provide
|
||||||
the parameter `-UseCertStore`. This imports the new certificate in the user or machine certificate store as well.
|
the parameter `-UseCertStore`. This imports the new certificate in the user or machine certificate store as well.
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
# Private credential store
|
# Private credential store
|
||||||
New-CredentialStore
|
New-CredentialStore
|
||||||
|
|
||||||
# Private credential store with certificate store usage
|
# Private credential store with certificate store usage
|
||||||
New-CredentialStore -UseCertStore
|
New-CredentialStore -UseCertStore
|
||||||
|
|
||||||
# Shared credential store
|
# Shared credential store
|
||||||
New-CredentialStore -Shared
|
New-CredentialStore -Shared
|
||||||
|
|
||||||
#Shared credential store in custom Location
|
#Shared credential store in custom Location
|
||||||
New-CredentialStore -Shared -Path 'C:\CredentialStore.json'
|
New-CredentialStore -Shared -Path 'C:\CredentialStore.json'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
**2.** Now you can manage your CredentialStoreItems:
|
**2.** Now you can manage your CredentialStoreItems:
|
||||||
```powershell
|
```powershell
|
||||||
# This will prompt for credentials and stores it in a private store
|
# This will prompt for credentials and stores it in a private store
|
||||||
New-CredentialStoreItem -RemoteHost 'dc01.myside.local' -Identifier 'AD'
|
New-CredentialStoreItem -RemoteHost 'dc01.myside.local' -Identifier 'AD'
|
||||||
|
|
||||||
# You can now use it in other scripts like this:
|
# You can now use it in other scripts like this:
|
||||||
$DCCreds = Get-CredentialStoreItem -RemoteHost 'dc01.myside.local' -Identifier 'AD'
|
$DCCreds = Get-CredentialStoreItem -RemoteHost 'dc01.myside.local' -Identifier 'AD'
|
||||||
Invoke-Command -ComputerName 'dc01.myside.local' -Credential $DCCreds -ScripBlock {Get-Process}
|
Invoke-Command -ComputerName 'dc01.myside.local' -Credential $DCCreds -ScripBlock {Get-Process}
|
||||||
```
|
```
|
||||||
|
|
||||||
The CredentialStore contains also a simple function to establish a connection with several systems or protocols.
|
The CredentialStore contains also a simple function to establish a connection with several systems or protocols.
|
||||||
If you have already installed the underlying framework your can connect to:
|
If you have already installed the underlying framework your can connect to:
|
||||||
|
|
||||||
* **CiscoUcs** - Establish a connection to a Cisco UCS fabric interconnect.
|
* **CiscoUcs** - Establish a connection to a Cisco UCS fabric interconnect.
|
||||||
* Required Modules: [`Cisco.UCS.Core`, `Cisco.UCSManager`](https://software.cisco.com/download/release.html?i=!y&mdfid=286305108&softwareid=284574017&release=2.1.1)
|
* Required Modules: [`Cisco.UCS.Core`, `Cisco.UCSManager`](https://software.cisco.com/download/release.html?i=!y&mdfid=286305108&softwareid=284574017&release=2.1.1)
|
||||||
* **FTP** - Establish a connection to a FTP host.
|
* **FTP** - Establish a connection to a FTP host.
|
||||||
* Required Modules: [`WinSCP`](https://www.powershellgallery.com/packages/WinSCP)
|
* Required Modules: [`WinSCP`](https://www.powershellgallery.com/packages/WinSCP)
|
||||||
* **NetAppFAS** - Establish a connection to a NetApp Clustered ONTAP filer.
|
* **NetAppFAS** - Establish a connection to a NetApp Clustered ONTAP filer.
|
||||||
* Required Modules: [`DataONTAP`](http://mysupport.netapp.com/tools/info/ECMLP2310788I.html?productID=61926)
|
* Required Modules: [`DataONTAP`](http://mysupport.netapp.com/tools/info/ECMLP2310788I.html?productID=61926)
|
||||||
* **VMware** - Establish a connection to a VMware vCenter or ESXi host.
|
* **VMware** - Establish a connection to a VMware vCenter or ESXi host.
|
||||||
* Required Modules: [`VMware.VimAutomation.Core`](https://www.powershellgallery.com/packages/VMware.PowerCLI)
|
* Required Modules: [`VMware.VimAutomation.Core`](https://www.powershellgallery.com/packages/VMware.PowerCLI)
|
||||||
* **CisServer** - Establish a connection to the CisServer Service on vCenter Host.
|
* **CisServer** - Establish a connection to the CisServer Service on vCenter Host.
|
||||||
* Required Modules: [`VMware.VimAutomation.Cis.Core`](https://www.powershellgallery.com/packages/VMware.PowerCLI))
|
* Required Modules: [`VMware.VimAutomation.Cis.Core`](https://www.powershellgallery.com/packages/VMware.PowerCLI))
|
||||||
* **ExchangeHTTP** - Establish a remote connection with an Exchange endpoint via http.
|
* **ExchangeHTTP** - Establish a remote connection with an Exchange endpoint via http.
|
||||||
* Requires PowerShell remoting
|
* Requires PowerShell remoting
|
||||||
* **ExchangeHTTPS** - Establish a remote connection with an Exchange endpoint via https.
|
* **ExchangeHTTPS** - Establish a remote connection with an Exchange endpoint via https.
|
||||||
* Requires PowerShell remoting
|
* Requires PowerShell remoting
|
||||||
* **SCP** - Establish a SCP connection.
|
* **SCP** - Establish a SCP connection.
|
||||||
* Required Modules: [`WinSCP`](https://www.powershellgallery.com/packages/WinSCP)
|
* Required Modules: [`WinSCP`](https://www.powershellgallery.com/packages/WinSCP)
|
||||||
# EXAMPLES
|
# EXAMPLES
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
Connect-To -RemoteHost "ucs.myside.local" -Type CiscoUcs
|
Connect-To -RemoteHost "ucs.myside.local" -Type CiscoUcs
|
||||||
Connect-To -RemoteHost "ftp.myside.local" -Type FTP
|
Connect-To -RemoteHost "ftp.myside.local" -Type FTP
|
||||||
Connect-To -RemoteHost "fas.myside.local" -Type NetAppFAS
|
Connect-To -RemoteHost "fas.myside.local" -Type NetAppFAS
|
||||||
Connect-To -RemoteHost "esx01.myside.local" -Type VMware
|
Connect-To -RemoteHost "esx01.myside.local" -Type VMware
|
||||||
Connect-To -RemoteHost "vcr.myside.local" -Type CisServer
|
Connect-To -RemoteHost "vcr.myside.local" -Type CisServer
|
||||||
```
|
```
|
||||||
# NOTE
|
# NOTE
|
||||||
|
|
||||||
|
|
||||||
# TROUBLESHOOTING NOTE
|
# TROUBLESHOOTING NOTE
|
||||||
|
|
||||||
|
|
||||||
# SEE ALSO
|
# SEE ALSO
|
||||||
|
|
||||||
|
|
||||||
# KEYWORDS
|
# KEYWORDS
|
||||||
|
|
||||||
- Credential
|
- Credential
|
||||||
- Store
|
- Store
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
Copyright = '(c) 2022 OCram85. All rights reserved.'
|
Copyright = '(c) 2022 OCram85. All rights reserved.'
|
||||||
|
|
||||||
# Description of the functionality provided by this module
|
# Description of the functionality provided by this module
|
||||||
Description = 'A simple credential manager to store and reuse multiple credential objects.'
|
Description = 'A simple cross-platform credential manager for PSCredential objects.'
|
||||||
|
|
||||||
# Minimum version of the PowerShell engine required by this module
|
# Minimum version of the PowerShell engine required by this module
|
||||||
PowerShellVersion = '5.1'
|
PowerShellVersion = '5.1'
|
||||||
@ -119,16 +119,16 @@
|
|||||||
Tags = 'CredentialStore', 'CredentialManager'
|
Tags = 'CredentialStore', 'CredentialManager'
|
||||||
|
|
||||||
# A URL to the license for this module.
|
# A URL to the license for this module.
|
||||||
LicenseUri = 'https://github.com/OCram85/PSCredentialStore/blob/master/LICENSE'
|
LicenseUri = 'https://gitea.ocram85.com/OCram85/PSCredentialStore/raw/branch/master/LICENSE'
|
||||||
|
|
||||||
# A URL to the main website for this project.
|
# A URL to the main website for this project.
|
||||||
ProjectUri = 'https://github.com/OCram85/PSCredentialStore'
|
ProjectUri = 'https://gitea.ocram85.com/OCram85/PSCredentialStore'
|
||||||
|
|
||||||
# A URL to an icon representing this module.
|
# A URL to an icon representing this module.
|
||||||
IconUri = 'https://raw.githubusercontent.com/OCram85/PSCredentialStore/master/assets/logo256.png'
|
IconUri = 'https://gitea.ocram85.com/OCram85/PSCredentialStore/raw/branch/master/assets/logo256.png'
|
||||||
|
|
||||||
# ReleaseNotes of this module
|
# ReleaseNotes of this module
|
||||||
ReleaseNotes = 'See https://github.com/OCram85/PSCredentialStore/releases page for details.'
|
ReleaseNotes = 'See https://gitea.ocram85.com/OCram85/PSCredentialStore/releases page for details.'
|
||||||
|
|
||||||
# Prerelease string of this module
|
# Prerelease string of this module
|
||||||
#Prerelease = 'preview'
|
#Prerelease = 'preview'
|
||||||
@ -144,7 +144,7 @@
|
|||||||
} # End of PrivateData hashtable
|
} # End of PrivateData hashtable
|
||||||
|
|
||||||
# HelpInfo URI of this module
|
# HelpInfo URI of this module
|
||||||
HelpInfoURI = 'https://github.com/OCram85/PSCredentialStore'
|
HelpInfoURI = 'https://gitea.ocram85.com/OCram85/PSCredentialStore'
|
||||||
|
|
||||||
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
|
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
|
||||||
# DefaultCommandPrefix = ''
|
# DefaultCommandPrefix = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user