Documentation ¶
Index ¶
- type AdvanceAuthResponse
- type AdvanceAuthResult
- type Challenge
- type ClientHints
- type Configuration
- type Connection
- type Mechanism
- type OAuthTokens
- type Response
- type Result
- type SearchResult
- type Secret
- type SecretField
- type SecretTemplate
- type SecretTemplateField
- type Server
- func (s Server) CreateSecret(secret Secret) (*Secret, error)
- func (s Server) DeleteSecret(id int) error
- func (s Server) GeneratePassword(slug string, template *SecretTemplate) (string, error)
- func (s Server) Secret(id int) (*Secret, error)
- func (s Server) SecretTemplate(id int) (*SecretTemplate, error)
- func (s Server) Secrets(searchText, field string) ([]Secret, error)
- func (s Server) UpdateSecret(secret Secret) (*Secret, error)
- type SshKeyArgs
- type StartAuthResponse
- type UserCredential
- type Vault
- type VaultsResponseModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdvanceAuthResponse ¶ added in v2.0.1
type AdvanceAuthResponse struct { Success bool `json:"success"` Result AdvanceAuthResult `json:"Result"` Message interface{} `json:"Message"` MessageID interface{} `json:"MessageID"` Exception interface{} `json:"Exception"` ErrorID interface{} `json:"ErrorID"` ErrorCode interface{} `json:"ErrorCode"` IsSoftError bool `json:"IsSoftError"` InnerExceptions interface{} `json:"InnerExceptions"` }
type AdvanceAuthResult ¶ added in v2.0.1
type AdvanceAuthResult struct { AuthLevel string `json:"AuthLevel"` DisplayName string `json:"DisplayName"` OAuthTokens OAuthTokens `json:"OAuthTokens"` UserId string `json:"UserId"` EmailAddress string `json:"EmailAddress"` UserDirectory string `json:"UserDirectory"` StartingPoint string `json:"StartingPoint"` PodFqdn string `json:"PodFqdn"` User string `json:"User"` CustomerID string `json:"CustomerID"` SystemID string `json:"SystemID"` SourceDsType string `json:"SourceDsType"` Summary string `json:"Summary"` }
type Challenge ¶ added in v2.0.1
type Challenge struct {
Mechanisms []Mechanism `json:"Mechanisms"`
}
type ClientHints ¶ added in v2.0.1
type Configuration ¶
type Configuration struct { Credentials UserCredential ServerURL, TLD, Tenant string TLSClientConfig *tls.Config // contains filtered or unexported fields }
Configuration settings for the API
type Connection ¶ added in v2.0.1
type OAuthTokens ¶ added in v2.0.1
type SearchResult ¶ added in v2.0.1
type Secret ¶
type Secret struct { Name string FolderID, ID, SiteID, SecretTemplateID int SecretPolicyID, PasswordTypeWebScriptID int `json:",omitempty"` LauncherConnectAsSecretID, CheckOutIntervalMinutes int Active, CheckedOut, CheckOutEnabled bool AutoChangeEnabled, CheckOutChangePasswordEnabled, DelayIndexing bool EnableInheritPermissions, EnableInheritSecretPolicy, ProxyEnabled bool RequiresComment, SessionRecordingEnabled, WebLauncherRequiresIncognitoMode bool Fields []SecretField `json:"Items"` SshKeyArgs *SshKeyArgs `json:",omitempty"` }
Secret represents a secret from Delinea Secret Server
type SecretField ¶
type SecretField struct {
ItemID, FieldID, FileAttachmentID int
FieldName, Slug string
FieldDescription, Filename, ItemValue string
IsFile, IsNotes, IsPassword bool
}
SecretField is an item (field) in the secret
type SecretTemplate ¶
type SecretTemplate struct { Name string ID int Fields []SecretTemplateField }
SecretTemplate represents a secret template from Delinea Secret Server
func (SecretTemplate) FieldIdToSlug ¶
func (s SecretTemplate) FieldIdToSlug(fieldId int) (string, bool)
FieldIdToSlug returns the shorthand alias (aka: "slug") of the field with the given field ID, and a boolean indicating whether the given ID actually identifies a field for the secret template.
func (SecretTemplate) FieldSlugToId ¶
func (s SecretTemplate) FieldSlugToId(slug string) (int, bool)
FieldSlugToId returns the field ID for the given shorthand alias (aka: "slug") of the field, and a boolean indicating whether the given slug actually identifies a field for the secret template.
func (SecretTemplate) GetField ¶
func (s SecretTemplate) GetField(slug string) (*SecretTemplateField, bool)
GetField returns the field with the given shorthand alias (aka: "slug"), and a boolean indicating whether the given slug actually identifies a field for the secret template .
type SecretTemplateField ¶
type SecretTemplateField struct { SecretTemplateFieldID int FieldSlugName, DisplayName, Description, Name, ListType string IsFile, IsList, IsNotes, IsPassword, IsRequired, IsUrl bool }
SecretTemplateField is a field in the secret template
type Server ¶
type Server struct {
Configuration
}
Server provides access to secrets stored in Delinea Secret Server
func New ¶
func New(config Configuration) (*Server, error)
New returns an initialized Secrets object
func (Server) DeleteSecret ¶
func (Server) GeneratePassword ¶
func (s Server) GeneratePassword(slug string, template *SecretTemplate) (string, error)
GeneratePassword generates and returns a password for the secret field identified by the given slug on the given template. The password adheres to the password requirements associated with the field. NOTE: this should only be used with fields whose IsPassword property is true.
func (Server) SecretTemplate ¶
func (s Server) SecretTemplate(id int) (*SecretTemplate, error)
SecretTemplate gets the secret template with id from the Secret Server of the given tenant
type SshKeyArgs ¶
type SshKeyArgs struct {
GeneratePassphrase, GenerateSshKeys bool
}
SshKeyArgs control whether to generate an SSH key pair and a private key passphrase when the secret template supports such generation.
WARNING: this struct is only used for write _request_ bodies, and will not be present in _response_ bodies.
type StartAuthResponse ¶ added in v2.0.1
type StartAuthResponse struct { Success bool `json:"success"` Result Result `json:"Result"` Message interface{} `json:"Message"` MessageID interface{} `json:"MessageID"` Exception interface{} `json:"Exception"` ErrorID interface{} `json:"ErrorID"` ErrorCode interface{} `json:"ErrorCode"` IsSoftError bool `json:"IsSoftError"` InnerExceptions interface{} `json:"InnerExceptions"` }
type UserCredential ¶
type UserCredential struct {
Domain, Username, Password, Token string
}
UserCredential holds the username and password that the API should use to authenticate to the REST API
type VaultsResponseModel ¶ added in v2.0.1
type VaultsResponseModel struct {
Vaults []Vault `json:"vaults"`
}