From ef0bd73505b721e471a979313489faae7334c9b7 Mon Sep 17 00:00:00 2001 From: Justin Sherrill Date: Fri, 21 Feb 2014 09:49:48 -0500 Subject: [PATCH] adding post_sync_url secret token --- manifests/init.pp | 5 +++++ manifests/params.pp | 3 +++ templates/etc/katello/katello.yml.erb | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index dae34f28..ec78d3fe 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -18,6 +18,9 @@ # # $oauth_secret:: The oauth secret for talking to the candlepin API; # +# $post_sync_token:: The shared secret for pulp notifying katello about +# completed syncs +# # $log_dir:: Location for Katello log files to be placed # class katello ( @@ -29,6 +32,8 @@ $oauth_key = $katello::params::oauth_key, $oauth_secret = $katello::params::oauth_secret, + $post_sync_token = $katello::params::post_sync_token, + $log_dir = $katello::params::log_dir ) inherits katello::params { diff --git a/manifests/params.pp b/manifests/params.pp index aa9b6c5f..f61ebc06 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -79,6 +79,9 @@ $oauth_token_file = '/etc/katello/oauth_token-file' $oauth_secret = find_or_create_password($oauth_token_file) + $post_sync_token_file = '/etc/katello/post_sync_token' + $post_sync_token = find_or_create_password($post_sync_token_file) + # Subsystems settings $candlepin_url = 'https://localhost:8443/candlepin' $pulp_url = subsystem_url('pulp/api/v2/') diff --git a/templates/etc/katello/katello.yml.erb b/templates/etc/katello/katello.yml.erb index 47a87692..9ed85d62 100644 --- a/templates/etc/katello/katello.yml.erb +++ b/templates/etc/katello/katello.yml.erb @@ -25,7 +25,7 @@ common: use_ssl: true use_foreman: <%= scope.lookupvar("katello::params::use_foreman") %> - post_sync_url: http://localhost:5000/<%= scope.lookupvar("katello::params::deployment_url") %>/api/repositories/sync_complete + post_sync_url: https://localhost<%= scope.lookupvar("katello::params::deployment_url") %>/api/v2/repositories/sync_complete?token=<%= scope.lookupvar("post_sync_token") %> candlepin: url: <%= scope.lookupvar("katello::params::candlepin_url") %>