Update manager to generate saml certs by default (#2316)

This commit is contained in:
Maxime Besson 2020-09-22 17:10:48 +02:00
parent 2ba14db40e
commit e72d7d7235
19 changed files with 49 additions and 9 deletions

View File

@ -139,7 +139,7 @@ site/htdocs/static/forms/post.html
site/htdocs/static/forms/postContainer.html
site/htdocs/static/forms/README.md
site/htdocs/static/forms/restore.html
site/htdocs/static/forms/RSAKey.html
site/htdocs/static/forms/RSACertKey.html
site/htdocs/static/forms/RSAKeyNoPassword.html
site/htdocs/static/forms/rule.html
site/htdocs/static/forms/ruleContainer.html

View File

@ -171,7 +171,7 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-
'RSAPrivateKey' => {
'test' => sub {
return $_[0] =~
m[^(?:(?:\-+\s*BEGIN\s+(?:RSA\s+)?PRIVATE\s+KEY\s*\-+\r?\n)?(?:Proc-Type:.*\r?\nDEK-Info:.*\r?\n[\r\n]*)?[a-zA-Z0-9/\+\r\n]+={0,2}(?:\r?\n\-+\s*END\s+(?:RSA\s+)?PRIVATE\s+KEY\s*\-+)?[\r\n]*)?$]s
m[^(?:(?:\-+\s*BEGIN\s+(?:(?:RSA|ENCRYPTED)\s+)?PRIVATE\s+KEY\s*\-+\r?\n)?(?:Proc-Type:.*\r?\nDEK-Info:.*\r?\n[\r\n]*)?[a-zA-Z0-9/\+\r\n]+={0,2}(?:\r?\n\-+\s*END\s+(?:(?:RSA|ENCRYPTED)\s+)?PRIVATE\s+KEY\s*\-+)?[\r\n]*)?$]s
? 1
: ( 1, '__badPemEncoding__' );
}

View File

@ -154,7 +154,7 @@ sub types {
test => sub {
return (
$_[0] =~
/^(?:(?:\-+\s*BEGIN\s+(?:RSA\s+)?PRIVATE\s+KEY\s*\-+\r?\n)?(?:Proc-Type:.*\r?\nDEK-Info:.*\r?\n[\r\n]*)?[a-zA-Z0-9\/\+\r\n]+={0,2}(?:\r?\n\-+\s*END\s+(?:RSA\s+)?PRIVATE\s+KEY\s*\-+)?[\r\n]*)?$/s
/^(?:(?:\-+\s*BEGIN\s+(?:(?:RSA|ENCRYPTED)\s+)?PRIVATE\s+KEY\s*\-+\r?\n)?(?:Proc-Type:.*\r?\nDEK-Info:.*\r?\n[\r\n]*)?[a-zA-Z0-9\/\+\r\n]+={0,2}(?:\r?\n\-+\s*END\s+(?:(?:RSA|ENCRYPTED)\s+)?PRIVATE\s+KEY\s*\-+)?[\r\n]*)?$/s
? (1)
: ( 1, '__badPemEncoding__' )
);

View File

@ -1065,7 +1065,7 @@ sub tree {
help => 'samlservice.html#security-parameters',
nodes => [ {
title => 'samlServiceSecuritySig',
form => 'RSAKey',
form => 'RSACertKey',
group => [
'samlServicePrivateKeySig',
'samlServicePrivateKeySigPwd',
@ -1074,7 +1074,7 @@ sub tree {
},
{
title => 'samlServiceSecurityEnc',
form => 'RSAKey',
form => 'RSACertKey',
group => [
'samlServicePrivateKeyEnc',
'samlServicePrivateKeyEncPwd',

View File

@ -691,6 +691,19 @@ llapp.controller 'TreeCtrl', [
console.log('Error sending test email')
# RSA keys generation
$scope.newCertificate = ->
$scope.showModal('password.html').then ->
$scope.waiting = true
currentNode = $scope.currentNode
password = $scope.result
$http.post("#{window.confPrefix}/newCertificate", {"password": password}).then (response) ->
currentNode.data[0].data = response.data.private
currentNode.data[1].data = password
currentNode.data[2].data = response.data.public
$scope.waiting = false
, readError
, ->
console.log('New key cancelled')
$scope.newRSAKey = ->
$scope.showModal('password.html').then ->
$scope.waiting = true

View File

@ -33,7 +33,7 @@
</div>
<script type="text/menu">
[{
"title": "newRSAKey",
"title": "newCertificate",
"icon": "plus-sign"
},{
"title": "download",

View File

@ -841,6 +841,24 @@ This file contains:
return console.log('Error sending test email');
});
};
$scope.newCertificate = function() {
return $scope.showModal('password.html').then(function() {
var currentNode, password;
$scope.waiting = true;
currentNode = $scope.currentNode;
password = $scope.result;
return $http.post(window.confPrefix + "/newCertificate", {
"password": password
}).then(function(response) {
currentNode.data[0].data = response.data["private"];
currentNode.data[1].data = password;
currentNode.data[2].data = response.data["public"];
return $scope.waiting = false;
}, readError);
}, function() {
return console.log('New key cancelled');
});
};
$scope.newRSAKey = function() {
return $scope.showModal('password.html').then(function() {
var currentNode, password;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -517,6 +517,7 @@
"newApp":"تطبيق جديد",
"newChain":"سلسلة جديدة",
"newCat":"فئة جديدة",
"newCertificate":"New certificate",
"newCfgAvailable":"إعدادات جديد متاح",
"newCmbMod":"وحدة جديدة",
"newCmbOver":"معايير جديدة",

View File

@ -517,6 +517,7 @@
"newApp":"New application",
"newChain":"New chain",
"newCat":"New category",
"newCertificate":"New certificate",
"newCfgAvailable":"A new configuration is available",
"newCmbMod":"New module",
"newCmbOver":"New parameter",

View File

@ -517,6 +517,7 @@
"newApp":"New application",
"newChain":"New chain",
"newCat":"New category",
"newCertificate":"New certificate",
"newCfgAvailable":"A new configuration is available",
"newCmbMod":"New module",
"newCmbOver":"New parameter",

View File

@ -517,6 +517,7 @@
"newApp":"Nouvelle application",
"newChain":"Nouvelle chaîne",
"newCat":"Nouvelle catégorie",
"newCertificate":"Nouveau certificat",
"newCfgAvailable":"Une nouvelle configuration est disponible",
"newCmbMod":"Nouveau module",
"newCmbOver":"Nouveau paramètre",

View File

@ -517,6 +517,7 @@
"newApp":"Nuova applicazione",
"newChain":"Nuova catena",
"newCat":"NUova categoria",
"newCertificate":"New certificate",
"newCfgAvailable":"É disponibile una nuova configurazione",
"newCmbMod":"Nuovo modulo",
"newCmbOver":"Nuovo parametro",

View File

@ -517,6 +517,7 @@
"newApp":"Nowa aplikacja",
"newChain":"Nowy łańcuch",
"newCat":"Nowa kategoria",
"newCertificate":"New certificate",
"newCfgAvailable":"Dostępna jest nowa konfiguracja",
"newCmbMod":"Nowy moduł",
"newCmbOver":"Nowy parametr",

View File

@ -517,6 +517,7 @@
"newApp":"Yeni uygulama",
"newChain":"Yeni zincir",
"newCat":"Yeni kategori",
"newCertificate":"New certificate",
"newCfgAvailable":"Yeni bir yapılandırma mevcut",
"newCmbMod":"Yeni modül",
"newCmbOver":"Yeni parametre",

View File

@ -517,6 +517,7 @@
"newApp":"Ứng dụng mới",
"newChain":"Chuỗi mới",
"newCat":"Danh mục mới",
"newCertificate":"New certificate",
"newCfgAvailable":"Một cấu hình mới có sẵn",
"newCmbMod":"Mô-đun mới",
"newCmbOver":"Tham số mới",

View File

@ -517,6 +517,7 @@
"newApp":"New application",
"newChain":"New chain",
"newCat":"New category",
"newCertificate":"New certificate",
"newCfgAvailable":"A new configuration is available",
"newCmbMod":"New module",
"newCmbOver":"New parameter",

File diff suppressed because one or more lines are too long