|
|
dd68f4 |
From c5b7d9c16449f63bcf570772badcb5485cead3f7 Mon Sep 17 00:00:00 2001
|
|
|
dd68f4 |
From: "Endi S. Dewata" <edewata@redhat.com>
|
|
|
dd68f4 |
Date: Thu, 17 Nov 2016 00:10:55 +0100
|
|
|
dd68f4 |
Subject: [PATCH 1/8] Removed unused CA and KRA logging.properties.
|
|
|
dd68f4 |
|
|
|
dd68f4 |
The logging.properties files in CA and KRA folders are never
|
|
|
dd68f4 |
deployed so they have been removed.
|
|
|
dd68f4 |
|
|
|
dd68f4 |
https://fedorahosted.org/pki/ticket/1897
|
|
|
dd68f4 |
(cherry picked from commit f6ee4065c0bdb59e22fa92c5f56d49851f4ec6e1)
|
|
|
dd68f4 |
(cherry picked from commit 038f18ae08e760f96524a73c02f452711601bdb0)
|
|
|
dd68f4 |
---
|
|
|
dd68f4 |
base/ca/shared/conf/logging.properties | 70 ---------------------------------
|
|
|
dd68f4 |
base/kra/shared/conf/logging.properties | 70 ---------------------------------
|
|
|
dd68f4 |
2 files changed, 140 deletions(-)
|
|
|
dd68f4 |
delete mode 100644 base/ca/shared/conf/logging.properties
|
|
|
dd68f4 |
delete mode 100644 base/kra/shared/conf/logging.properties
|
|
|
dd68f4 |
|
|
|
dd68f4 |
diff --git a/base/ca/shared/conf/logging.properties b/base/ca/shared/conf/logging.properties
|
|
|
dd68f4 |
deleted file mode 100644
|
|
|
dd68f4 |
index 796cfc0..0000000
|
|
|
dd68f4 |
--- a/base/ca/shared/conf/logging.properties
|
|
|
dd68f4 |
+++ /dev/null
|
|
|
dd68f4 |
@@ -1,70 +0,0 @@
|
|
|
dd68f4 |
-# --- BEGIN COPYRIGHT BLOCK ---
|
|
|
dd68f4 |
-# Copyright (C) 2006-2010 Red Hat, Inc.
|
|
|
dd68f4 |
-# All rights reserved.
|
|
|
dd68f4 |
-# Modifications: configuration parameters
|
|
|
dd68f4 |
-# --- END COPYRIGHT BLOCK ---
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
dd68f4 |
-# contributor license agreements. See the NOTICE file distributed with
|
|
|
dd68f4 |
-# this work for additional information regarding copyright ownership.
|
|
|
dd68f4 |
-# The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
dd68f4 |
-# (the "License"); you may not use this file except in compliance with
|
|
|
dd68f4 |
-# the License. You may obtain a copy of the License at
|
|
|
dd68f4 |
-#
|
|
|
dd68f4 |
-# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
dd68f4 |
-#
|
|
|
dd68f4 |
-# Unless required by applicable law or agreed to in writing, software
|
|
|
dd68f4 |
-# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
dd68f4 |
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
dd68f4 |
-# See the License for the specific language governing permissions and
|
|
|
dd68f4 |
-# limitations under the License.
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-############################################################
|
|
|
dd68f4 |
-# Handler specific properties.
|
|
|
dd68f4 |
-# Describes specific configuration info for Handlers.
|
|
|
dd68f4 |
-############################################################
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-1catalina.org.apache.juli.FileHandler.level = FINE
|
|
|
dd68f4 |
-1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
|
|
|
dd68f4 |
-1catalina.org.apache.juli.FileHandler.prefix = catalina.
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-2localhost.org.apache.juli.FileHandler.level = FINE
|
|
|
dd68f4 |
-2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
|
|
|
dd68f4 |
-2localhost.org.apache.juli.FileHandler.prefix = localhost.
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-3manager.org.apache.juli.FileHandler.level = FINE
|
|
|
dd68f4 |
-3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
|
|
|
dd68f4 |
-3manager.org.apache.juli.FileHandler.prefix = manager.
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-4host-manager.org.apache.juli.FileHandler.level = FINE
|
|
|
dd68f4 |
-4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
|
|
|
dd68f4 |
-4host-manager.org.apache.juli.FileHandler.prefix = host-manager.
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-java.util.logging.ConsoleHandler.level = FINE
|
|
|
dd68f4 |
-java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-############################################################
|
|
|
dd68f4 |
-# Facility specific properties.
|
|
|
dd68f4 |
-# Provides extra control for each logger.
|
|
|
dd68f4 |
-############################################################
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
|
|
|
dd68f4 |
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO
|
|
|
dd68f4 |
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO
|
|
|
dd68f4 |
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-# For example, set the com.xyz.foo logger to only log SEVERE
|
|
|
dd68f4 |
-# messages:
|
|
|
dd68f4 |
-#org.apache.catalina.startup.ContextConfig.level = FINE
|
|
|
dd68f4 |
-#org.apache.catalina.startup.HostConfig.level = FINE
|
|
|
dd68f4 |
-#org.apache.catalina.session.ManagerBase.level = FINE
|
|
|
dd68f4 |
-#org.apache.catalina.core.AprLifecycleListener.level=FINE
|
|
|
dd68f4 |
diff --git a/base/kra/shared/conf/logging.properties b/base/kra/shared/conf/logging.properties
|
|
|
dd68f4 |
deleted file mode 100644
|
|
|
dd68f4 |
index 796cfc0..0000000
|
|
|
dd68f4 |
--- a/base/kra/shared/conf/logging.properties
|
|
|
dd68f4 |
+++ /dev/null
|
|
|
dd68f4 |
@@ -1,70 +0,0 @@
|
|
|
dd68f4 |
-# --- BEGIN COPYRIGHT BLOCK ---
|
|
|
dd68f4 |
-# Copyright (C) 2006-2010 Red Hat, Inc.
|
|
|
dd68f4 |
-# All rights reserved.
|
|
|
dd68f4 |
-# Modifications: configuration parameters
|
|
|
dd68f4 |
-# --- END COPYRIGHT BLOCK ---
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
dd68f4 |
-# contributor license agreements. See the NOTICE file distributed with
|
|
|
dd68f4 |
-# this work for additional information regarding copyright ownership.
|
|
|
dd68f4 |
-# The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
dd68f4 |
-# (the "License"); you may not use this file except in compliance with
|
|
|
dd68f4 |
-# the License. You may obtain a copy of the License at
|
|
|
dd68f4 |
-#
|
|
|
dd68f4 |
-# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
dd68f4 |
-#
|
|
|
dd68f4 |
-# Unless required by applicable law or agreed to in writing, software
|
|
|
dd68f4 |
-# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
dd68f4 |
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
dd68f4 |
-# See the License for the specific language governing permissions and
|
|
|
dd68f4 |
-# limitations under the License.
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-############################################################
|
|
|
dd68f4 |
-# Handler specific properties.
|
|
|
dd68f4 |
-# Describes specific configuration info for Handlers.
|
|
|
dd68f4 |
-############################################################
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-1catalina.org.apache.juli.FileHandler.level = FINE
|
|
|
dd68f4 |
-1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
|
|
|
dd68f4 |
-1catalina.org.apache.juli.FileHandler.prefix = catalina.
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-2localhost.org.apache.juli.FileHandler.level = FINE
|
|
|
dd68f4 |
-2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
|
|
|
dd68f4 |
-2localhost.org.apache.juli.FileHandler.prefix = localhost.
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-3manager.org.apache.juli.FileHandler.level = FINE
|
|
|
dd68f4 |
-3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
|
|
|
dd68f4 |
-3manager.org.apache.juli.FileHandler.prefix = manager.
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-4host-manager.org.apache.juli.FileHandler.level = FINE
|
|
|
dd68f4 |
-4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
|
|
|
dd68f4 |
-4host-manager.org.apache.juli.FileHandler.prefix = host-manager.
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-java.util.logging.ConsoleHandler.level = FINE
|
|
|
dd68f4 |
-java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-############################################################
|
|
|
dd68f4 |
-# Facility specific properties.
|
|
|
dd68f4 |
-# Provides extra control for each logger.
|
|
|
dd68f4 |
-############################################################
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
|
|
|
dd68f4 |
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO
|
|
|
dd68f4 |
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO
|
|
|
dd68f4 |
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
-# For example, set the com.xyz.foo logger to only log SEVERE
|
|
|
dd68f4 |
-# messages:
|
|
|
dd68f4 |
-#org.apache.catalina.startup.ContextConfig.level = FINE
|
|
|
dd68f4 |
-#org.apache.catalina.startup.HostConfig.level = FINE
|
|
|
dd68f4 |
-#org.apache.catalina.session.ManagerBase.level = FINE
|
|
|
dd68f4 |
-#org.apache.catalina.core.AprLifecycleListener.level=FINE
|
|
|
dd68f4 |
--
|
|
|
dd68f4 |
1.8.3.1
|
|
|
dd68f4 |
|
|
|
dd68f4 |
|
|
|
dd68f4 |
From b64fa73078df0e750a54fd8ee4fb1581f5be0e97 Mon Sep 17 00:00:00 2001
|
|
|
dd68f4 |
From: "Endi S. Dewata" <edewata@redhat.com>
|
|
|
dd68f4 |
Date: Thu, 17 Nov 2016 00:27:58 +0100
|
|
|
dd68f4 |
Subject: [PATCH 3/8] Updated logging.properties.
|
|
|
dd68f4 |
|
|
|
dd68f4 |
To reduce maintenance the logging.properties is no longer copied
|
|
|
dd68f4 |
into the instance folder during deployment. Instead, a link will
|
|
|
dd68f4 |
be created in /etc/pki/<instance> pointing to the default file
|
|
|
dd68f4 |
in /usr/share/pki/server/conf.
|
|
|
dd68f4 |
|
|
|
dd68f4 |
The default logging.properties has been updated to only log
|
|
|
dd68f4 |
messages with level WARNING or higher on the console.
|
|
|
dd68f4 |
|
|
|
dd68f4 |
https://fedorahosted.org/pki/ticket/1897
|
|
|
dd68f4 |
(cherry picked from commit e674bc51b4d23bc362a1312addd0b09625cf5747)
|
|
|
dd68f4 |
(cherry picked from commit 882ad281c235cbe3a3074d1da00acb8c1b486d6f)
|
|
|
dd68f4 |
---
|
|
|
dd68f4 |
base/common/share/etc/logging.properties | 1 +
|
|
|
dd68f4 |
.../deployment/scriptlets/instance_layout.py | 16 +++++++++++++--
|
|
|
dd68f4 |
base/server/share/conf/logging.properties | 24 +++++-----------------
|
|
|
dd68f4 |
3 files changed, 20 insertions(+), 21 deletions(-)
|
|
|
dd68f4 |
|
|
|
dd68f4 |
diff --git a/base/common/share/etc/logging.properties b/base/common/share/etc/logging.properties
|
|
|
dd68f4 |
index bd5b5b6..fe879c4 100644
|
|
|
dd68f4 |
--- a/base/common/share/etc/logging.properties
|
|
|
dd68f4 |
+++ b/base/common/share/etc/logging.properties
|
|
|
dd68f4 |
@@ -26,3 +26,4 @@ java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
|
|
|
dd68f4 |
java.util.logging.SimpleFormatter.format = %4$s: %5$s%6$s%n
|
|
|
dd68f4 |
|
|
|
dd68f4 |
.level = WARNING
|
|
|
dd68f4 |
+.handlers = java.util.logging.ConsoleHandler
|
|
|
dd68f4 |
diff --git a/base/server/python/pki/server/deployment/scriptlets/instance_layout.py b/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
|
|
|
dd68f4 |
index c470c7f..07eecbd 100644
|
|
|
dd68f4 |
--- a/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
|
|
|
dd68f4 |
+++ b/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
|
|
|
dd68f4 |
@@ -55,6 +55,13 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
|
|
|
dd68f4 |
deployer.mdict['pki_instance_configuration_path'],
|
|
|
dd68f4 |
ignore_cb=file_ignore_callback_src_server)
|
|
|
dd68f4 |
|
|
|
dd68f4 |
+ # Link /etc/pki/<instance>/logging.properties
|
|
|
dd68f4 |
+ # to /usr/share/pki/server/conf/logging.properties.
|
|
|
dd68f4 |
+ deployer.symlink.create(
|
|
|
dd68f4 |
+ os.path.join(deployer.mdict['pki_source_server_path'], "logging.properties"),
|
|
|
dd68f4 |
+ os.path.join(deployer.mdict['pki_instance_configuration_path'],
|
|
|
dd68f4 |
+ "logging.properties"))
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
# create /etc/sysconfig/<instance>
|
|
|
dd68f4 |
deployer.file.copy_with_slot_substitution(
|
|
|
dd68f4 |
deployer.mdict['pki_source_tomcat_conf'],
|
|
|
dd68f4 |
@@ -219,5 +226,10 @@ def file_ignore_callback_src_server(src, names):
|
|
|
dd68f4 |
config.pki_log.info(log.FILE_EXCLUDE_CALLBACK_2, src, names,
|
|
|
dd68f4 |
extra=config.PKI_INDENTATION_LEVEL_1)
|
|
|
dd68f4 |
|
|
|
dd68f4 |
- excludes = {'schema.ldif', 'database.ldif', 'manager.ldif', 'pki.xml'}
|
|
|
dd68f4 |
- return excludes
|
|
|
dd68f4 |
+ return {
|
|
|
dd68f4 |
+ 'schema.ldif',
|
|
|
dd68f4 |
+ 'database.ldif',
|
|
|
dd68f4 |
+ 'manager.ldif',
|
|
|
dd68f4 |
+ 'pki.xml',
|
|
|
dd68f4 |
+ 'logging.properties'
|
|
|
dd68f4 |
+ }
|
|
|
dd68f4 |
diff --git a/base/server/share/conf/logging.properties b/base/server/share/conf/logging.properties
|
|
|
dd68f4 |
index dfdc0a4..7c1ac37 100644
|
|
|
dd68f4 |
--- a/base/server/share/conf/logging.properties
|
|
|
dd68f4 |
+++ b/base/server/share/conf/logging.properties
|
|
|
dd68f4 |
@@ -21,28 +21,11 @@
|
|
|
dd68f4 |
|
|
|
dd68f4 |
handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
|
|
|
dd68f4 |
|
|
|
dd68f4 |
-.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
############################################################
|
|
|
dd68f4 |
# Handler specific properties.
|
|
|
dd68f4 |
# Describes specific configuration info for Handlers.
|
|
|
dd68f4 |
############################################################
|
|
|
dd68f4 |
|
|
|
dd68f4 |
-# Change the following settings to allow for more granular debugging:
|
|
|
dd68f4 |
-#
|
|
|
dd68f4 |
-# * 1catalina.org.apache.juli.FileHandler.level = ALL
|
|
|
dd68f4 |
-# * 2localhost.org.apache.juli.FileHandler.level = ALL
|
|
|
dd68f4 |
-#
|
|
|
dd68f4 |
-# and add the following lines to the end of this file:
|
|
|
dd68f4 |
-#
|
|
|
dd68f4 |
-# * org.apache.catalina.loader.level = FINEST
|
|
|
dd68f4 |
-# * org.apache.catalina.loader.WebappClassLoader.level = FINEST
|
|
|
dd68f4 |
-# * org.apache.catalina.loader.StandardClassLoader.level = FINEST
|
|
|
dd68f4 |
-# * com.netscape.cms.servlet.base.level = FINEST
|
|
|
dd68f4 |
-# * com.netscape.cms.servlet.base.CMSStartServlet.level = FINEST
|
|
|
dd68f4 |
-# * java.net.URLClassLoader.level = FINEST
|
|
|
dd68f4 |
-#
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
1catalina.org.apache.juli.FileHandler.level = FINE
|
|
|
dd68f4 |
1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
|
|
|
dd68f4 |
1catalina.org.apache.juli.FileHandler.prefix = catalina.
|
|
|
dd68f4 |
@@ -59,15 +42,18 @@ handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.Fil
|
|
|
dd68f4 |
4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
|
|
|
dd68f4 |
4host-manager.org.apache.juli.FileHandler.prefix = host-manager.
|
|
|
dd68f4 |
|
|
|
dd68f4 |
-java.util.logging.ConsoleHandler.level = FINE
|
|
|
dd68f4 |
+java.util.logging.ConsoleHandler.level = ALL
|
|
|
dd68f4 |
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
+java.util.logging.SimpleFormatter.format = %4$s: %5$s%6$s%n
|
|
|
dd68f4 |
|
|
|
dd68f4 |
############################################################
|
|
|
dd68f4 |
# Facility specific properties.
|
|
|
dd68f4 |
# Provides extra control for each logger.
|
|
|
dd68f4 |
############################################################
|
|
|
dd68f4 |
|
|
|
dd68f4 |
+.level = WARNING
|
|
|
dd68f4 |
+.handlers = java.util.logging.ConsoleHandler
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
|
|
|
dd68f4 |
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
|
|
|
dd68f4 |
|
|
|
dd68f4 |
--
|
|
|
dd68f4 |
1.8.3.1
|
|
|
dd68f4 |
|
|
|
dd68f4 |
|
|
|
dd68f4 |
From c7f0585680dbfdd0019da6d2713dc9b1ded42761 Mon Sep 17 00:00:00 2001
|
|
|
dd68f4 |
From: "Endi S. Dewata" <edewata@redhat.com>
|
|
|
dd68f4 |
Date: Thu, 17 Nov 2016 03:41:25 +0100
|
|
|
dd68f4 |
Subject: [PATCH 4/8] Updated log4j.properties.
|
|
|
dd68f4 |
|
|
|
dd68f4 |
To reduce maintenance the log4j.properties is no longer copied
|
|
|
dd68f4 |
into the instance folder during deployment. Instead, a link will
|
|
|
dd68f4 |
be created in the /var/lib/pki/<instance>/lib folder pointing to
|
|
|
dd68f4 |
the default file in /usr/share/pki/server/conf.
|
|
|
dd68f4 |
|
|
|
dd68f4 |
The default log4j.properties has been updated to remove redundant
|
|
|
dd68f4 |
lines. By default only log messages with level WARN or higher will
|
|
|
dd68f4 |
be logged on the console.
|
|
|
dd68f4 |
|
|
|
dd68f4 |
https://fedorahosted.org/pki/ticket/1897
|
|
|
dd68f4 |
(cherry picked from commit bfd7fc1c9ec665b4affda5bf48c9aca20f8f5775)
|
|
|
dd68f4 |
(cherry picked from commit 4f381a0832ec069370f9461aabbbd1033371d6b0)
|
|
|
dd68f4 |
---
|
|
|
dd68f4 |
.../deployment/scriptlets/instance_layout.py | 7 +++-
|
|
|
dd68f4 |
base/server/share/conf/log4j.properties | 45 ++++++++++------------
|
|
|
dd68f4 |
2 files changed, 27 insertions(+), 25 deletions(-)
|
|
|
dd68f4 |
|
|
|
dd68f4 |
diff --git a/base/server/python/pki/server/deployment/scriptlets/instance_layout.py b/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
|
|
|
dd68f4 |
index 07eecbd..330aa46 100644
|
|
|
dd68f4 |
--- a/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
|
|
|
dd68f4 |
+++ b/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
|
|
|
dd68f4 |
@@ -139,8 +139,12 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
|
|
|
dd68f4 |
os.path.join(
|
|
|
dd68f4 |
deployer.mdict['pki_instance_lib'],
|
|
|
dd68f4 |
name))
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+ # Link /var/lib/pki/<instance>/lib/log4j.properties
|
|
|
dd68f4 |
+ # to /usr/share/pki/server/conf/log4j.properties.
|
|
|
dd68f4 |
deployer.symlink.create(
|
|
|
dd68f4 |
- deployer.mdict['pki_instance_conf_log4j_properties'],
|
|
|
dd68f4 |
+ os.path.join(deployer.mdict['pki_source_server_path'],
|
|
|
dd68f4 |
+ "log4j.properties"),
|
|
|
dd68f4 |
deployer.mdict['pki_instance_lib_log4j_properties'])
|
|
|
dd68f4 |
|
|
|
dd68f4 |
# Link /var/lib/pki/<instance>/common to /usr/share/pki/server/common
|
|
|
dd68f4 |
@@ -231,5 +235,6 @@ def file_ignore_callback_src_server(src, names):
|
|
|
dd68f4 |
'database.ldif',
|
|
|
dd68f4 |
'manager.ldif',
|
|
|
dd68f4 |
'pki.xml',
|
|
|
dd68f4 |
+ 'log4j.properties',
|
|
|
dd68f4 |
'logging.properties'
|
|
|
dd68f4 |
}
|
|
|
dd68f4 |
diff --git a/base/server/share/conf/log4j.properties b/base/server/share/conf/log4j.properties
|
|
|
dd68f4 |
index dd4bd93..43b6009 100644
|
|
|
dd68f4 |
--- a/base/server/share/conf/log4j.properties
|
|
|
dd68f4 |
+++ b/base/server/share/conf/log4j.properties
|
|
|
dd68f4 |
@@ -1,30 +1,27 @@
|
|
|
dd68f4 |
# --- BEGIN COPYRIGHT BLOCK ---
|
|
|
dd68f4 |
-# Copyright (C) 2012 Red Hat, Inc.
|
|
|
dd68f4 |
+# Copyright (C) 2016 Red Hat, Inc.
|
|
|
dd68f4 |
# All rights reserved.
|
|
|
dd68f4 |
# Modifications: configuration parameters
|
|
|
dd68f4 |
# --- END COPYRIGHT BLOCK ---
|
|
|
dd68f4 |
|
|
|
dd68f4 |
-log4j.rootLogger=debug, R
|
|
|
dd68f4 |
-log4j.appender.R=org.apache.log4j.RollingFileAppender
|
|
|
dd68f4 |
-log4j.appender.R.File=${catalina.base}/logs/catalina.out
|
|
|
dd68f4 |
-log4j.appender.R.MaxFileSize=10MB
|
|
|
dd68f4 |
-log4j.appender.R.MaxBackupIndex=10
|
|
|
dd68f4 |
-log4j.appender.R.layout=org.apache.log4j.PatternLayout
|
|
|
dd68f4 |
-log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
|
|
|
dd68f4 |
-log4j.logger.org.apache.catalina=DEBUG, R
|
|
|
dd68f4 |
-log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=DEBUG, R
|
|
|
dd68f4 |
-log4j.logger.org.apache.catalina.core=DEBUG, R
|
|
|
dd68f4 |
-log4j.logger.org.apache.catalina.session=DEBUG, R
|
|
|
dd68f4 |
+# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
dd68f4 |
+# contributor license agreements. See the NOTICE file distributed with
|
|
|
dd68f4 |
+# this work for additional information regarding copyright ownership.
|
|
|
dd68f4 |
+# The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
dd68f4 |
+# (the "License"); you may not use this file except in compliance with
|
|
|
dd68f4 |
+# the License. You may obtain a copy of the License at
|
|
|
dd68f4 |
+#
|
|
|
dd68f4 |
+# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
dd68f4 |
+#
|
|
|
dd68f4 |
+# Unless required by applicable law or agreed to in writing, software
|
|
|
dd68f4 |
+# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
dd68f4 |
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
dd68f4 |
+# See the License for the specific language governing permissions and
|
|
|
dd68f4 |
+# limitations under the License.
|
|
|
dd68f4 |
|
|
|
dd68f4 |
-#resteasy
|
|
|
dd68f4 |
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
|
|
dd68f4 |
-log4j.appender.stdout.Target=System.out
|
|
|
dd68f4 |
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
|
|
dd68f4 |
-log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p (%c:%L) - %m%n
|
|
|
dd68f4 |
-log4j.rootLogger=warn, stdout
|
|
|
dd68f4 |
-log4j.rootCategory=debug, stdout
|
|
|
dd68f4 |
-log4j.category.org.jboss.resteasy.core=debug
|
|
|
dd68f4 |
-log4j.category.org.jboss.resteasy.plugins.providers=debug
|
|
|
dd68f4 |
-log4j.category.org.jboss.resteasy.specimpl=debug
|
|
|
dd68f4 |
-log4j.category.org.jboss.resteasy.plugins.server=debug
|
|
|
dd68f4 |
-log4j.logger.org.jboss.resteasy.mock=debug
|
|
|
dd68f4 |
+log4j.appender.console = org.apache.log4j.ConsoleAppender
|
|
|
dd68f4 |
+log4j.appender.console.Target = System.err
|
|
|
dd68f4 |
+log4j.appender.console.layout = org.apache.log4j.PatternLayout
|
|
|
dd68f4 |
+log4j.appender.console.layout.ConversionPattern = %p: %m%n
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+log4j.rootLogger = WARN, console
|
|
|
dd68f4 |
--
|
|
|
dd68f4 |
1.8.3.1
|
|
|
dd68f4 |
|
|
|
dd68f4 |
|
|
|
dd68f4 |
From 730880bbd32aca11d5dd075c25aca68a8840b883 Mon Sep 17 00:00:00 2001
|
|
|
dd68f4 |
From: "Endi S. Dewata" <edewata@redhat.com>
|
|
|
dd68f4 |
Date: Tue, 8 Nov 2016 16:42:01 +0100
|
|
|
dd68f4 |
Subject: [PATCH 5/8] Added man pages for logging configuration.
|
|
|
dd68f4 |
|
|
|
dd68f4 |
New man pages have been added for the common and server logging
|
|
|
dd68f4 |
configurations.
|
|
|
dd68f4 |
|
|
|
dd68f4 |
https://fedorahosted.org/pki/ticket/1897
|
|
|
dd68f4 |
(cherry picked from commit dbff34d56615e888823c89a4a4f6d476bb1ccf17)
|
|
|
dd68f4 |
(cherry picked from commit 751df721c158f98320d6abc37ef4380acf29a42a)
|
|
|
dd68f4 |
---
|
|
|
dd68f4 |
base/common/man/man5/pki-logging.5 | 94 +++++++++++++++
|
|
|
dd68f4 |
base/common/share/etc/logging.properties | 2 -
|
|
|
dd68f4 |
base/server/man/man5/pki-server-logging.5 | 191 ++++++++++++++++++++++++++++++
|
|
|
dd68f4 |
3 files changed, 285 insertions(+), 2 deletions(-)
|
|
|
dd68f4 |
create mode 100644 base/common/man/man5/pki-logging.5
|
|
|
dd68f4 |
create mode 100644 base/server/man/man5/pki-server-logging.5
|
|
|
dd68f4 |
|
|
|
dd68f4 |
diff --git a/base/common/man/man5/pki-logging.5 b/base/common/man/man5/pki-logging.5
|
|
|
dd68f4 |
new file mode 100644
|
|
|
dd68f4 |
index 0000000..ab37402
|
|
|
dd68f4 |
--- /dev/null
|
|
|
dd68f4 |
+++ b/base/common/man/man5/pki-logging.5
|
|
|
dd68f4 |
@@ -0,0 +1,94 @@
|
|
|
dd68f4 |
+.\" First parameter, NAME, should be all caps
|
|
|
dd68f4 |
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
|
|
dd68f4 |
+.\" other parameters are allowed: see man(7), man(1)
|
|
|
dd68f4 |
+.TH pki-logging 5 "November 3, 2016" "version 10.3" "PKI Common Logging Configuration" Dogtag Team
|
|
|
dd68f4 |
+.\" Please adjust this date whenever revising the man page.
|
|
|
dd68f4 |
+.\"
|
|
|
dd68f4 |
+.\" Some roff macros, for reference:
|
|
|
dd68f4 |
+.\" .nh disable hyphenation
|
|
|
dd68f4 |
+.\" .hy enable hyphenation
|
|
|
dd68f4 |
+.\" .ad l left justify
|
|
|
dd68f4 |
+.\" .ad b justify to both left and right margins
|
|
|
dd68f4 |
+.\" .nf disable filling
|
|
|
dd68f4 |
+.\" .fi enable filling
|
|
|
dd68f4 |
+.\" .br insert line break
|
|
|
dd68f4 |
+.\" .sp <n> insert n+1 empty lines
|
|
|
dd68f4 |
+.\" for man page specific macros, see man(7)
|
|
|
dd68f4 |
+.SH NAME
|
|
|
dd68f4 |
+pki-logging \- PKI Common Logging Configuration
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH LOCATION
|
|
|
dd68f4 |
+/usr/share/pki/etc/logging.properties, /etc/pki/logging.properties
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH DESCRIPTION
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+PKI clients and tools use java.util.logging (JUL) as the logging framework
|
|
|
dd68f4 |
+(see https://docs.oracle.com/javase/8/docs/api/java/util/logging/package-summary.html).
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+The default logging configuration is located at /usr/share/pki/etc/logging.properties.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+By default only log messages with level WARNING or higher will be logged on the console.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.IP
|
|
|
dd68f4 |
+.nf
|
|
|
dd68f4 |
+java.util.logging.ConsoleHandler.level = ALL
|
|
|
dd68f4 |
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
|
|
|
dd68f4 |
+java.util.logging.SimpleFormatter.format = %4$s: %5$s%6$s%n
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+\[char46]level = WARNING
|
|
|
dd68f4 |
+\[char46]handlers = java.util.logging.ConsoleHandler
|
|
|
dd68f4 |
+.fi
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+For more information see the following documents:
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.nf
|
|
|
dd68f4 |
+- https://docs.oracle.com/javase/8/docs/api/java/util/logging/ConsoleHandler.html
|
|
|
dd68f4 |
+- https://docs.oracle.com/javase/8/docs/api/java/util/logging/Level.html
|
|
|
dd68f4 |
+- https://docs.oracle.com/javase/8/docs/api/java/util/logging/SimpleFormatter.html
|
|
|
dd68f4 |
+- https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html
|
|
|
dd68f4 |
+.fi
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH CUSTOMIZATION
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+To customize the logging configuration, copy the default logging configuration into a new location:
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+$ cp /usr/share/pki/etc/logging.properties /etc/pki/logging.properties
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+Then edit the file as needed.
|
|
|
dd68f4 |
+For example, to troubleshoot issues with PKI library add the following lines:
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.IP
|
|
|
dd68f4 |
+.nf
|
|
|
dd68f4 |
+netscape.level = ALL
|
|
|
dd68f4 |
+com.netscape.level = ALL
|
|
|
dd68f4 |
+org.dogtagpki.level = ALL
|
|
|
dd68f4 |
+.fi
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+To troubleshoot issues with RESTEasy add the following line:
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.IP
|
|
|
dd68f4 |
+.nf
|
|
|
dd68f4 |
+org.jboss.resteasy.level = ALL
|
|
|
dd68f4 |
+.fi
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+Then specify the location of the custom logging configuration in the following parameter in /etc/pki/pki.conf:
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.IP
|
|
|
dd68f4 |
+.nf
|
|
|
dd68f4 |
+LOGGING_CONFIG=/etc/pki/logging.properties
|
|
|
dd68f4 |
+.fi
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+Then restart the application.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH AUTHORS
|
|
|
dd68f4 |
+Dogtag Team <pki-devel@redhat.com>.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH COPYRIGHT
|
|
|
dd68f4 |
+Copyright (c) 2016 Red Hat, Inc. This is licensed under the GNU General Public License, version 2 (GPLv2). A copy of this license is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH SEE ALSO
|
|
|
dd68f4 |
+.BR pki-server-logging(5)
|
|
|
dd68f4 |
diff --git a/base/common/share/etc/logging.properties b/base/common/share/etc/logging.properties
|
|
|
dd68f4 |
index fe879c4..2a14c4e 100644
|
|
|
dd68f4 |
--- a/base/common/share/etc/logging.properties
|
|
|
dd68f4 |
+++ b/base/common/share/etc/logging.properties
|
|
|
dd68f4 |
@@ -19,8 +19,6 @@
|
|
|
dd68f4 |
# See the License for the specific language governing permissions and
|
|
|
dd68f4 |
# limitations under the License.
|
|
|
dd68f4 |
|
|
|
dd68f4 |
-handlers = java.util.logging.ConsoleHandler
|
|
|
dd68f4 |
-
|
|
|
dd68f4 |
java.util.logging.ConsoleHandler.level = ALL
|
|
|
dd68f4 |
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
|
|
|
dd68f4 |
java.util.logging.SimpleFormatter.format = %4$s: %5$s%6$s%n
|
|
|
dd68f4 |
diff --git a/base/server/man/man5/pki-server-logging.5 b/base/server/man/man5/pki-server-logging.5
|
|
|
dd68f4 |
new file mode 100644
|
|
|
dd68f4 |
index 0000000..9aed7d8
|
|
|
dd68f4 |
--- /dev/null
|
|
|
dd68f4 |
+++ b/base/server/man/man5/pki-server-logging.5
|
|
|
dd68f4 |
@@ -0,0 +1,191 @@
|
|
|
dd68f4 |
+.\" First parameter, NAME, should be all caps
|
|
|
dd68f4 |
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
|
|
dd68f4 |
+.\" other parameters are allowed: see man(7), man(1)
|
|
|
dd68f4 |
+.TH pki-server-logging 5 "November 3, 2016" "version 10.3" "PKI Server Logging Configuration" Dogtag Team
|
|
|
dd68f4 |
+.\" Please adjust this date whenever revising the man page.
|
|
|
dd68f4 |
+.\"
|
|
|
dd68f4 |
+.\" Some roff macros, for reference:
|
|
|
dd68f4 |
+.\" .nh disable hyphenation
|
|
|
dd68f4 |
+.\" .hy enable hyphenation
|
|
|
dd68f4 |
+.\" .ad l left justify
|
|
|
dd68f4 |
+.\" .ad b justify to both left and right margins
|
|
|
dd68f4 |
+.\" .nf disable filling
|
|
|
dd68f4 |
+.\" .fi enable filling
|
|
|
dd68f4 |
+.\" .br insert line break
|
|
|
dd68f4 |
+.\" .sp <n> insert n+1 empty lines
|
|
|
dd68f4 |
+.\" for man page specific macros, see man(7)
|
|
|
dd68f4 |
+.SH NAME
|
|
|
dd68f4 |
+pki-server-logging \- PKI Server Logging Configuration
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH LOCATION
|
|
|
dd68f4 |
+/etc/pki/<instance>/logging.properties, /var/lib/pki/<instance>/lib/log4j.properties, /etc/pki/<instance>/<subsystem>/CS.cfg
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH DESCRIPTION
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+PKI server logging can be configured using the following logging frameworks:
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.nf
|
|
|
dd68f4 |
+- java.util.logging (JUL) (https://docs.oracle.com/javase/8/docs/api/java/util/logging/package-summary.html)
|
|
|
dd68f4 |
+- Log4j (http://logging.apache.org/log4j/1.2/)
|
|
|
dd68f4 |
+- Internal Logging
|
|
|
dd68f4 |
+.fi
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SS java.util.logging (JUL)
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+Tomcat uses JUL as the default logging framework.
|
|
|
dd68f4 |
+The configuration is described in http://tomcat.apache.org/tomcat-7.0-doc/logging.html and http://tomcat.apache.org/tomcat-8.0-doc/logging.html.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+The default configuration is located at /usr/share/pki/server/conf/logging.properties.
|
|
|
dd68f4 |
+During server deployment a link will be created at /etc/pki/<instance>/logging.properties.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+By default only log messages with level WARNING or higher will be logged on the console (i.e. systemd journal).
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.IP
|
|
|
dd68f4 |
+.nf
|
|
|
dd68f4 |
+java.util.logging.ConsoleHandler.level = ALL
|
|
|
dd68f4 |
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
|
|
|
dd68f4 |
+java.util.logging.SimpleFormatter.format = %4$s: %5$s%6$s%n
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+\[char46]level = WARNING
|
|
|
dd68f4 |
+\[char46]handlers = java.util.logging.ConsoleHandler
|
|
|
dd68f4 |
+.fi
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+The systemd journal can be viewed with the following command:
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.nf
|
|
|
dd68f4 |
+$ journalctl -u pki-tomcatd@<instance>.service
|
|
|
dd68f4 |
+.fi
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+For more information see the following documents:
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.nf
|
|
|
dd68f4 |
+- https://docs.oracle.com/javase/8/docs/api/java/util/logging/ConsoleHandler.html
|
|
|
dd68f4 |
+- https://docs.oracle.com/javase/8/docs/api/java/util/logging/Level.html
|
|
|
dd68f4 |
+- https://docs.oracle.com/javase/8/docs/api/java/util/logging/SimpleFormatter.html
|
|
|
dd68f4 |
+- https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html
|
|
|
dd68f4 |
+.fi
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SS Log4j
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+The default Tomcat 7 classpath does include Log4j, but the server itself is not configured to use Log4j for logging by default.
|
|
|
dd68f4 |
+However, since the Log4j is in the classpath the RESTEasy will use Log4j for logging automatically (see https://docs.jboss.org/resteasy/docs/3.0.6.Final/userguide/html/Installation_Configuration.html#RESTEasyLogging).
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+The default Log4j configuration is located at /usr/share/pki/server/conf/log4j.properties.
|
|
|
dd68f4 |
+During server deployment a link will be created at /var/lib/pki/<instance>/lib/log4j.properties.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+By default only log messages with level WARN or higher will be logged on the console (i.e. systemd journal).
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.IP
|
|
|
dd68f4 |
+.nf
|
|
|
dd68f4 |
+log4j.appender.console = org.apache.log4j.ConsoleAppender
|
|
|
dd68f4 |
+log4j.appender.console.Target = System.err
|
|
|
dd68f4 |
+log4j.appender.console.layout = org.apache.log4j.PatternLayout
|
|
|
dd68f4 |
+log4j.appender.console.layout.ConversionPattern = %p: %m%n
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+log4j.rootLogger = WARN, console
|
|
|
dd68f4 |
+.fi
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+The default Tomcat 8 classpath does not include Log4j, so RESTEasy will use JUL instead.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+For more information see the following documents:
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.nf
|
|
|
dd68f4 |
+- http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/ConsoleAppender.html
|
|
|
dd68f4 |
+- http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html
|
|
|
dd68f4 |
+- http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html
|
|
|
dd68f4 |
+.fi
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SS Internal Logging
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+Each PKI subsystem uses an internal logging framework for debugging purposes.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+The logging configuration is stored in /etc/pki/<instance>/<subsystem>/CS.cfg.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.IP
|
|
|
dd68f4 |
+.nf
|
|
|
dd68f4 |
+debug.enabled=true
|
|
|
dd68f4 |
+debug.level=0
|
|
|
dd68f4 |
+debug.filename=/var/lib/pki/<instance>/logs/<subsystem>/debug
|
|
|
dd68f4 |
+debug.hashkeytypes=
|
|
|
dd68f4 |
+debug.showcaller=false
|
|
|
dd68f4 |
+.fi
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+The \fBdebug.enabled\fP determines whether the debug log is enabled. By default it is enabled.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+The \fBdebug.level\fP determines the amount of details to be logged. The value ranges from 0 (most details) to 10 (least details). The default is 0.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+The \fBdebug.filename\fP determines the debug log file location. By default it is located at /var/lib/pki/<instance>/logs/<subsystem>/debug.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+The \fBdebug.hashkeytypes\fP is a comma-separated list of additional components to log. By default it's empty.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+The \fBdebug.showcaller\fP determines whether to include the caller information in the log message. By default it's disabled.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH CUSTOMIZATION
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SS java.util.logging (JUL)
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+To customize JUL configuration, replace the link with a copy of the default configuration:
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.nf
|
|
|
dd68f4 |
+$ rm -f /etc/pki/<instance>/logging.properties
|
|
|
dd68f4 |
+$ cp /usr/share/pki/server/conf/logging.properties /etc/pki/<instance>
|
|
|
dd68f4 |
+$ chown pkiuser.pkiuser /etc/pki/<instance>/logging.properties
|
|
|
dd68f4 |
+.fi
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+Then edit the file as needed.
|
|
|
dd68f4 |
+For example, to troubleshoot issues with PKI library add the following lines:
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.IP
|
|
|
dd68f4 |
+.nf
|
|
|
dd68f4 |
+netscape.level = ALL
|
|
|
dd68f4 |
+com.netscape.level = ALL
|
|
|
dd68f4 |
+org.dogtagpki.level = ALL
|
|
|
dd68f4 |
+.fi
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+To troubleshoot issues with RESTEasy add the following line (unless Log4j is installed in Tomcat classpath):
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.IP
|
|
|
dd68f4 |
+.nf
|
|
|
dd68f4 |
+org.jboss.resteasy.level = ALL
|
|
|
dd68f4 |
+.fi
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+Then restart the server.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SS Log4j
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+To customize Log4j configuration, replace the link with a copy of the default configuration:
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.nf
|
|
|
dd68f4 |
+$ rm -f /var/lib/pki/<instance>/lib/log4j.properties
|
|
|
dd68f4 |
+$ cp /usr/share/pki/server/conf/log4j.properties /var/lib/pki/<instance>/lib
|
|
|
dd68f4 |
+$ chown pkiuser.pkiuser /var/lib/pki/<instance>/lib/log4j.properties
|
|
|
dd68f4 |
+.fi
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+Then edit the file as needed.
|
|
|
dd68f4 |
+For example, to troubleshoot issues with RESTEasy add the following line (unless Log4j is not installed in Tomcat classpath):
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.IP
|
|
|
dd68f4 |
+.nf
|
|
|
dd68f4 |
+log4j.logger.org.jboss.resteasy = ALL
|
|
|
dd68f4 |
+.fi
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+Then restart the server.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SS Internal Logging
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+To customize the internal logging configuration, edit the CS.cfg as needed, then restart the server.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH AUTHORS
|
|
|
dd68f4 |
+Dogtag Team <pki-devel@redhat.com>.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH COPYRIGHT
|
|
|
dd68f4 |
+Copyright (c) 2016 Red Hat, Inc. This is licensed under the GNU General Public License, version 2 (GPLv2). A copy of this license is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH SEE ALSO
|
|
|
dd68f4 |
+.BR pki-logging(5)
|
|
|
dd68f4 |
--
|
|
|
dd68f4 |
1.8.3.1
|
|
|
dd68f4 |
|
|
|
dd68f4 |
|
|
|
dd68f4 |
From f76d73502c7b013f0fe7eb3b5665553a8005ad02 Mon Sep 17 00:00:00 2001
|
|
|
dd68f4 |
From: "Endi S. Dewata" <edewata@redhat.com>
|
|
|
dd68f4 |
Date: Sat, 29 Oct 2016 07:53:02 +0200
|
|
|
dd68f4 |
Subject: [PATCH 7/8] Added man pages for PKCS #12 utilities.
|
|
|
dd68f4 |
|
|
|
dd68f4 |
New man pages have been added: pki-pkcs12, pki-pkcs12-cert, and
|
|
|
dd68f4 |
pki-pkcs12-key.
|
|
|
dd68f4 |
|
|
|
dd68f4 |
https://fedorahosted.org/pki/ticket/1920
|
|
|
dd68f4 |
(cherry picked from commit e8b2aa675f617efd2d40984651e0b501dc334690)
|
|
|
dd68f4 |
(cherry picked from commit 580410f5b2a90a46b0a456c2a6c8523e56e55f77)
|
|
|
dd68f4 |
---
|
|
|
dd68f4 |
base/java-tools/man/man1/pki-pkcs12-cert.1 | 122 +++++++++++++++++++++++++++++
|
|
|
dd68f4 |
base/java-tools/man/man1/pki-pkcs12-key.1 | 76 ++++++++++++++++++
|
|
|
dd68f4 |
base/java-tools/man/man1/pki-pkcs12.1 | 114 +++++++++++++++++++++++++++
|
|
|
dd68f4 |
3 files changed, 312 insertions(+)
|
|
|
dd68f4 |
create mode 100644 base/java-tools/man/man1/pki-pkcs12-cert.1
|
|
|
dd68f4 |
create mode 100644 base/java-tools/man/man1/pki-pkcs12-key.1
|
|
|
dd68f4 |
create mode 100644 base/java-tools/man/man1/pki-pkcs12.1
|
|
|
dd68f4 |
|
|
|
dd68f4 |
diff --git a/base/java-tools/man/man1/pki-pkcs12-cert.1 b/base/java-tools/man/man1/pki-pkcs12-cert.1
|
|
|
dd68f4 |
new file mode 100644
|
|
|
dd68f4 |
index 0000000..8a94de7
|
|
|
dd68f4 |
--- /dev/null
|
|
|
dd68f4 |
+++ b/base/java-tools/man/man1/pki-pkcs12-cert.1
|
|
|
dd68f4 |
@@ -0,0 +1,122 @@
|
|
|
dd68f4 |
+.\" First parameter, NAME, should be all caps
|
|
|
dd68f4 |
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
|
|
dd68f4 |
+.\" other parameters are allowed: see man(7), man(1)
|
|
|
dd68f4 |
+.TH pki-pkcs12-cert 1 "Oct 28, 2016" "version 10.3" "PKI PKCS #12 Certificate Management Commands" Dogtag Team
|
|
|
dd68f4 |
+.\" Please adjust this date whenever revising the man page.
|
|
|
dd68f4 |
+.\"
|
|
|
dd68f4 |
+.\" Some roff macros, for reference:
|
|
|
dd68f4 |
+.\" .nh disable hyphenation
|
|
|
dd68f4 |
+.\" .hy enable hyphenation
|
|
|
dd68f4 |
+.\" .ad l left justify
|
|
|
dd68f4 |
+.\" .ad b justify to both left and right margins
|
|
|
dd68f4 |
+.\" .nf disable filling
|
|
|
dd68f4 |
+.\" .fi enable filling
|
|
|
dd68f4 |
+.\" .br insert line break
|
|
|
dd68f4 |
+.\" .sp <n> insert n+1 empty lines
|
|
|
dd68f4 |
+.\" for man page specific macros, see man(7)
|
|
|
dd68f4 |
+.SH NAME
|
|
|
dd68f4 |
+pki-pkcs12-cert \- Command-Line Interface for managing individual certificates in PKCS #12 file.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH SYNOPSIS
|
|
|
dd68f4 |
+.nf
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-cert\fR
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-cert-find\fR [command options]
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-cert-export <nickname>\fR [command options]
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-cert-add <nickanme>\fR [command options]
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-cert-mod <nickname>\fR [command options]
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-cert-del <nickname>\fR [command options]
|
|
|
dd68f4 |
+.fi
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH DESCRIPTION
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+The \fBpki pkcs12-cert\fR commands provide command-line interfaces to manage certificates in a PKCS #12 file.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-cert-find\fR [command options]
|
|
|
dd68f4 |
+.RS 4
|
|
|
dd68f4 |
+This command is to list certificates in a PKCS #12 file.
|
|
|
dd68f4 |
+.RE
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-cert-export <nickname>\fR [command options]
|
|
|
dd68f4 |
+.RS 4
|
|
|
dd68f4 |
+This command is to export a certificate from a PKCS #12 file.
|
|
|
dd68f4 |
+.RE
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-cert-add <nickname>\fR [command options]
|
|
|
dd68f4 |
+.RS 4
|
|
|
dd68f4 |
+This command is to add a certificate into a PKCS #12 file.
|
|
|
dd68f4 |
+.RE
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-cert-mod <nickname>\fR [command options]
|
|
|
dd68f4 |
+.RS 4
|
|
|
dd68f4 |
+This command is to modify a certificate in a PKCS #12 file.
|
|
|
dd68f4 |
+.RE
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-cert-del <nickname>\fR [command options]
|
|
|
dd68f4 |
+.RS 4
|
|
|
dd68f4 |
+This command is to delete a certificate from a PKCS #12 file.
|
|
|
dd68f4 |
+.RE
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH OPTIONS
|
|
|
dd68f4 |
+The CLI options are described in \fBpki\fR(1).
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH OPERATIONS
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+To view available profile commands, type \fBpki pkcs12-cert\fP. To view each command's usage, type \fB pki pkcs12-cert-<command> \-\-help\fP.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+All \fBpkcs12-cert\fP commands require a PKCS #12 file and its password.
|
|
|
dd68f4 |
+The PKCS #12 file can be specified with the \fB--pkcs12-file\fP parameter.
|
|
|
dd68f4 |
+The password can be specified either directly with the \fB--pkcs12-password\fP parameter, or in a file with the \fB--pkcs12-password-file\fP parameter.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+Some \fBpki pkcs12-cert\fP commands require an NSS database and its password.
|
|
|
dd68f4 |
+The NSS database location can be specified with the \fB-d\fP parameter (default: ~/.dogtag/nssdb).
|
|
|
dd68f4 |
+The NSS database password can be specified with the \fB-c\fP or the \fB-C\fP parameter.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SS Viewing certificates in a PKCS #12 file
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+To list the certificates in a PKCS #12 file:
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.B pki pkcs12-cert-find <PKCS #12 file> <PKCS #12 password>
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SS Exporting a certificate from a PKCS #12 file
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+To export a certificate from a PKCS #12 file into a file in PEM format:
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.B pki pkcs12-cert-export <nickname> <PKCS #12 file> <PKCS #12 password> <cert file>
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+The certificate file can be specified with the \fB--cert-file\fP parameter.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SS Adding a certificate from an NSS database into a PKCS #12 file
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+To add a certificate including its key and trust flags from an NSS database into a PKCS #12 file:
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.B pki <NSS database location> <NSS database password> pkcs12-cert-add <nickname> <PKCS #12 file> <PKCS #12 password>
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+If the PKCS #12 file does not exist, it will be created automatically.
|
|
|
dd68f4 |
+If the PKCS #12 file already exists, the certificate will be added into the file.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+The trust flags can be overwritten with the \fB--trust-flags\fP parameter.
|
|
|
dd68f4 |
+If the key is not needed, specify the \fB--no-key\fP parameter.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SS Modifying a certificate in a PKCS #12 file
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+To modify the trust flags of a certificate in a PKCS #12 file:
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.B pki pkcs12-cert-mod <nickname> <PKCS #12 file> <PKCS #12 password> <trust flags>
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+The trust flags can be specified with the \fB--trust-flags\fP parameter.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SS Deleting a certificate from a PKCS #12 file
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+To delete a certificate and its key from a PKCS #12 file:
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.B pki pkcs12-cert-del <nickname> <PKCS #12 file> <PKCS #12 password>
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH AUTHORS
|
|
|
dd68f4 |
+Endi S. Dewata <edewata@redhat.com>.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH COPYRIGHT
|
|
|
dd68f4 |
+Copyright (c) 2016 Red Hat, Inc. This is licensed under the GNU General Public License, version 2 (GPLv2). A copy of this license is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH SEE ALSO
|
|
|
dd68f4 |
+.BR pki-pkcs12(1)
|
|
|
dd68f4 |
diff --git a/base/java-tools/man/man1/pki-pkcs12-key.1 b/base/java-tools/man/man1/pki-pkcs12-key.1
|
|
|
dd68f4 |
new file mode 100644
|
|
|
dd68f4 |
index 0000000..884278d
|
|
|
dd68f4 |
--- /dev/null
|
|
|
dd68f4 |
+++ b/base/java-tools/man/man1/pki-pkcs12-key.1
|
|
|
dd68f4 |
@@ -0,0 +1,76 @@
|
|
|
dd68f4 |
+.\" First parameter, NAME, should be all caps
|
|
|
dd68f4 |
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
|
|
dd68f4 |
+.\" other parameters are allowed: see man(7), man(1)
|
|
|
dd68f4 |
+.TH pki-pkcs12-key 1 "Oct 28, 2016" "version 10.3" "PKI PKCS #12 Key Management Commands" Dogtag Team
|
|
|
dd68f4 |
+.\" Please adjust this date whenever revising the man page.
|
|
|
dd68f4 |
+.\"
|
|
|
dd68f4 |
+.\" Some roff macros, for reference:
|
|
|
dd68f4 |
+.\" .nh disable hyphenation
|
|
|
dd68f4 |
+.\" .hy enable hyphenation
|
|
|
dd68f4 |
+.\" .ad l left justify
|
|
|
dd68f4 |
+.\" .ad b justify to both left and right margins
|
|
|
dd68f4 |
+.\" .nf disable filling
|
|
|
dd68f4 |
+.\" .fi enable filling
|
|
|
dd68f4 |
+.\" .br insert line break
|
|
|
dd68f4 |
+.\" .sp <n> insert n+1 empty lines
|
|
|
dd68f4 |
+.\" for man page specific macros, see man(7)
|
|
|
dd68f4 |
+.SH NAME
|
|
|
dd68f4 |
+pki-pkcs12-key \- Command-Line Interface for managing individual keys in PKCS #12 file.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH SYNOPSIS
|
|
|
dd68f4 |
+.nf
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-key\fR
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-key-find\fR [command options]
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-key-del <key ID>\fR [command options]
|
|
|
dd68f4 |
+.fi
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH DESCRIPTION
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+The \fBpki pkcs12-key\fR commands provide command-line interfaces to manage keys in a PKCS #12 file.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-key-find\fR [command options]
|
|
|
dd68f4 |
+.RS 4
|
|
|
dd68f4 |
+This command is to list keys in a PKCS #12 file.
|
|
|
dd68f4 |
+.RE
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-key-del <key ID>\fR [command options]
|
|
|
dd68f4 |
+.RS 4
|
|
|
dd68f4 |
+This command is to delete a key from a PKCS #12 file.
|
|
|
dd68f4 |
+.RE
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH OPTIONS
|
|
|
dd68f4 |
+The CLI options are described in \fBpki\fR(1).
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH OPERATIONS
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+To view available profile commands, type \fBpki pkcs12-key\fP. To view each command's usage, type \fB pki pkcs12-key-<command> \-\-help\fP.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+All \fBpkcs12-key\fP commands require a PKCS #12 file and its password.
|
|
|
dd68f4 |
+The PKCS #12 file can be specified with the \fB--pkcs12-file\fP parameter.
|
|
|
dd68f4 |
+The password can be specified either directly with the \fB--pkcs12-password\fP parameter, or in a file with the \fB--pkcs12-password-file\fP parameter.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+All \fBpkcs12-key\fP commands also require an NSS database and its password.
|
|
|
dd68f4 |
+The NSS database location can be specified with the \fB-d\fP parameter (default: ~/.dogtag/nssdb).
|
|
|
dd68f4 |
+The NSS database password can be specified with the \fB-c\fP or the \fB-C\fP parameter.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SS Viewing keys in a PKCS #12 file
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+To list the keys in a PKCS #12 file:
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.B pki <NSS database location> <NSS database password> pkcs12-key-find <PKCS #12 file> <PKCS #12 password>
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SS Deleting a key from a PKCS #12 file
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+To delete a key from a PKCS #12 file:
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.B pki <NSS database location> <NSS database password> pkcs12-key-del <key ID> <PKCS #12 file> <PKCS #12 password>
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH AUTHORS
|
|
|
dd68f4 |
+Endi S. Dewata <edewata@redhat.com>.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH COPYRIGHT
|
|
|
dd68f4 |
+Copyright (c) 2016 Red Hat, Inc. This is licensed under the GNU General Public License, version 2 (GPLv2). A copy of this license is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH SEE ALSO
|
|
|
dd68f4 |
+.BR pki-pkcs12(1)
|
|
|
dd68f4 |
diff --git a/base/java-tools/man/man1/pki-pkcs12.1 b/base/java-tools/man/man1/pki-pkcs12.1
|
|
|
dd68f4 |
new file mode 100644
|
|
|
dd68f4 |
index 0000000..5056930
|
|
|
dd68f4 |
--- /dev/null
|
|
|
dd68f4 |
+++ b/base/java-tools/man/man1/pki-pkcs12.1
|
|
|
dd68f4 |
@@ -0,0 +1,114 @@
|
|
|
dd68f4 |
+.\" First parameter, NAME, should be all caps
|
|
|
dd68f4 |
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
|
|
dd68f4 |
+.\" other parameters are allowed: see man(7), man(1)
|
|
|
dd68f4 |
+.TH pki-pkcs12 1 "Oct 28, 2016" "version 10.3" "PKI PKCS #12 Management Commands" Dogtag Team
|
|
|
dd68f4 |
+.\" Please adjust this date whenever revising the man page.
|
|
|
dd68f4 |
+.\"
|
|
|
dd68f4 |
+.\" Some roff macros, for reference:
|
|
|
dd68f4 |
+.\" .nh disable hyphenation
|
|
|
dd68f4 |
+.\" .hy enable hyphenation
|
|
|
dd68f4 |
+.\" .ad l left justify
|
|
|
dd68f4 |
+.\" .ad b justify to both left and right margins
|
|
|
dd68f4 |
+.\" .nf disable filling
|
|
|
dd68f4 |
+.\" .fi enable filling
|
|
|
dd68f4 |
+.\" .br insert line break
|
|
|
dd68f4 |
+.\" .sp <n> insert n+1 empty lines
|
|
|
dd68f4 |
+.\" for man page specific macros, see man(7)
|
|
|
dd68f4 |
+.SH NAME
|
|
|
dd68f4 |
+pki-pkcs12 \- Command-Line Interface for managing certificates and keys in PKCS #12 file.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH SYNOPSIS
|
|
|
dd68f4 |
+.nf
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12\fR
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-export\fR [command options]
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-import\fR [command options]
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-cert\fR [command options]
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-key\fR [command options]
|
|
|
dd68f4 |
+.fi
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH DESCRIPTION
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+The \fBpki pkcs12\fR commands provide command-line interfaces to manage certificate and keys in a PKCS #12 file.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-export\fR [command options]
|
|
|
dd68f4 |
+.RS 4
|
|
|
dd68f4 |
+This command is to export all certificates and keys from an NSS database into a PKCS #12 file.
|
|
|
dd68f4 |
+.RE
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-import\fR [command options]
|
|
|
dd68f4 |
+.RS 4
|
|
|
dd68f4 |
+This command is to import all certificates and keys from a PKCS #12 file into an NSS database.
|
|
|
dd68f4 |
+.RE
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-cert\fR [command options]
|
|
|
dd68f4 |
+.RS 4
|
|
|
dd68f4 |
+This command is to manage individual certificates in a PKCS #12 file. See \fBpki-pkcs12-cert\fR(1).
|
|
|
dd68f4 |
+.RE
|
|
|
dd68f4 |
+.PP
|
|
|
dd68f4 |
+\fBpki\fR [CLI options] \fBpkcs12-key\fR [command options]
|
|
|
dd68f4 |
+.RS 4
|
|
|
dd68f4 |
+This command is to import individual keys in a PKCS #12 file. See \fBpki-pkcs12-key\fR(1).
|
|
|
dd68f4 |
+.RE
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH OPTIONS
|
|
|
dd68f4 |
+The CLI options are described in \fBpki\fR(1).
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH OPERATIONS
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+To view available PKCS #12 commands, type \fBpki pkcs12\fP. To view each command's usage, type \fB pki pkcs12-<command> \-\-help\fP.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+All \fBpki pkcs12\fP commands require a PKCS #12 file and its password.
|
|
|
dd68f4 |
+The PKCS #12 file can be specified with the \fB--pkcs12-file\fP parameter.
|
|
|
dd68f4 |
+The password can be specified either directly with the \fB--pkcs12-password\fP parameter, or in a file with the \fB--pkcs12-password-file\fP parameter.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+Some \fBpki pkcs12\fP commands require an NSS database and its password.
|
|
|
dd68f4 |
+The NSS database location can be specified with the \fB-d\fP parameter (default: ~/.dogtag/nssdb).
|
|
|
dd68f4 |
+The NSS database password can be specified with the \fB-c\fP or the \fB-C\fP parameter.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SS Exporting all certificates and keys into a PKCS #12 file
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+To export all certificates and keys from an NSS database into a PKCS #12 file:
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.B pki <NSS database location> <NSS database password> pkcs12-export <PKCS #12 file> <PKCS #12 password> [nicknames...]
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+By default the command will export all certificates in the NSS database.
|
|
|
dd68f4 |
+To export certain certificates only, specify the certificate nicknames as separate arguments.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+By default the command will always create a new PKCS #12 file.
|
|
|
dd68f4 |
+To export into an existing PKCS #12 file, specify the \fB--append\fP parameter.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+By default the command will include the certificate chain.
|
|
|
dd68f4 |
+To export without certificate chain, specify the \fB--no-chain\fP parameter.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+By default the command will include the key of each certificate.
|
|
|
dd68f4 |
+To export without the key, specify the \fB--no-key\fP parameter.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+By default the command will include the trust flags of each certificate.
|
|
|
dd68f4 |
+To export without the trust flags, specify the \fB--no-trust-flags\fP parameter.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SS Importing certificates and keys from a PKCS #12 file
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+To import certificates and keys from a PKCS #12 file into an NSS database:
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.B pki <NSS database location> <NSS database password> pkcs12-import <PKCS #12 file> <PKCS #12 password>
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+By default the command will include all certificates in the PKCS #12 file.
|
|
|
dd68f4 |
+To import without the CA certificates (certificates without keys), specify the \fB--no-ca-certs\fP parameter.
|
|
|
dd68f4 |
+To import without the user certificates (certificates with keys), specify the \fB--no-user-certs\fP parameter.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+By default the command will skip a certificate if it already exists in the NSS database.
|
|
|
dd68f4 |
+To overwrite the nickname, the key, and the trust flags of existing certificates, specify the \fB--overwrite\fP parameter.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+By default the command will include the trust flags of each certificate.
|
|
|
dd68f4 |
+To import without the trust flags, specify the \fB--no-trust-flags\fP parameter.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH AUTHORS
|
|
|
dd68f4 |
+Endi S. Dewata <edewata@redhat.com>.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH COPYRIGHT
|
|
|
dd68f4 |
+Copyright (c) 2016 Red Hat, Inc. This is licensed under the GNU General Public License, version 2 (GPLv2). A copy of this license is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
|
|
dd68f4 |
+
|
|
|
dd68f4 |
+.SH SEE ALSO
|
|
|
dd68f4 |
+.BR pki-pkcs12-cert(1),
|
|
|
dd68f4 |
+.BR pki-pkcs12-key(1)
|
|
|
dd68f4 |
--
|
|
|
dd68f4 |
1.8.3.1
|
|
|
dd68f4 |
|