RDM cmdlet manage private key object

Resolved

RDM cmdlet manage private key object

avatar

Hello,
I am using RDM v13.6
I can’t find how to manage "private key" field from "private key" credential object with PowerShell cmdlet? I would like to create a new “private key” object or ready a key on an existing object. I succeed on retrieving user/login credential but it’s not my use case.
Any Help is appreciated
Thanks

All Comments (8)

avatar

Hi,

Managing the private key field in a Private Key credentials when the private key type is Data is not yet supported in the PowerShell module.

We will add it to our todo list.

Best regards,

Olivier Désalliers

avatar

Hi,
One of my colleague retrieve a cmdlet that was working some month ago (hereafter). Actually, PrivateKeyData argument is not yet available, I get safePrivateKeyData (that is encrypted) instead.
Do I miss something? How is it possible to get back PrivateKeyData argument?



PS C:\> ((Get-RDMSession | Where-Object {$_.ID -eq '35a1421a-2b0d-4b4f-81c3-1c2cddf801c2'}).Credentials).PrivateKeyData
-----BEGIN PRIVATE KEY-----
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDGvWdmBbbGvnA1
.....
Ew4Pe7l5XsMJrp83xEwrQOTbhQ==
-----END PRIVATE KEY-----

avatar

Hi,

It's still on our todo list.

We plan to work on it soon.

Best regards,

Olivier Désalliers

avatar

Hello,
3 years later, Is it now possible to create a PrivateKeySession with powershell cmdlet?
Thanks

avatar

Hello,

According to the information, I have gathered, this is still on the to-do list of our Engineering Department. That being said, I have contacted them to raise the priority of this feature.

Best regards,

James Lafleur

avatar

Hi,

The latest version of the PowerShell module can now create and set the information for a PrivateKey credential.
For security reason, we don't allow reading back the information unfortunately.

Let me know if this help your use case
Regards

Jonathan Lafontaine

avatar

Hi,
Could you provide the key name to set on a linux session in order to set a PrivateKey credential? Could you give us an exemple?

The following keys does not seems to be the right key
(Get-rdmsession -name XXX).PrivateKeyConnectionID or ((Get-rdmsession -name XXX).Credentials).PrivateKeyData



Thanks for you answer,
Regards

avatar

Hi,

Here's a example creating a Private Key credential

$s = New-RDMSession -Type Credential -Name 'private key cred'
$s.Credentials.CredentialType = "PrivateKey"
$s.Credentials.PrivateKeyOverrideUsername = 'username'
$s.Credentials.PrivateKeyType = 'Data'
$s.Credentials.PublicKey = 'rsa ...'
$s.Credentials.PrivateKeyData = 'private data'
$s.Credentials.PrivateKeyOverridePassword = (ConvertTo-SecureString -AsPlainText 'password')
Set-RDMSession $s


Let me know if this example helps.
Regards

Jonathan Lafontaine