Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
liu-puppet-modules
aes
Commits
94891c98
Commit
94891c98
authored
1 year ago
by
Filip Strömbäck
Browse files
Options
Downloads
Patches
Plain Diff
Migrated auth.pp to use 'vcsrepo'.
parent
7355b895
No related branches found
No related tags found
2 merge requests
!50
Fix: Puppet Defining "data_provider": "hiera" in metadata.json is deprecated....
,
!40
Merge from devel. Commits related to RHEL9 upgrade and pdk cleanup.
Pipeline
#101908
failed
1 year ago
Stage: puppet
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
files/auth/on_update.sh
+0
-10
0 additions, 10 deletions
files/auth/on_update.sh
manifests/aes_sw.pp
+1
-1
1 addition, 1 deletion
manifests/aes_sw.pp
manifests/auth.pp
+25
-20
25 additions, 20 deletions
manifests/auth.pp
with
26 additions
and
31 deletions
files/auth/on_update.sh
+
0
−
10
View file @
94891c98
#!/bin/bash
run_as_broker
=
$(
cat
<<
'
EOF
'
cd
# To make sure we have a decent GCC in our path.
source
/opt/rh/devtoolset-7/enable
...
...
@@ -17,12 +16,3 @@ cd
mkdir
-p
bin/
rm
-f
bin/auth
cp
src/auth/auth bin/
EOF
)
# Compile as the auth user
sudo
--user
auth
--group
auth
--set-home
--
bash
-c
"
$run_as_broker
"
# Then, we can restart the services.
systemctl restart aes_auth.service
This diff is collapsed.
Click to expand it.
manifests/aes_sw.pp
+
1
−
1
View file @
94891c98
# @summary
#
Describe what this class do!
#
Software for the AES system.
#
# Detailed summary info if suitable
#
...
...
This diff is collapsed.
Click to expand it.
manifests/auth.pp
+
25
−
20
View file @
94891c98
# @summary
#
Describe what this class do!
#
Authentication service for the communication module.
#
# Detailed summary info if suitable
# Sets up the authentication service for the communication module in the
# new exam system. Connects to the broker to authenticate users.
#
#
# @param keytab_production_base64
# Describe keytab_production_base64
# Keytab contents (in base64) for the Kerberos host key used to authenticate
# in the production environment (aes-devel.edu.liu.se).
#
# @param keytab_devel_base64
# Describe keytab_devel_base64
# Keytab contents (in base64) for the Kerberos host key used to authenticate
# in the development environment (aes-devel.edu.liu.se).
#
class
aes::auth
(
# Comment out old keytab params but
# keep temporay for comparison
#
# # Existing keytabs
# Optional[String] $keytab_production = undef,
# Optional[String] $keytab_devel = undef
#
# new base64+pkcs7 keytabs
Optional
[
String
]
$keytab_production_base64
=
undef
,
Optional
[
String
]
$keytab_devel_base64
=
undef
)
{
...
...
@@ -131,14 +126,24 @@ class aes::auth (
}
}
exec
{
'update-auth-repo'
:
command
=>
"/opt/utils/update_repo.sh
${auth_home}
/src https://oauth2:F-agHaRXCdyFy38q4c-N@gitlab.liu.se/upp-aes/communication.git
${server_type}
"
,
environment
=>
[
"REPO_USER=
${auth_user}
"
,
"REPO_GROUP=
${auth_group}
"
,
"REPO_ON_UPDATE=
${auth_home}
/on_update.sh"
],
# This command will need to run "on_update" as root in order to restart the service.
user
=>
root
,
group
=>
root
,
cwd
=>
$auth_home
,
require
=>
File
[
"
${auth_home}
/on_update.sh"
],
vcsrepo
{
"
${auth_home}
/src"
:
ensure
=>
latest
,
provider
=>
git
,
source
=>
'https://oauth2:F-agHaRXCdyFy38q4c-N@gitlab.liu.se/upp-aes/communication.git'
,
revision
=>
$server_type
,
owner
=>
$auth_user
,
group
=>
$auth_group
,
notify
=>
Exec
[
'compile-auth-repo'
],
}
exec
{
'compile-auth-repo'
:
user
=>
$auth_user
,
group
=>
$auth_group
,
path
=>
$auth_home
,
command
=>
"
$auth_home
/on_update.sh"
,
refreshonly
=>
true
,
require
=>
File
[
"
$
{auth_home/on_update.sh"
],
notify
=>
Service
[
$auth_service
],
}
service
{
$auth_service
:
...
...
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