Class: HttpdConfigmapGenerator::Principal
- Defined in:
- lib/httpd_configmap_generator/base/principal.rb
Constant Summary
Constants inherited from Base
Base::APACHE_USER, Base::HTTP_KEYTAB, Base::IPA_COMMAND, Base::KERBEROS_CONFIG_FILE, Base::LDAP_ATTRS, Base::PAM_CONFIG, Base::SSSD_CONFIG, Base::TIMESTAMP_FORMAT
Constants included from Base::Network
Base::Network::HOSTNAME_COMMAND
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
#debug_msg, #err_msg, #info_msg, #optional_options, #required_options, #run_configure, #validate_options
Methods included from Base::Pam
Methods included from Base::Network
#domain, #domain_from_host, #fetch_network_file, #host_reachable?, #update_hostname
Methods included from Base::Kerberos
Methods included from Base::FileHelper
#cp_template, #create_target_directory, #delete_target_file, #file_binary?, #path_join, #rm_file, #template_directory
Methods included from Base::ConfigHelper
Methods included from Base::Command
#command_run, #command_run!, #log_command_error
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 |