Class: HttpdConfigmapGenerator::Principal
- Defined in:
- lib/httpd_configmap_generator/base/principal.rb
Constant Summary
Constants inherited from Base
Base::APACHE_USER, Base::HOSTNAME_COMMAND, Base::HTTP_KEYTAB, Base::IPA_COMMAND, Base::KERBEROS_CONFIG_FILE, Base::LDAP_ATTRS, Base::PAM_CONFIG, Base::SSSD_CONFIG, Base::TIMESTAMP_FORMAT
Instance Attribute Summary collapse
-
#hostname ⇒ Object
Returns the value of attribute hostname.
-
#name ⇒ Object
Kerberos principal name generated.
-
#realm ⇒ Object
EXAMPLE.COM.
-
#service ⇒ Object
HTTP.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Principal
constructor
A new instance of Principal.
- #register ⇒ Object
Methods inherited from Base
#command_run, #command_run!, #config_file_backup, #configure_pam, #cp_template, #create_target_directory, #debug_msg, #delete_target_file, #domain, #domain_from_host, #enable_kerberos_dns_lookups, #err_msg, #fetch_network_file, #file_binary?, #host_reachable?, #info_msg, #log_command_error, #optional_options, #path_join, #required_options, #rm_file, #run_configure, #template_directory, #update_hostname, #validate_options
Constructor Details
#initialize(options = {}) ⇒ Principal
Returns a new instance of Principal.
11 12 13 14 15 16 |
# File 'lib/httpd_configmap_generator/base/principal.rb', line 11 def initialize( = {}) .each { |n, v| public_send("#{n}=", v) } @realm = @realm.upcase if @realm @name ||= "#{service}/#{hostname}@#{realm}" @name end |
Instance Attribute Details
#hostname ⇒ Object
Returns the value of attribute hostname.
5 6 7 |
# File 'lib/httpd_configmap_generator/base/principal.rb', line 5 def hostname @hostname end |
#name ⇒ Object
Kerberos principal name generated
9 10 11 |
# File 'lib/httpd_configmap_generator/base/principal.rb', line 9 def name @name end |
#realm ⇒ Object
EXAMPLE.COM
6 7 8 |
# File 'lib/httpd_configmap_generator/base/principal.rb', line 6 def realm @realm end |
#service ⇒ Object
HTTP
7 8 9 |
# File 'lib/httpd_configmap_generator/base/principal.rb', line 7 def service @service end |
Instance Method Details
#register ⇒ Object
18 19 20 |
# File 'lib/httpd_configmap_generator/base/principal.rb', line 18 def register request unless exist? end |