Class: SDM::KeyfactorX509Store

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) ⇒ KeyfactorX509Store

Returns a new instance of KeyfactorX509Store.



6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
# File 'lib/models/porcelain.rb', line 6242

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.



6214
6215
6216
# File 'lib/models/porcelain.rb', line 6214

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.



6218
6219
6220
# File 'lib/models/porcelain.rb', line 6218

def certificate_file_path
  @certificate_file_path
end

#default_certificate_authority_nameObject

Name of EJBCA certificate authority that will enroll CSR.



6220
6221
6222
# File 'lib/models/porcelain.rb', line 6220

def default_certificate_authority_name
  @default_certificate_authority_name
end

#default_certificate_profile_nameObject

Certificate profile name that EJBCA will enroll the CSR with.



6222
6223
6224
# File 'lib/models/porcelain.rb', line 6222

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.



6224
6225
6226
# File 'lib/models/porcelain.rb', line 6224

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.



6226
6227
6228
# File 'lib/models/porcelain.rb', line 6226

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.



6229
6230
6231
# File 'lib/models/porcelain.rb', line 6229

def enrollment_username_env_var
  @enrollment_username_env_var
end

#idObject

Unique identifier of the SecretStore.



6231
6232
6233
# File 'lib/models/porcelain.rb', line 6231

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.



6234
6235
6236
# File 'lib/models/porcelain.rb', line 6234

def key_file_path
  @key_file_path
end

#nameObject

Unique human-readable name of the SecretStore.



6236
6237
6238
# File 'lib/models/porcelain.rb', line 6236

def name
  @name
end

#server_addressObject

the host of the Key Factor CA



6238
6239
6240
# File 'lib/models/porcelain.rb', line 6238

def server_address
  @server_address
end

#tagsObject

Tags is a map of key, value pairs.



6240
6241
6242
# File 'lib/models/porcelain.rb', line 6240

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



6270
6271
6272
6273
6274
6275
6276
# File 'lib/models/porcelain.rb', line 6270

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