Class: SDM::KeyfactorSSHStore

Inherits:
Object
  • Object
show all
Defined in:
lib/models/porcelain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ca_file_path: nil, certificate_file_path: nil, default_certificate_authority_name: nil, default_certificate_profile_name: nil, default_end_entity_profile_name: nil, enrollment_code_env_var: nil, enrollment_username_env_var: nil, id: nil, key_file_path: nil, name: nil, server_address: nil, tags: nil) ⇒ KeyfactorSSHStore

Returns a new instance of KeyfactorSSHStore.



9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
# File 'lib/models/porcelain.rb', line 9450

def initialize(
  ca_file_path: nil,
  certificate_file_path: nil,
  default_certificate_authority_name: nil,
  default_certificate_profile_name: nil,
  default_end_entity_profile_name: nil,
  enrollment_code_env_var: nil,
  enrollment_username_env_var: nil,
  id: nil,
  key_file_path: nil,
  name: nil,
  server_address: nil,
  tags: nil
)
  @ca_file_path = ca_file_path == nil ? "" : ca_file_path
  @certificate_file_path = certificate_file_path == nil ? "" : certificate_file_path
  @default_certificate_authority_name = default_certificate_authority_name == nil ? "" : default_certificate_authority_name
  @default_certificate_profile_name = default_certificate_profile_name == nil ? "" : default_certificate_profile_name
  @default_end_entity_profile_name = default_end_entity_profile_name == nil ? "" : default_end_entity_profile_name
  @enrollment_code_env_var = enrollment_code_env_var == nil ? "" : enrollment_code_env_var
  @enrollment_username_env_var = enrollment_username_env_var == nil ? "" : enrollment_username_env_var
  @id = id == nil ? "" : id
  @key_file_path = key_file_path == nil ? "" : key_file_path
  @name = name == nil ? "" : name
  @server_address = server_address == nil ? "" : server_address
  @tags = tags == nil ? SDM::_porcelain_zero_value_tags() : tags
end

Instance Attribute Details

#ca_file_pathObject

Path to the root CA that signed the certificate passed to the client for HTTPS connection. This is not required if the CA is trusted by the host operating system. This should be a PEM formatted certificate, and doesn't necessarily have to be the CA that signed CertificateFile.



9422
9423
9424
# File 'lib/models/porcelain.rb', line 9422

def ca_file_path
  @ca_file_path
end

#certificate_file_pathObject

Path to client certificate in PEM format. This certificate must contain a client certificate that is recognized by the EJBCA instance represented by Hostname. This PEM file may also contain the private key associated with the certificate, but KeyFile can also be set to configure the private key.



9426
9427
9428
# File 'lib/models/porcelain.rb', line 9426

def certificate_file_path
  @certificate_file_path
end

#default_certificate_authority_nameObject

Name of EJBCA certificate authority that will enroll CSR.



9428
9429
9430
# File 'lib/models/porcelain.rb', line 9428

def default_certificate_authority_name
  @default_certificate_authority_name
end

#default_certificate_profile_nameObject

Certificate profile name that EJBCA will enroll the CSR with.



9430
9431
9432
# File 'lib/models/porcelain.rb', line 9430

def default_certificate_profile_name
  @default_certificate_profile_name
end

#default_end_entity_profile_nameObject

End entity profile that EJBCA will enroll the CSR with.



9432
9433
9434
# File 'lib/models/porcelain.rb', line 9432

def default_end_entity_profile_name
  @default_end_entity_profile_name
end

#enrollment_code_env_varObject

code used by EJBCA during enrollment. May be left blank if no code is required.



9434
9435
9436
# File 'lib/models/porcelain.rb', line 9434

def enrollment_code_env_var
  @enrollment_code_env_var
end

#enrollment_username_env_varObject

username that used by the EJBCA during enrollment. This can be left out. If so, the username must be auto-generated on the Keyfactor side.



9437
9438
9439
# File 'lib/models/porcelain.rb', line 9437

def enrollment_username_env_var
  @enrollment_username_env_var
end

#idObject

Unique identifier of the SecretStore.



9439
9440
9441
# File 'lib/models/porcelain.rb', line 9439

def id
  @id
end

#key_file_pathObject

Path to private key in PEM format. This file should contain the private key associated with the client certificate configured in CertificateFile.



9442
9443
9444
# File 'lib/models/porcelain.rb', line 9442

def key_file_path
  @key_file_path
end

#nameObject

Unique human-readable name of the SecretStore.



9444
9445
9446
# File 'lib/models/porcelain.rb', line 9444

def name
  @name
end

#server_addressObject

the host of the Key Factor CA



9446
9447
9448
# File 'lib/models/porcelain.rb', line 9446

def server_address
  @server_address
end

#tagsObject

Tags is a map of key, value pairs.



9448
9449
9450
# File 'lib/models/porcelain.rb', line 9448

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



9478
9479
9480
9481
9482
9483
9484
# File 'lib/models/porcelain.rb', line 9478

def to_json(options = {})
  hash = {}
  self.instance_variables.each do |var|
    hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
  end
  hash.to_json
end