-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve support for Foreman_proxy AD integration #429
Open
fatmcgav
wants to merge
2
commits into
theforeman:master
Choose a base branch
from
fatmcgav:improve_ad_realm_support
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -253,6 +253,8 @@ | |
# | ||
# $realm_principal:: Kerberos principal for realm updates | ||
# | ||
# $ad_config:: Active Directory config to pass into plugin | ||
# | ||
# $freeipa_config:: Path to FreeIPA default.conf configuration file | ||
# | ||
# $freeipa_remove_dns:: Remove DNS entries from FreeIPA when deleting hosts from realm | ||
|
@@ -415,9 +417,10 @@ | |
Enum['ipmitool', 'freeipmi', 'shell'] $bmc_default_provider = $::foreman_proxy::params::bmc_default_provider, | ||
Boolean $realm = $::foreman_proxy::params::realm, | ||
Foreman_proxy::ListenOn $realm_listen_on = $::foreman_proxy::params::realm_listen_on, | ||
String $realm_provider = $::foreman_proxy::params::realm_provider, | ||
Enum['freeipa', 'ad'] $realm_provider = $::foreman_proxy::params::realm_provider, | ||
Stdlib::Absolutepath $realm_keytab = $::foreman_proxy::params::realm_keytab, | ||
String $realm_principal = $::foreman_proxy::params::realm_principal, | ||
Optional[Foreman_proxy::AdConfig] $ad_config = $::foreman_proxy::params::ad_config, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We still have an issue in our installer with a Struct because of Kafo. theforeman/puppet-foreman#601 was limited by the same issue. I still need to look into this. |
||
Stdlib::Absolutepath $freeipa_config = $::foreman_proxy::params::freeipa_config, | ||
Boolean $freeipa_remove_dns = $::foreman_proxy::params::freeipa_remove_dns, | ||
Variant[Undef, String[0], Stdlib::Absolutepath] $keyfile = $::foreman_proxy::params::keyfile, | ||
|
@@ -436,6 +439,18 @@ | |
|
||
$real_registered_proxy_url = pick($registered_proxy_url, "https://${::fqdn}:${ssl_port}") | ||
|
||
if $realm_provider == 'ad' { | ||
class { '::foreman_proxy::plugin::realm::ad': | ||
realm => $ad_config['realm'], | ||
domain_controller => $ad_config['domain_controller'], | ||
ou => $ad_config['ou'], | ||
computername_prefix => $ad_config['computername_prefix'], | ||
computername_hash => $ad_config['computername_hash'], | ||
computername_use_fqdn => $ad_config['computername_use_fqdn'], | ||
version => $ad_config['version'], | ||
} | ||
} | ||
|
||
# lint:ignore:spaceship_operator_without_tag | ||
class { '::foreman_proxy::install': } | ||
~> class { '::foreman_proxy::config': } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -348,6 +348,7 @@ | |
$realm_provider = 'freeipa' | ||
$realm_keytab = "${etc}/foreman-proxy/freeipa.keytab" | ||
$realm_principal = '[email protected]' | ||
$ad_config = undef | ||
$freeipa_config = '/etc/ipa/default.conf' | ||
$freeipa_remove_dns = true | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
type Foreman_proxy::AdConfig = Struct[{ | ||
Optional[computername_hash] => Boolean, | ||
Optional[computername_prefix] => String[1], | ||
Optional[computername_use_fqdn] => Boolean, | ||
domain_controller => String[1], | ||
Optional[ou] => String[1], | ||
realm => String[1], | ||
Optional[version] => String[1] | ||
}] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to keep this as a string since that allows third party plugins to still use the same infra.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I can tweak that back...