Add credential and libraries to session recording resource (#3374)

This commit is contained in:
Todd authored and GitHub committed 2023-06-28 09:55:29 -07:00
1 parent b2266b69d4
commit 8d9222bec3
20 files changed
+2055 -150

No files matched your search

@@ -37,8 +37,8 @@ func AttributesMapToSshPrivateKeyAttributes(in map[string]interface{}) (*SshPriv
}
func (pt *Credential) GetSshPrivateKeyAttributes() (*SshPrivateKeyAttributes, error) {
if pt.Type != "sshprivatekey" {
return nil, fmt.Errorf("asked to fetch %s-type attributes but credential is of type %s", "sshprivatekey", pt.Type)
if pt.Type != "ssh_private_key" {
return nil, fmt.Errorf("asked to fetch %s-type attributes but credential is of type %s", "ssh_private_key", pt.Type)
}
return AttributesMapToSshPrivateKeyAttributes(pt.Attributes)
}
@@ -35,8 +35,8 @@ func AttributesMapToUsernamePasswordAttributes(in map[string]interface{}) (*User
}
func (pt *Credential) GetUsernamePasswordAttributes() (*UsernamePasswordAttributes, error) {
if pt.Type != "usernamepassword" {
return nil, fmt.Errorf("asked to fetch %s-type attributes but credential is of type %s", "usernamepassword", pt.Type)
if pt.Type != "username_password" {
return nil, fmt.Errorf("asked to fetch %s-type attributes but credential is of type %s", "username_password", pt.Type)
}
return AttributesMapToUsernamePasswordAttributes(pt.Attributes)
}