Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
it-puppet-module-dirac
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ai
it-puppet-module-dirac
Commits
9a5edc8c
Verified
Commit
9a5edc8c
authored
1 month ago
by
Chris Burr
Browse files
Options
Downloads
Patches
Plain Diff
Support adding extra subjectAltName to the host certificate
parent
4f0c3ba4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/manifests/init.pp
+11
-10
11 additions, 10 deletions
code/manifests/init.pp
with
11 additions
and
10 deletions
code/manifests/init.pp
+
11
−
10
View file @
9a5edc8c
...
...
@@ -33,6 +33,7 @@
# @param oracle_support if set to true, ensures that the oracle RPM client libraries are installed
# @param oracle_client_version version of the oracle RPM client libraries to install
# @param tornado_processes number of processes tornado is going to spawn if the web app is used
# @param extra_aliases extra aliases to include as subjectAltName in the host certificate
#
#
# Although some parameters (like master_cs, master_config_name, extensions*, etc) could be part of the config_args,
...
...
@@ -53,7 +54,8 @@ class dirac (String $dirac_user = 'dirac', String $dirac_group = 'dirac',
Hash
$dirac_config_args
=
{},
Boolean
$oracle_support
=
false
,
String
$oracle_client_version
=
'12.1'
,
Numeric
$tornado_processes
=
4
){
Numeric
$tornado_processes
=
4
,
Array
$extra_aliases
=
[]){
# Retrieve the fully qualified name
...
...
@@ -89,22 +91,21 @@ class dirac (String $dirac_user = 'dirac', String $dirac_group = 'dirac',
target
=>
'/etc/grid-security/allCAs.pem'
,
}
# Collect the DNS alias to add them to the host certificate
if
$facts
[
'landb_ip_aliases'
]
{
# landb_ip_aliases are not FQDN
$aliases
=
split
(
$facts
[
'landb_ip_aliases'
],
','
)
$diraccertifalias
=
join
(
suffix
(
$aliases
,
'.cern.ch'
),
','
)
}
else
{
$diraccertifalias
=
''
$ip_aliases
=
$facts
[
'landb_ip_aliases'
]
?
{
undef
=>
[],
# no fact → empty list
default
=>
split
(
$facts
[
'landb_ip_aliases'
],
','
),
# comma-separated
}
$fqdn_ip_aliases
=
suffix
(
$ip_aliases
,
'.cern.ch'
)
$all_aliases
=
$fqdn_ip_aliases
+
$extra_aliases
$san_string
=
join
(
$all_aliases
,
','
)
certmgr::certificate
{
'dirac perm'
:
hostcert
=>
'/opt/dirac/etc/grid-security/hostcert.pem'
,
hostkey
=>
'/opt/dirac/etc/grid-security/hostkey.pem'
,
owner
=>
$dirac_user
,
group
=>
$dirac_group
,
san
=>
$
diraccertifalias
,
san
=>
$
san_string
,
hostkey_mode
=>
'0400'
,
hostcert_mode
=>
'0440'
,
# require => File['/opt/dirac/etc/grid-security/hostkey.pem'],
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment